9848 lines
360 KiB
Diff
9848 lines
360 KiB
Diff
diff -Nuar a/pcap.c b/pcap.c
|
|
--- a/pcap.c 2019-07-19 15:35:27.000000000 +0300
|
|
+++ b/pcap.c 2021-10-28 20:34:39.778821937 +0300
|
|
@@ -1,4 +1,4 @@
|
|
-/* Generated by Cython 0.29.7 */
|
|
+/* Generated by Cython 0.29.21 */
|
|
|
|
#define PY_SSIZE_T_CLEAN
|
|
#include "Python.h"
|
|
@@ -7,8 +7,8 @@
|
|
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
|
|
#error Cython requires Python 2.6+ or Python 3.3+.
|
|
#else
|
|
-#define CYTHON_ABI "0_29_7"
|
|
-#define CYTHON_HEX_VERSION 0x001D07F0
|
|
+#define CYTHON_ABI "0_29_21"
|
|
+#define CYTHON_HEX_VERSION 0x001D15F0
|
|
#define CYTHON_FUTURE_DIVISION 1
|
|
#include <stddef.h>
|
|
#ifndef offsetof
|
|
@@ -310,8 +310,13 @@
|
|
#define __Pyx_DefaultClassType PyClass_Type
|
|
#else
|
|
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
|
|
+#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
|
|
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
|
|
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
|
|
+#else
|
|
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
|
|
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
|
|
+#endif
|
|
#define __Pyx_DefaultClassType PyType_Type
|
|
#endif
|
|
#ifndef Py_TPFLAGS_CHECKTYPES
|
|
@@ -430,7 +435,11 @@
|
|
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
|
|
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
|
|
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
|
|
+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
|
|
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
|
|
+ #else
|
|
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
|
|
+ #endif
|
|
#else
|
|
#define CYTHON_PEP393_ENABLED 0
|
|
#define PyUnicode_1BYTE_KIND 1
|
|
@@ -479,8 +488,10 @@
|
|
#define PyString_Type PyUnicode_Type
|
|
#define PyString_Check PyUnicode_Check
|
|
#define PyString_CheckExact PyUnicode_CheckExact
|
|
+#ifndef PyObject_Unicode
|
|
#define PyObject_Unicode PyObject_Str
|
|
#endif
|
|
+#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
|
|
#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
|
|
@@ -491,6 +502,13 @@
|
|
#ifndef PySet_CheckExact
|
|
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
|
|
#endif
|
|
+#if PY_VERSION_HEX >= 0x030900A4
|
|
+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
|
|
+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
|
|
+#else
|
|
+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
|
|
+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
|
|
+#endif
|
|
#if CYTHON_ASSUME_SAFE_MACROS
|
|
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
|
|
#else
|
|
@@ -530,7 +548,7 @@
|
|
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
|
|
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
|
|
#else
|
|
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
|
|
#endif
|
|
@@ -571,11 +589,10 @@
|
|
#define __Pyx_truncl truncl
|
|
#endif
|
|
|
|
-
|
|
+#define __PYX_MARK_ERR_POS(f_index, lineno) \
|
|
+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
|
|
#define __PYX_ERR(f_index, lineno, Ln_error) \
|
|
-{ \
|
|
- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
|
|
-}
|
|
+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
|
|
|
|
#ifndef __PYX_EXTERN_C
|
|
#ifdef __cplusplus
|
|
@@ -1063,7 +1080,7 @@
|
|
};
|
|
|
|
|
|
-/* "View.MemoryView":961
|
|
+/* "View.MemoryView":965
|
|
*
|
|
* @cname('__pyx_memoryviewslice')
|
|
* cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
|
|
@@ -1114,7 +1131,7 @@
|
|
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
|
|
|
|
|
|
-/* "View.MemoryView":961
|
|
+/* "View.MemoryView":965
|
|
*
|
|
* @cname('__pyx_memoryviewslice')
|
|
* cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
|
|
@@ -1323,7 +1340,7 @@
|
|
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
|
|
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
|
|
#if 1 || PY_VERSION_HEX < 0x030600B1
|
|
-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
|
|
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
|
|
#else
|
|
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
|
|
#endif
|
|
@@ -1389,7 +1406,7 @@
|
|
/* FetchCommonType.proto */
|
|
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
|
|
|
|
-/* CythonFunction.proto */
|
|
+/* CythonFunctionShared.proto */
|
|
#define __Pyx_CyFunction_USED 1
|
|
#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
|
|
#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
|
|
@@ -1417,6 +1434,7 @@
|
|
PyObject *func_classobj;
|
|
void *defaults;
|
|
int defaults_pyobjects;
|
|
+ size_t defaults_size; // used by FusedFunction for copying defaults
|
|
int flags;
|
|
PyObject *defaults_tuple;
|
|
PyObject *defaults_kwdict;
|
|
@@ -1425,9 +1443,7 @@
|
|
} __pyx_CyFunctionObject;
|
|
static PyTypeObject *__pyx_CyFunctionType = 0;
|
|
#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
|
|
-#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
|
|
- __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
|
|
-static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
|
|
+static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
|
|
int flags, PyObject* qualname,
|
|
PyObject *self,
|
|
PyObject *module, PyObject *globals,
|
|
@@ -1443,6 +1459,13 @@
|
|
PyObject *dict);
|
|
static int __pyx_CyFunction_init(void);
|
|
|
|
+/* CythonFunction.proto */
|
|
+static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
|
|
+ int flags, PyObject* qualname,
|
|
+ PyObject *closure,
|
|
+ PyObject *module, PyObject *globals,
|
|
+ PyObject* code);
|
|
+
|
|
/* GetItemInt.proto */
|
|
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
@@ -1504,7 +1527,7 @@
|
|
if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
|
|
Py_INCREF(x);
|
|
PyList_SET_ITEM(list, len, x);
|
|
- Py_SIZE(list) = len+1;
|
|
+ __Pyx_SET_SIZE(list, len + 1);
|
|
return 0;
|
|
}
|
|
return PyList_Append(list, x);
|
|
@@ -1608,7 +1631,7 @@
|
|
if (likely(L->allocated > len)) {
|
|
Py_INCREF(x);
|
|
PyList_SET_ITEM(list, len, x);
|
|
- Py_SIZE(list) = len+1;
|
|
+ __Pyx_SET_SIZE(list, len + 1);
|
|
return 0;
|
|
}
|
|
return PyList_Append(list, x);
|
|
@@ -1664,6 +1687,9 @@
|
|
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
|
|
#endif
|
|
|
|
+/* PyObjectGetAttrStrNoError.proto */
|
|
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
|
|
+
|
|
/* SetupReduce.proto */
|
|
static int __Pyx_setup_reduce(PyObject* type_obj);
|
|
|
|
@@ -2427,6 +2453,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":2
|
|
@@ -2481,6 +2510,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -2524,6 +2556,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("get_buffer", 0);
|
|
|
|
/* "pcap.pyx":120
|
|
@@ -2591,6 +2626,9 @@
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
#ifdef WITH_THREAD
|
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
#endif
|
|
@@ -2908,6 +2946,9 @@
|
|
static int __pyx_pw_4pcap_3bpf_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
char *__pyx_v_filter;
|
|
PyObject *__pyx_v_dlt = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
@@ -2973,6 +3014,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "pcap.pyx":183
|
|
@@ -3053,6 +3097,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("filter", 0);
|
|
|
|
/* "pcap.pyx":190
|
|
@@ -3184,6 +3231,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":2
|
|
@@ -3238,6 +3288,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -3286,6 +3339,9 @@
|
|
PyObject *__pyx_v_immediate = 0;
|
|
PyObject *__pyx_v_rfmon = 0;
|
|
PyObject *__pyx_v_timestamp_in_ns = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
@@ -3448,6 +3504,9 @@
|
|
static PyObject *__pyx_pw_4pcap_4pcap_8__init___1check_return(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_ret = 0;
|
|
PyObject *__pyx_v_descrip = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("check_return (wrapper)", 0);
|
|
@@ -3509,6 +3568,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("check_return", 0);
|
|
|
|
/* "pcap.pyx":243
|
|
@@ -3594,6 +3656,9 @@
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "pcap.pyx":229
|
|
@@ -3754,7 +3819,7 @@
|
|
* if ret != 0:
|
|
* raise OSError, "%s failed to execute" % descrip
|
|
*/
|
|
- __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4pcap_4pcap_8__init___1check_return, 0, __pyx_n_s_init___locals_check_return, NULL, __pyx_n_s_pcap, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 242, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4pcap_4pcap_8__init___1check_return, 0, __pyx_n_s_init___locals_check_return, NULL, __pyx_n_s_pcap, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 242, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v_check_return = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
@@ -4238,6 +4303,9 @@
|
|
char *__pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":287
|
|
@@ -4303,6 +4371,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":292
|
|
@@ -4363,6 +4434,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":297
|
|
@@ -4425,6 +4499,9 @@
|
|
char *__pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":302
|
|
@@ -4490,6 +4567,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":307
|
|
@@ -4550,6 +4630,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":312
|
|
@@ -4610,6 +4693,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "pcap.pyx":317
|
|
@@ -4671,6 +4757,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("fileno", 0);
|
|
|
|
/* "pcap.pyx":321
|
|
@@ -4780,6 +4869,9 @@
|
|
static PyObject *__pyx_pw_4pcap_4pcap_7setfilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_value = 0;
|
|
PyObject *__pyx_v_optimize = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("setfilter (wrapper)", 0);
|
|
@@ -4851,6 +4943,9 @@
|
|
char const *__pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("setfilter", 0);
|
|
|
|
/* "pcap.pyx":331
|
|
@@ -5024,6 +5119,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("setdirection", 0);
|
|
|
|
/* "pcap.pyx":342
|
|
@@ -5073,6 +5171,9 @@
|
|
static char __pyx_doc_4pcap_4pcap_10setnonblock[] = "Set non-blocking capture mode.";
|
|
static PyObject *__pyx_pw_4pcap_4pcap_11setnonblock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_nonblock = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("setnonblock (wrapper)", 0);
|
|
@@ -5129,6 +5230,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("setnonblock", 0);
|
|
|
|
/* "pcap.pyx":346
|
|
@@ -5189,6 +5293,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("getnonblock", 0);
|
|
|
|
/* "pcap.pyx":350
|
|
@@ -5291,6 +5398,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("datalink", 0);
|
|
|
|
/* "pcap.pyx":357
|
|
@@ -5340,6 +5450,9 @@
|
|
PyObject *__pyx_v_ts = 0;
|
|
PyObject *__pyx_v_pkt = 0;
|
|
PyObject *__pyx_v_pkts = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__add_pkts (wrapper)", 0);
|
|
@@ -5411,6 +5524,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__add_pkts", 0);
|
|
|
|
/* "pcap.pyx":360
|
|
@@ -5484,6 +5600,9 @@
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("readpkts", 0);
|
|
|
|
/* "pcap.pyx":364
|
|
@@ -5612,6 +5731,9 @@
|
|
PyObject *__pyx_v_cnt = 0;
|
|
PyObject *__pyx_v_callback = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("dispatch (wrapper)", 0);
|
|
@@ -5693,6 +5815,9 @@
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("dispatch", 0);
|
|
|
|
/* "pcap.pyx":381
|
|
@@ -5854,6 +5979,9 @@
|
|
PyObject *__pyx_v_cnt = 0;
|
|
PyObject *__pyx_v_callback = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("loop (wrapper)", 0);
|
|
@@ -5939,6 +6067,9 @@
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("loop", 0);
|
|
|
|
/* "pcap.pyx":410
|
|
@@ -6368,6 +6499,9 @@
|
|
Py_ssize_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("sendpacket", 0);
|
|
|
|
/* "pcap.pyx":443
|
|
@@ -6473,6 +6607,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("geterr", 0);
|
|
|
|
/* "pcap.pyx":450
|
|
@@ -6539,6 +6676,9 @@
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("stats", 0);
|
|
|
|
/* "pcap.pyx":456
|
|
@@ -6724,6 +6864,9 @@
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__next__", 0);
|
|
|
|
/* "pcap.pyx":468
|
|
@@ -7144,6 +7287,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":2
|
|
@@ -7198,6 +7344,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -7241,6 +7390,9 @@
|
|
static PyMethodDef __pyx_mdef_4pcap_1ex_name = {"ex_name", (PyCFunction)__pyx_pw_4pcap_1ex_name, METH_O, 0};
|
|
static PyObject *__pyx_pw_4pcap_1ex_name(PyObject *__pyx_self, PyObject *__pyx_arg_foo) {
|
|
char *__pyx_v_foo;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("ex_name (wrapper)", 0);
|
|
@@ -7264,6 +7416,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("ex_name", 0);
|
|
|
|
/* "pcap.pyx":499
|
|
@@ -7330,6 +7485,9 @@
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("lookupdev", 0);
|
|
|
|
/* "pcap.pyx":505
|
|
@@ -7447,6 +7605,9 @@
|
|
char *__pyx_t_4;
|
|
int __pyx_t_5;
|
|
pcap_if_t *__pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("findalldevs", 0);
|
|
|
|
/* "pcap.pyx":516
|
|
@@ -7666,6 +7827,9 @@
|
|
static PyMethodDef __pyx_mdef_4pcap_7lookupnet = {"lookupnet", (PyCFunction)__pyx_pw_4pcap_7lookupnet, METH_O, __pyx_doc_4pcap_6lookupnet};
|
|
static PyObject *__pyx_pw_4pcap_7lookupnet(PyObject *__pyx_self, PyObject *__pyx_arg_dev) {
|
|
char *__pyx_v_dev;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("lookupnet (wrapper)", 0);
|
|
@@ -7700,6 +7864,9 @@
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("lookupnet", 0);
|
|
|
|
/* "pcap.pyx":540
|
|
@@ -7911,6 +8078,9 @@
|
|
PyObject *__pyx_v_format = 0;
|
|
PyObject *__pyx_v_mode = 0;
|
|
int __pyx_v_allocate_buffer;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
|
|
@@ -8049,6 +8219,9 @@
|
|
Py_ssize_t __pyx_t_9;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
Py_ssize_t __pyx_t_11;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__cinit__", 0);
|
|
__Pyx_INCREF(__pyx_v_format);
|
|
|
|
@@ -8672,6 +8845,9 @@
|
|
Py_ssize_t __pyx_t_5;
|
|
int __pyx_t_6;
|
|
Py_ssize_t *__pyx_t_7;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
if (__pyx_v_info == NULL) {
|
|
PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
|
|
return -1;
|
|
@@ -9100,6 +9276,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "View.MemoryView":223
|
|
@@ -9150,6 +9329,9 @@
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("get_memview", 0);
|
|
|
|
/* "View.MemoryView":227
|
|
@@ -9288,6 +9470,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__getattr__", 0);
|
|
|
|
/* "View.MemoryView":234
|
|
@@ -9353,6 +9538,9 @@
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__getitem__", 0);
|
|
|
|
/* "View.MemoryView":237
|
|
@@ -9417,6 +9605,9 @@
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setitem__", 0);
|
|
|
|
/* "View.MemoryView":240
|
|
@@ -9474,6 +9665,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":2
|
|
@@ -9528,6 +9722,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -9575,6 +9772,9 @@
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("array_cwrapper", 0);
|
|
|
|
/* "View.MemoryView":248
|
|
@@ -9742,6 +9942,9 @@
|
|
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_name = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
@@ -9903,6 +10106,9 @@
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
@@ -10128,6 +10334,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
@@ -10257,6 +10466,9 @@
|
|
PyObject *__pyx_v_obj = 0;
|
|
int __pyx_v_flags;
|
|
int __pyx_v_dtype_is_object;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
|
|
@@ -10337,6 +10549,9 @@
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__cinit__", 0);
|
|
|
|
/* "View.MemoryView":346
|
|
@@ -10652,7 +10867,7 @@
|
|
* def __dealloc__(memoryview self):
|
|
* if self.obj is not None: # <<<<<<<<<<<<<<
|
|
* __Pyx_ReleaseBuffer(&self.view)
|
|
- *
|
|
+ * elif (<__pyx_buffer *> &self.view).obj == Py_None:
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_self->obj != Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
@@ -10662,8 +10877,8 @@
|
|
* def __dealloc__(memoryview self):
|
|
* if self.obj is not None:
|
|
* __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
|
|
+ * elif (<__pyx_buffer *> &self.view).obj == Py_None:
|
|
*
|
|
- * cdef int i
|
|
*/
|
|
__Pyx_ReleaseBuffer((&__pyx_v_self->view));
|
|
|
|
@@ -10672,11 +10887,50 @@
|
|
* def __dealloc__(memoryview self):
|
|
* if self.obj is not None: # <<<<<<<<<<<<<<
|
|
* __Pyx_ReleaseBuffer(&self.view)
|
|
+ * elif (<__pyx_buffer *> &self.view).obj == Py_None:
|
|
+ */
|
|
+ goto __pyx_L3;
|
|
+ }
|
|
+
|
|
+ /* "View.MemoryView":375
|
|
+ * if self.obj is not None:
|
|
+ * __Pyx_ReleaseBuffer(&self.view)
|
|
+ * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
|
|
+ *
|
|
+ * (<__pyx_buffer *> &self.view).obj = NULL
|
|
+ */
|
|
+ __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
|
|
+ if (__pyx_t_2) {
|
|
+
|
|
+ /* "View.MemoryView":377
|
|
+ * elif (<__pyx_buffer *> &self.view).obj == Py_None:
|
|
+ *
|
|
+ * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
|
|
+ * Py_DECREF(Py_None)
|
|
*
|
|
*/
|
|
+ ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
|
|
+
|
|
+ /* "View.MemoryView":378
|
|
+ *
|
|
+ * (<__pyx_buffer *> &self.view).obj = NULL
|
|
+ * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
|
|
+ *
|
|
+ * cdef int i
|
|
+ */
|
|
+ Py_DECREF(Py_None);
|
|
+
|
|
+ /* "View.MemoryView":375
|
|
+ * if self.obj is not None:
|
|
+ * __Pyx_ReleaseBuffer(&self.view)
|
|
+ * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
|
|
+ *
|
|
+ * (<__pyx_buffer *> &self.view).obj = NULL
|
|
+ */
|
|
}
|
|
+ __pyx_L3:;
|
|
|
|
- /* "View.MemoryView":378
|
|
+ /* "View.MemoryView":382
|
|
* cdef int i
|
|
* global __pyx_memoryview_thread_locks_used
|
|
* if self.lock != NULL: # <<<<<<<<<<<<<<
|
|
@@ -10686,7 +10940,7 @@
|
|
__pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":379
|
|
+ /* "View.MemoryView":383
|
|
* global __pyx_memoryview_thread_locks_used
|
|
* if self.lock != NULL:
|
|
* for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
|
|
@@ -10698,7 +10952,7 @@
|
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
__pyx_v_i = __pyx_t_5;
|
|
|
|
- /* "View.MemoryView":380
|
|
+ /* "View.MemoryView":384
|
|
* if self.lock != NULL:
|
|
* for i in range(__pyx_memoryview_thread_locks_used):
|
|
* if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
|
|
@@ -10708,7 +10962,7 @@
|
|
__pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":381
|
|
+ /* "View.MemoryView":385
|
|
* for i in range(__pyx_memoryview_thread_locks_used):
|
|
* if __pyx_memoryview_thread_locks[i] is self.lock:
|
|
* __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
|
|
@@ -10717,7 +10971,7 @@
|
|
*/
|
|
__pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
|
|
|
|
- /* "View.MemoryView":382
|
|
+ /* "View.MemoryView":386
|
|
* if __pyx_memoryview_thread_locks[i] is self.lock:
|
|
* __pyx_memoryview_thread_locks_used -= 1
|
|
* if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
|
|
@@ -10727,7 +10981,7 @@
|
|
__pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":384
|
|
+ /* "View.MemoryView":388
|
|
* if i != __pyx_memoryview_thread_locks_used:
|
|
* __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
|
|
* __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
|
|
@@ -10737,7 +10991,7 @@
|
|
__pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
|
|
__pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
|
|
|
|
- /* "View.MemoryView":383
|
|
+ /* "View.MemoryView":387
|
|
* __pyx_memoryview_thread_locks_used -= 1
|
|
* if i != __pyx_memoryview_thread_locks_used:
|
|
* __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
|
|
@@ -10747,7 +11001,7 @@
|
|
(__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
|
|
(__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
|
|
|
|
- /* "View.MemoryView":382
|
|
+ /* "View.MemoryView":386
|
|
* if __pyx_memoryview_thread_locks[i] is self.lock:
|
|
* __pyx_memoryview_thread_locks_used -= 1
|
|
* if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
|
|
@@ -10756,7 +11010,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":385
|
|
+ /* "View.MemoryView":389
|
|
* __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
|
|
* __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
|
|
* break # <<<<<<<<<<<<<<
|
|
@@ -10765,7 +11019,7 @@
|
|
*/
|
|
goto __pyx_L6_break;
|
|
|
|
- /* "View.MemoryView":380
|
|
+ /* "View.MemoryView":384
|
|
* if self.lock != NULL:
|
|
* for i in range(__pyx_memoryview_thread_locks_used):
|
|
* if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
|
|
@@ -10776,7 +11030,7 @@
|
|
}
|
|
/*else*/ {
|
|
|
|
- /* "View.MemoryView":387
|
|
+ /* "View.MemoryView":391
|
|
* break
|
|
* else:
|
|
* PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
|
|
@@ -10787,7 +11041,7 @@
|
|
}
|
|
__pyx_L6_break:;
|
|
|
|
- /* "View.MemoryView":378
|
|
+ /* "View.MemoryView":382
|
|
* cdef int i
|
|
* global __pyx_memoryview_thread_locks_used
|
|
* if self.lock != NULL: # <<<<<<<<<<<<<<
|
|
@@ -10808,7 +11062,7 @@
|
|
__Pyx_RefNannyFinishContext();
|
|
}
|
|
|
|
-/* "View.MemoryView":389
|
|
+/* "View.MemoryView":393
|
|
* PyThread_free_lock(self.lock)
|
|
*
|
|
* cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
|
|
@@ -10829,9 +11083,12 @@
|
|
PyObject *__pyx_t_5 = NULL;
|
|
Py_ssize_t __pyx_t_6;
|
|
char *__pyx_t_7;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("get_item_pointer", 0);
|
|
|
|
- /* "View.MemoryView":391
|
|
+ /* "View.MemoryView":395
|
|
* cdef char *get_item_pointer(memoryview self, object index) except NULL:
|
|
* cdef Py_ssize_t dim
|
|
* cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
|
|
@@ -10840,7 +11097,7 @@
|
|
*/
|
|
__pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
|
|
|
|
- /* "View.MemoryView":393
|
|
+ /* "View.MemoryView":397
|
|
* cdef char *itemp = <char *> self.view.buf
|
|
*
|
|
* for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
|
|
@@ -10852,26 +11109,26 @@
|
|
__pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
}
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
#else
|
|
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
#else
|
|
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
#endif
|
|
}
|
|
@@ -10881,7 +11138,7 @@
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
- else __PYX_ERR(0, 393, __pyx_L1_error)
|
|
+ else __PYX_ERR(0, 397, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
@@ -10892,18 +11149,18 @@
|
|
__pyx_v_dim = __pyx_t_1;
|
|
__pyx_t_1 = (__pyx_t_1 + 1);
|
|
|
|
- /* "View.MemoryView":394
|
|
+ /* "View.MemoryView":398
|
|
*
|
|
* for dim, idx in enumerate(index):
|
|
* itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
|
|
*
|
|
* return itemp
|
|
*/
|
|
- __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 394, __pyx_L1_error)
|
|
- __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 394, __pyx_L1_error)
|
|
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 398, __pyx_L1_error)
|
|
+ __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 398, __pyx_L1_error)
|
|
__pyx_v_itemp = __pyx_t_7;
|
|
|
|
- /* "View.MemoryView":393
|
|
+ /* "View.MemoryView":397
|
|
* cdef char *itemp = <char *> self.view.buf
|
|
*
|
|
* for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
|
|
@@ -10913,7 +11170,7 @@
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":396
|
|
+ /* "View.MemoryView":400
|
|
* itemp = pybuffer_index(&self.view, itemp, idx, dim)
|
|
*
|
|
* return itemp # <<<<<<<<<<<<<<
|
|
@@ -10923,7 +11180,7 @@
|
|
__pyx_r = __pyx_v_itemp;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":389
|
|
+ /* "View.MemoryView":393
|
|
* PyThread_free_lock(self.lock)
|
|
*
|
|
* cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
|
|
@@ -10943,7 +11200,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":399
|
|
+/* "View.MemoryView":403
|
|
*
|
|
*
|
|
* def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
|
|
@@ -10976,9 +11233,12 @@
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
char *__pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__getitem__", 0);
|
|
|
|
- /* "View.MemoryView":400
|
|
+ /* "View.MemoryView":404
|
|
*
|
|
* def __getitem__(memoryview self, object index):
|
|
* if index is Ellipsis: # <<<<<<<<<<<<<<
|
|
@@ -10989,7 +11249,7 @@
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":401
|
|
+ /* "View.MemoryView":405
|
|
* def __getitem__(memoryview self, object index):
|
|
* if index is Ellipsis:
|
|
* return self # <<<<<<<<<<<<<<
|
|
@@ -11001,7 +11261,7 @@
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":400
|
|
+ /* "View.MemoryView":404
|
|
*
|
|
* def __getitem__(memoryview self, object index):
|
|
* if index is Ellipsis: # <<<<<<<<<<<<<<
|
|
@@ -11010,14 +11270,14 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":403
|
|
+ /* "View.MemoryView":407
|
|
* return self
|
|
*
|
|
* have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef char *itemp
|
|
*/
|
|
- __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
|
|
+ __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (likely(__pyx_t_3 != Py_None)) {
|
|
PyObject* sequence = __pyx_t_3;
|
|
@@ -11025,7 +11285,7 @@
|
|
if (unlikely(size != 2)) {
|
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
- __PYX_ERR(0, 403, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 407, __pyx_L1_error)
|
|
}
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
|
|
@@ -11033,31 +11293,31 @@
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
#else
|
|
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error)
|
|
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
- __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
|
|
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
} else {
|
|
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 403, __pyx_L1_error)
|
|
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 407, __pyx_L1_error)
|
|
}
|
|
__pyx_v_have_slices = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
__pyx_v_indices = __pyx_t_5;
|
|
__pyx_t_5 = 0;
|
|
|
|
- /* "View.MemoryView":406
|
|
+ /* "View.MemoryView":410
|
|
*
|
|
* cdef char *itemp
|
|
* if have_slices: # <<<<<<<<<<<<<<
|
|
* return memview_slice(self, indices)
|
|
* else:
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 406, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":407
|
|
+ /* "View.MemoryView":411
|
|
* cdef char *itemp
|
|
* if have_slices:
|
|
* return memview_slice(self, indices) # <<<<<<<<<<<<<<
|
|
@@ -11065,13 +11325,13 @@
|
|
* itemp = self.get_item_pointer(indices)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
+ __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":406
|
|
+ /* "View.MemoryView":410
|
|
*
|
|
* cdef char *itemp
|
|
* if have_slices: # <<<<<<<<<<<<<<
|
|
@@ -11080,7 +11340,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":409
|
|
+ /* "View.MemoryView":413
|
|
* return memview_slice(self, indices)
|
|
* else:
|
|
* itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
|
|
@@ -11088,10 +11348,10 @@
|
|
*
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 409, __pyx_L1_error)
|
|
+ __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 413, __pyx_L1_error)
|
|
__pyx_v_itemp = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":410
|
|
+ /* "View.MemoryView":414
|
|
* else:
|
|
* itemp = self.get_item_pointer(indices)
|
|
* return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
|
|
@@ -11099,14 +11359,14 @@
|
|
* def __setitem__(memoryview self, object index, object value):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
|
|
+ __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":399
|
|
+ /* "View.MemoryView":403
|
|
*
|
|
*
|
|
* def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
|
|
@@ -11129,7 +11389,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":412
|
|
+/* "View.MemoryView":416
|
|
* return self.convert_item_to_object(itemp)
|
|
*
|
|
* def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
|
|
@@ -11159,10 +11419,13 @@
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setitem__", 0);
|
|
__Pyx_INCREF(__pyx_v_index);
|
|
|
|
- /* "View.MemoryView":413
|
|
+ /* "View.MemoryView":417
|
|
*
|
|
* def __setitem__(memoryview self, object index, object value):
|
|
* if self.view.readonly: # <<<<<<<<<<<<<<
|
|
@@ -11172,20 +11435,20 @@
|
|
__pyx_t_1 = (__pyx_v_self->view.readonly != 0);
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
- /* "View.MemoryView":414
|
|
+ /* "View.MemoryView":418
|
|
* def __setitem__(memoryview self, object index, object value):
|
|
* if self.view.readonly:
|
|
* raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
|
|
*
|
|
* have_slices, index = _unellipsify(index, self.view.ndim)
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
- __PYX_ERR(0, 414, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 418, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":413
|
|
+ /* "View.MemoryView":417
|
|
*
|
|
* def __setitem__(memoryview self, object index, object value):
|
|
* if self.view.readonly: # <<<<<<<<<<<<<<
|
|
@@ -11194,14 +11457,14 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":416
|
|
+ /* "View.MemoryView":420
|
|
* raise TypeError("Cannot assign to read-only memoryview")
|
|
*
|
|
* have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
|
|
*
|
|
* if have_slices:
|
|
*/
|
|
- __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
|
|
+ __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (likely(__pyx_t_2 != Py_None)) {
|
|
PyObject* sequence = __pyx_t_2;
|
|
@@ -11209,7 +11472,7 @@
|
|
if (unlikely(size != 2)) {
|
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
- __PYX_ERR(0, 416, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 420, __pyx_L1_error)
|
|
}
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
|
|
@@ -11217,67 +11480,67 @@
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
#else
|
|
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error)
|
|
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
|
|
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
} else {
|
|
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 416, __pyx_L1_error)
|
|
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 420, __pyx_L1_error)
|
|
}
|
|
__pyx_v_have_slices = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
- /* "View.MemoryView":418
|
|
+ /* "View.MemoryView":422
|
|
* have_slices, index = _unellipsify(index, self.view.ndim)
|
|
*
|
|
* if have_slices: # <<<<<<<<<<<<<<
|
|
* obj = self.is_slice(value)
|
|
* if obj:
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":419
|
|
+ /* "View.MemoryView":423
|
|
*
|
|
* if have_slices:
|
|
* obj = self.is_slice(value) # <<<<<<<<<<<<<<
|
|
* if obj:
|
|
* self.setitem_slice_assignment(self[index], obj)
|
|
*/
|
|
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v_obj = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":420
|
|
+ /* "View.MemoryView":424
|
|
* if have_slices:
|
|
* obj = self.is_slice(value)
|
|
* if obj: # <<<<<<<<<<<<<<
|
|
* self.setitem_slice_assignment(self[index], obj)
|
|
* else:
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 420, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":421
|
|
+ /* "View.MemoryView":425
|
|
* obj = self.is_slice(value)
|
|
* if obj:
|
|
* self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* self.setitem_slice_assign_scalar(self[index], value)
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
|
|
+ __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
|
|
- /* "View.MemoryView":420
|
|
+ /* "View.MemoryView":424
|
|
* if have_slices:
|
|
* obj = self.is_slice(value)
|
|
* if obj: # <<<<<<<<<<<<<<
|
|
@@ -11287,7 +11550,7 @@
|
|
goto __pyx_L5;
|
|
}
|
|
|
|
- /* "View.MemoryView":423
|
|
+ /* "View.MemoryView":427
|
|
* self.setitem_slice_assignment(self[index], obj)
|
|
* else:
|
|
* self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
|
|
@@ -11295,17 +11558,17 @@
|
|
* self.setitem_indexed(index, value)
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
- if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(0, 423, __pyx_L1_error)
|
|
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
|
|
+ if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
}
|
|
__pyx_L5:;
|
|
|
|
- /* "View.MemoryView":418
|
|
+ /* "View.MemoryView":422
|
|
* have_slices, index = _unellipsify(index, self.view.ndim)
|
|
*
|
|
* if have_slices: # <<<<<<<<<<<<<<
|
|
@@ -11315,7 +11578,7 @@
|
|
goto __pyx_L4;
|
|
}
|
|
|
|
- /* "View.MemoryView":425
|
|
+ /* "View.MemoryView":429
|
|
* self.setitem_slice_assign_scalar(self[index], value)
|
|
* else:
|
|
* self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
|
|
@@ -11323,13 +11586,13 @@
|
|
* cdef is_slice(self, obj):
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
|
|
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
}
|
|
__pyx_L4:;
|
|
|
|
- /* "View.MemoryView":412
|
|
+ /* "View.MemoryView":416
|
|
* return self.convert_item_to_object(itemp)
|
|
*
|
|
* def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
|
|
@@ -11354,7 +11617,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":427
|
|
+/* "View.MemoryView":431
|
|
* self.setitem_indexed(index, value)
|
|
*
|
|
* cdef is_slice(self, obj): # <<<<<<<<<<<<<<
|
|
@@ -11374,10 +11637,13 @@
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
int __pyx_t_9;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("is_slice", 0);
|
|
__Pyx_INCREF(__pyx_v_obj);
|
|
|
|
- /* "View.MemoryView":428
|
|
+ /* "View.MemoryView":432
|
|
*
|
|
* cdef is_slice(self, obj):
|
|
* if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
|
|
@@ -11388,7 +11654,7 @@
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":429
|
|
+ /* "View.MemoryView":433
|
|
* cdef is_slice(self, obj):
|
|
* if not isinstance(obj, memoryview):
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -11404,34 +11670,34 @@
|
|
__Pyx_XGOTREF(__pyx_t_5);
|
|
/*try:*/ {
|
|
|
|
- /* "View.MemoryView":430
|
|
+ /* "View.MemoryView":434
|
|
* if not isinstance(obj, memoryview):
|
|
* try:
|
|
* obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
|
|
* self.dtype_is_object)
|
|
* except TypeError:
|
|
*/
|
|
- __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L4_error)
|
|
+ __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L4_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
- /* "View.MemoryView":431
|
|
+ /* "View.MemoryView":435
|
|
* try:
|
|
* obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
|
|
* self.dtype_is_object) # <<<<<<<<<<<<<<
|
|
* except TypeError:
|
|
* return None
|
|
*/
|
|
- __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L4_error)
|
|
+ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L4_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
|
|
- /* "View.MemoryView":430
|
|
+ /* "View.MemoryView":434
|
|
* if not isinstance(obj, memoryview):
|
|
* try:
|
|
* obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
|
|
* self.dtype_is_object)
|
|
* except TypeError:
|
|
*/
|
|
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 430, __pyx_L4_error)
|
|
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 434, __pyx_L4_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_v_obj);
|
|
__Pyx_GIVEREF(__pyx_v_obj);
|
|
@@ -11442,13 +11708,13 @@
|
|
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
- __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L4_error)
|
|
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L4_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
|
|
__pyx_t_7 = 0;
|
|
|
|
- /* "View.MemoryView":429
|
|
+ /* "View.MemoryView":433
|
|
* cdef is_slice(self, obj):
|
|
* if not isinstance(obj, memoryview):
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -11465,7 +11731,7 @@
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
- /* "View.MemoryView":432
|
|
+ /* "View.MemoryView":436
|
|
* obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
|
|
* self.dtype_is_object)
|
|
* except TypeError: # <<<<<<<<<<<<<<
|
|
@@ -11475,12 +11741,12 @@
|
|
__pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
|
|
if (__pyx_t_9) {
|
|
__Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 432, __pyx_L6_except_error)
|
|
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 436, __pyx_L6_except_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
- /* "View.MemoryView":433
|
|
+ /* "View.MemoryView":437
|
|
* self.dtype_is_object)
|
|
* except TypeError:
|
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -11497,7 +11763,7 @@
|
|
goto __pyx_L6_except_error;
|
|
__pyx_L6_except_error:;
|
|
|
|
- /* "View.MemoryView":429
|
|
+ /* "View.MemoryView":433
|
|
* cdef is_slice(self, obj):
|
|
* if not isinstance(obj, memoryview):
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -11518,7 +11784,7 @@
|
|
__pyx_L9_try_end:;
|
|
}
|
|
|
|
- /* "View.MemoryView":428
|
|
+ /* "View.MemoryView":432
|
|
*
|
|
* cdef is_slice(self, obj):
|
|
* if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
|
|
@@ -11527,7 +11793,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":435
|
|
+ /* "View.MemoryView":439
|
|
* return None
|
|
*
|
|
* return obj # <<<<<<<<<<<<<<
|
|
@@ -11539,7 +11805,7 @@
|
|
__pyx_r = __pyx_v_obj;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":427
|
|
+ /* "View.MemoryView":431
|
|
* self.setitem_indexed(index, value)
|
|
*
|
|
* cdef is_slice(self, obj): # <<<<<<<<<<<<<<
|
|
@@ -11561,7 +11827,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":437
|
|
+/* "View.MemoryView":441
|
|
* return obj
|
|
*
|
|
* cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
|
|
@@ -11574,56 +11840,63 @@
|
|
__Pyx_memviewslice __pyx_v_src_slice;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
- PyObject *__pyx_t_1 = NULL;
|
|
- int __pyx_t_2;
|
|
- int __pyx_t_3;
|
|
+ __Pyx_memviewslice *__pyx_t_1;
|
|
+ __Pyx_memviewslice *__pyx_t_2;
|
|
+ PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
+ int __pyx_t_5;
|
|
+ int __pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
|
|
|
|
- /* "View.MemoryView":441
|
|
+ /* "View.MemoryView":445
|
|
* cdef __Pyx_memviewslice src_slice
|
|
*
|
|
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
|
|
* get_slice_from_memview(dst, &dst_slice)[0],
|
|
* src.ndim, dst.ndim, self.dtype_is_object)
|
|
*/
|
|
- if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 441, __pyx_L1_error)
|
|
+ if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 445, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 445, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":442
|
|
+ /* "View.MemoryView":446
|
|
*
|
|
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
|
|
* get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
|
|
* src.ndim, dst.ndim, self.dtype_is_object)
|
|
*
|
|
*/
|
|
- if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 442, __pyx_L1_error)
|
|
+ if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 446, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 446, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":443
|
|
+ /* "View.MemoryView":447
|
|
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
|
|
* get_slice_from_memview(dst, &dst_slice)[0],
|
|
* src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef setitem_slice_assign_scalar(self, memoryview dst, value):
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
|
|
- __Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error)
|
|
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
|
|
- __Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error)
|
|
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
|
|
+ __Pyx_GOTREF(__pyx_t_3);
|
|
+ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
|
|
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
|
|
+ __Pyx_GOTREF(__pyx_t_3);
|
|
+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
|
|
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":441
|
|
+ /* "View.MemoryView":445
|
|
* cdef __Pyx_memviewslice src_slice
|
|
*
|
|
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
|
|
* get_slice_from_memview(dst, &dst_slice)[0],
|
|
* src.ndim, dst.ndim, self.dtype_is_object)
|
|
*/
|
|
- __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 441, __pyx_L1_error)
|
|
+ __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 445, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":437
|
|
+ /* "View.MemoryView":441
|
|
* return obj
|
|
*
|
|
* cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
|
|
@@ -11635,7 +11908,7 @@
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
- __Pyx_XDECREF(__pyx_t_1);
|
|
+ __Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
@@ -11644,7 +11917,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":445
|
|
+/* "View.MemoryView":449
|
|
* src.ndim, dst.ndim, self.dtype_is_object)
|
|
*
|
|
* cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
|
|
@@ -11660,20 +11933,24 @@
|
|
__Pyx_memviewslice __pyx_v_tmp_slice;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
- int __pyx_t_1;
|
|
- PyObject *__pyx_t_2 = NULL;
|
|
- int __pyx_t_3;
|
|
+ __Pyx_memviewslice *__pyx_t_1;
|
|
+ int __pyx_t_2;
|
|
+ PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
- char const *__pyx_t_5;
|
|
- PyObject *__pyx_t_6 = NULL;
|
|
+ int __pyx_t_5;
|
|
+ char const *__pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
+ PyObject *__pyx_t_12 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
|
|
|
|
- /* "View.MemoryView":447
|
|
+ /* "View.MemoryView":451
|
|
* cdef setitem_slice_assign_scalar(self, memoryview dst, value):
|
|
* cdef int array[128]
|
|
* cdef void *tmp = NULL # <<<<<<<<<<<<<<
|
|
@@ -11682,26 +11959,27 @@
|
|
*/
|
|
__pyx_v_tmp = NULL;
|
|
|
|
- /* "View.MemoryView":452
|
|
+ /* "View.MemoryView":456
|
|
* cdef __Pyx_memviewslice *dst_slice
|
|
* cdef __Pyx_memviewslice tmp_slice
|
|
* dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
|
|
*
|
|
* if <size_t>self.view.itemsize > sizeof(array):
|
|
*/
|
|
- __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice));
|
|
+ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 456, __pyx_L1_error)
|
|
+ __pyx_v_dst_slice = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":454
|
|
+ /* "View.MemoryView":458
|
|
* dst_slice = get_slice_from_memview(dst, &tmp_slice)
|
|
*
|
|
* if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
|
|
* tmp = PyMem_Malloc(self.view.itemsize)
|
|
* if tmp == NULL:
|
|
*/
|
|
- __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
|
|
- if (__pyx_t_1) {
|
|
+ __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
|
|
+ if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":455
|
|
+ /* "View.MemoryView":459
|
|
*
|
|
* if <size_t>self.view.itemsize > sizeof(array):
|
|
* tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
|
|
@@ -11710,26 +11988,26 @@
|
|
*/
|
|
__pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
|
|
|
|
- /* "View.MemoryView":456
|
|
+ /* "View.MemoryView":460
|
|
* if <size_t>self.view.itemsize > sizeof(array):
|
|
* tmp = PyMem_Malloc(self.view.itemsize)
|
|
* if tmp == NULL: # <<<<<<<<<<<<<<
|
|
* raise MemoryError
|
|
* item = tmp
|
|
*/
|
|
- __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0);
|
|
- if (unlikely(__pyx_t_1)) {
|
|
+ __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
|
|
+ if (unlikely(__pyx_t_2)) {
|
|
|
|
- /* "View.MemoryView":457
|
|
+ /* "View.MemoryView":461
|
|
* tmp = PyMem_Malloc(self.view.itemsize)
|
|
* if tmp == NULL:
|
|
* raise MemoryError # <<<<<<<<<<<<<<
|
|
* item = tmp
|
|
* else:
|
|
*/
|
|
- PyErr_NoMemory(); __PYX_ERR(0, 457, __pyx_L1_error)
|
|
+ PyErr_NoMemory(); __PYX_ERR(0, 461, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":456
|
|
+ /* "View.MemoryView":460
|
|
* if <size_t>self.view.itemsize > sizeof(array):
|
|
* tmp = PyMem_Malloc(self.view.itemsize)
|
|
* if tmp == NULL: # <<<<<<<<<<<<<<
|
|
@@ -11738,7 +12016,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":458
|
|
+ /* "View.MemoryView":462
|
|
* if tmp == NULL:
|
|
* raise MemoryError
|
|
* item = tmp # <<<<<<<<<<<<<<
|
|
@@ -11747,7 +12025,7 @@
|
|
*/
|
|
__pyx_v_item = __pyx_v_tmp;
|
|
|
|
- /* "View.MemoryView":454
|
|
+ /* "View.MemoryView":458
|
|
* dst_slice = get_slice_from_memview(dst, &tmp_slice)
|
|
*
|
|
* if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
|
|
@@ -11757,7 +12035,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":460
|
|
+ /* "View.MemoryView":464
|
|
* item = tmp
|
|
* else:
|
|
* item = <void *> array # <<<<<<<<<<<<<<
|
|
@@ -11769,7 +12047,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":462
|
|
+ /* "View.MemoryView":466
|
|
* item = <void *> array
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -11778,17 +12056,17 @@
|
|
*/
|
|
/*try:*/ {
|
|
|
|
- /* "View.MemoryView":463
|
|
+ /* "View.MemoryView":467
|
|
*
|
|
* try:
|
|
* if self.dtype_is_object: # <<<<<<<<<<<<<<
|
|
* (<PyObject **> item)[0] = <PyObject *> value
|
|
* else:
|
|
*/
|
|
- __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
|
|
- if (__pyx_t_1) {
|
|
+ __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
|
|
+ if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":464
|
|
+ /* "View.MemoryView":468
|
|
* try:
|
|
* if self.dtype_is_object:
|
|
* (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
|
|
@@ -11797,7 +12075,7 @@
|
|
*/
|
|
(((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
|
|
|
|
- /* "View.MemoryView":463
|
|
+ /* "View.MemoryView":467
|
|
*
|
|
* try:
|
|
* if self.dtype_is_object: # <<<<<<<<<<<<<<
|
|
@@ -11807,7 +12085,7 @@
|
|
goto __pyx_L8;
|
|
}
|
|
|
|
- /* "View.MemoryView":466
|
|
+ /* "View.MemoryView":470
|
|
* (<PyObject **> item)[0] = <PyObject *> value
|
|
* else:
|
|
* self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
|
|
@@ -11815,34 +12093,34 @@
|
|
*
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L6_error)
|
|
- __Pyx_GOTREF(__pyx_t_2);
|
|
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
+ __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L6_error)
|
|
+ __Pyx_GOTREF(__pyx_t_3);
|
|
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
- /* "View.MemoryView":470
|
|
+ /* "View.MemoryView":474
|
|
*
|
|
*
|
|
* if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
|
|
* assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
|
|
* slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
|
|
*/
|
|
- __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
|
|
- if (__pyx_t_1) {
|
|
+ __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
|
|
+ if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":471
|
|
+ /* "View.MemoryView":475
|
|
*
|
|
* if self.view.suboffsets != NULL:
|
|
* assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
|
|
* slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
|
|
* item, self.dtype_is_object)
|
|
*/
|
|
- __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L6_error)
|
|
- __Pyx_GOTREF(__pyx_t_2);
|
|
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
+ __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L6_error)
|
|
+ __Pyx_GOTREF(__pyx_t_3);
|
|
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":470
|
|
+ /* "View.MemoryView":474
|
|
*
|
|
*
|
|
* if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
|
|
@@ -11851,7 +12129,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":472
|
|
+ /* "View.MemoryView":476
|
|
* if self.view.suboffsets != NULL:
|
|
* assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
|
|
* slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
|
|
@@ -11861,7 +12139,7 @@
|
|
__pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
|
|
}
|
|
|
|
- /* "View.MemoryView":475
|
|
+ /* "View.MemoryView":479
|
|
* item, self.dtype_is_object)
|
|
* finally:
|
|
* PyMem_Free(tmp) # <<<<<<<<<<<<<<
|
|
@@ -11877,38 +12155,38 @@
|
|
/*exception exit:*/{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
- __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
|
|
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
|
|
- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
|
|
- __Pyx_XGOTREF(__pyx_t_6);
|
|
+ __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
|
|
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
|
|
+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
__Pyx_XGOTREF(__pyx_t_10);
|
|
__Pyx_XGOTREF(__pyx_t_11);
|
|
- __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
|
|
+ __Pyx_XGOTREF(__pyx_t_12);
|
|
+ __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
|
|
{
|
|
PyMem_Free(__pyx_v_tmp);
|
|
}
|
|
if (PY_MAJOR_VERSION >= 3) {
|
|
- __Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_XGIVEREF(__pyx_t_11);
|
|
- __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
|
|
+ __Pyx_XGIVEREF(__pyx_t_12);
|
|
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
|
|
}
|
|
- __Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
- __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
|
|
- __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
|
|
- __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
|
|
+ __Pyx_XGIVEREF(__pyx_t_9);
|
|
+ __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
+ __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
|
|
+ __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
|
|
goto __pyx_L1_error;
|
|
}
|
|
__pyx_L7:;
|
|
}
|
|
|
|
- /* "View.MemoryView":445
|
|
+ /* "View.MemoryView":449
|
|
* src.ndim, dst.ndim, self.dtype_is_object)
|
|
*
|
|
* cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
|
|
@@ -11920,7 +12198,7 @@
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
- __Pyx_XDECREF(__pyx_t_2);
|
|
+ __Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
@@ -11929,7 +12207,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":477
|
|
+/* "View.MemoryView":481
|
|
* PyMem_Free(tmp)
|
|
*
|
|
* cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
|
|
@@ -11943,30 +12221,33 @@
|
|
__Pyx_RefNannyDeclarations
|
|
char *__pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("setitem_indexed", 0);
|
|
|
|
- /* "View.MemoryView":478
|
|
+ /* "View.MemoryView":482
|
|
*
|
|
* cdef setitem_indexed(self, index, value):
|
|
* cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
|
|
* self.assign_item_from_object(itemp, value)
|
|
*
|
|
*/
|
|
- __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 478, __pyx_L1_error)
|
|
+ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 482, __pyx_L1_error)
|
|
__pyx_v_itemp = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":479
|
|
+ /* "View.MemoryView":483
|
|
* cdef setitem_indexed(self, index, value):
|
|
* cdef char *itemp = self.get_item_pointer(index)
|
|
* self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp):
|
|
*/
|
|
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
|
|
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":477
|
|
+ /* "View.MemoryView":481
|
|
* PyMem_Free(tmp)
|
|
*
|
|
* cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
|
|
@@ -11987,7 +12268,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":481
|
|
+/* "View.MemoryView":485
|
|
* self.assign_item_from_object(itemp, value)
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
|
|
@@ -12012,33 +12293,36 @@
|
|
PyObject *__pyx_t_9 = NULL;
|
|
size_t __pyx_t_10;
|
|
int __pyx_t_11;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("convert_item_to_object", 0);
|
|
|
|
- /* "View.MemoryView":484
|
|
+ /* "View.MemoryView":488
|
|
* """Only used if instantiated manually by the user, or if Cython doesn't
|
|
* know how to convert the type"""
|
|
* import struct # <<<<<<<<<<<<<<
|
|
* cdef bytes bytesitem
|
|
*
|
|
*/
|
|
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_struct = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
- /* "View.MemoryView":487
|
|
+ /* "View.MemoryView":491
|
|
* cdef bytes bytesitem
|
|
*
|
|
* bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
|
|
* try:
|
|
* result = struct.unpack(self.view.format, bytesitem)
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
- /* "View.MemoryView":488
|
|
+ /* "View.MemoryView":492
|
|
*
|
|
* bytesitem = itemp[:self.view.itemsize]
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -12054,16 +12338,16 @@
|
|
__Pyx_XGOTREF(__pyx_t_4);
|
|
/*try:*/ {
|
|
|
|
- /* "View.MemoryView":489
|
|
+ /* "View.MemoryView":493
|
|
* bytesitem = itemp[:self.view.itemsize]
|
|
* try:
|
|
* result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
|
|
* except struct.error:
|
|
* raise ValueError("Unable to convert item to object")
|
|
*/
|
|
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L3_error)
|
|
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L3_error)
|
|
+ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_8 = 0;
|
|
@@ -12080,7 +12364,7 @@
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_5)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
|
|
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L3_error)
|
|
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -12089,14 +12373,14 @@
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
|
|
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L3_error)
|
|
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 489, __pyx_L3_error)
|
|
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 493, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
@@ -12107,7 +12391,7 @@
|
|
__Pyx_GIVEREF(__pyx_v_bytesitem);
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
|
|
__pyx_t_6 = 0;
|
|
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L3_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
@@ -12115,7 +12399,7 @@
|
|
__pyx_v_result = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
- /* "View.MemoryView":488
|
|
+ /* "View.MemoryView":492
|
|
*
|
|
* bytesitem = itemp[:self.view.itemsize]
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -12124,7 +12408,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":493
|
|
+ /* "View.MemoryView":497
|
|
* raise ValueError("Unable to convert item to object")
|
|
* else:
|
|
* if len(self.view.format) == 1: # <<<<<<<<<<<<<<
|
|
@@ -12136,7 +12420,7 @@
|
|
__pyx_t_11 = ((__pyx_t_10 == 1) != 0);
|
|
if (__pyx_t_11) {
|
|
|
|
- /* "View.MemoryView":494
|
|
+ /* "View.MemoryView":498
|
|
* else:
|
|
* if len(self.view.format) == 1:
|
|
* return result[0] # <<<<<<<<<<<<<<
|
|
@@ -12144,13 +12428,13 @@
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L5_except_error)
|
|
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L5_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L6_except_return;
|
|
|
|
- /* "View.MemoryView":493
|
|
+ /* "View.MemoryView":497
|
|
* raise ValueError("Unable to convert item to object")
|
|
* else:
|
|
* if len(self.view.format) == 1: # <<<<<<<<<<<<<<
|
|
@@ -12159,7 +12443,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":495
|
|
+ /* "View.MemoryView":499
|
|
* if len(self.view.format) == 1:
|
|
* return result[0]
|
|
* return result # <<<<<<<<<<<<<<
|
|
@@ -12178,7 +12462,7 @@
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
|
|
- /* "View.MemoryView":490
|
|
+ /* "View.MemoryView":494
|
|
* try:
|
|
* result = struct.unpack(self.view.format, bytesitem)
|
|
* except struct.error: # <<<<<<<<<<<<<<
|
|
@@ -12186,7 +12470,7 @@
|
|
* else:
|
|
*/
|
|
__Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
|
|
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L5_except_error)
|
|
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L5_except_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -12194,28 +12478,28 @@
|
|
__pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
|
|
if (__pyx_t_8) {
|
|
__Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
- if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 490, __pyx_L5_except_error)
|
|
+ if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 494, __pyx_L5_except_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
|
|
- /* "View.MemoryView":491
|
|
+ /* "View.MemoryView":495
|
|
* result = struct.unpack(self.view.format, bytesitem)
|
|
* except struct.error:
|
|
* raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
|
|
* else:
|
|
* if len(self.view.format) == 1:
|
|
*/
|
|
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L5_except_error)
|
|
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L5_except_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
- __PYX_ERR(0, 491, __pyx_L5_except_error)
|
|
+ __PYX_ERR(0, 495, __pyx_L5_except_error)
|
|
}
|
|
goto __pyx_L5_except_error;
|
|
__pyx_L5_except_error:;
|
|
|
|
- /* "View.MemoryView":488
|
|
+ /* "View.MemoryView":492
|
|
*
|
|
* bytesitem = itemp[:self.view.itemsize]
|
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -12235,7 +12519,7 @@
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":481
|
|
+ /* "View.MemoryView":485
|
|
* self.assign_item_from_object(itemp, value)
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
|
|
@@ -12261,7 +12545,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":497
|
|
+/* "View.MemoryView":501
|
|
* return result
|
|
*
|
|
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
|
|
@@ -12290,21 +12574,24 @@
|
|
char *__pyx_t_12;
|
|
char *__pyx_t_13;
|
|
char *__pyx_t_14;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("assign_item_from_object", 0);
|
|
|
|
- /* "View.MemoryView":500
|
|
+ /* "View.MemoryView":504
|
|
* """Only used if instantiated manually by the user, or if Cython doesn't
|
|
* know how to convert the type"""
|
|
* import struct # <<<<<<<<<<<<<<
|
|
* cdef char c
|
|
* cdef bytes bytesvalue
|
|
*/
|
|
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_struct = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
- /* "View.MemoryView":505
|
|
+ /* "View.MemoryView":509
|
|
* cdef Py_ssize_t i
|
|
*
|
|
* if isinstance(value, tuple): # <<<<<<<<<<<<<<
|
|
@@ -12315,37 +12602,37 @@
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
- /* "View.MemoryView":506
|
|
+ /* "View.MemoryView":510
|
|
*
|
|
* if isinstance(value, tuple):
|
|
* bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* bytesvalue = struct.pack(self.view.format, value)
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
- __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
- __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
- if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 506, __pyx_L1_error)
|
|
+ if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 510, __pyx_L1_error)
|
|
__pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
- /* "View.MemoryView":505
|
|
+ /* "View.MemoryView":509
|
|
* cdef Py_ssize_t i
|
|
*
|
|
* if isinstance(value, tuple): # <<<<<<<<<<<<<<
|
|
@@ -12355,7 +12642,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":508
|
|
+ /* "View.MemoryView":512
|
|
* bytesvalue = struct.pack(self.view.format, *value)
|
|
* else:
|
|
* bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
|
|
@@ -12363,9 +12650,9 @@
|
|
* for i, c in enumerate(bytesvalue):
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_5 = NULL;
|
|
__pyx_t_7 = 0;
|
|
@@ -12382,7 +12669,7 @@
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
|
|
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -12391,14 +12678,14 @@
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
|
|
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (__pyx_t_5) {
|
|
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
|
|
@@ -12409,18 +12696,18 @@
|
|
__Pyx_GIVEREF(__pyx_v_value);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
|
|
__pyx_t_1 = 0;
|
|
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
- if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 508, __pyx_L1_error)
|
|
+ if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 512, __pyx_L1_error)
|
|
__pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":510
|
|
+ /* "View.MemoryView":514
|
|
* bytesvalue = struct.pack(self.view.format, value)
|
|
*
|
|
* for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
|
|
@@ -12430,7 +12717,7 @@
|
|
__pyx_t_9 = 0;
|
|
if (unlikely(__pyx_v_bytesvalue == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
|
|
- __PYX_ERR(0, 510, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 514, __pyx_L1_error)
|
|
}
|
|
__Pyx_INCREF(__pyx_v_bytesvalue);
|
|
__pyx_t_10 = __pyx_v_bytesvalue;
|
|
@@ -12440,7 +12727,7 @@
|
|
__pyx_t_11 = __pyx_t_14;
|
|
__pyx_v_c = (__pyx_t_11[0]);
|
|
|
|
- /* "View.MemoryView":511
|
|
+ /* "View.MemoryView":515
|
|
*
|
|
* for i, c in enumerate(bytesvalue):
|
|
* itemp[i] = c # <<<<<<<<<<<<<<
|
|
@@ -12449,7 +12736,7 @@
|
|
*/
|
|
__pyx_v_i = __pyx_t_9;
|
|
|
|
- /* "View.MemoryView":510
|
|
+ /* "View.MemoryView":514
|
|
* bytesvalue = struct.pack(self.view.format, value)
|
|
*
|
|
* for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
|
|
@@ -12458,7 +12745,7 @@
|
|
*/
|
|
__pyx_t_9 = (__pyx_t_9 + 1);
|
|
|
|
- /* "View.MemoryView":511
|
|
+ /* "View.MemoryView":515
|
|
*
|
|
* for i, c in enumerate(bytesvalue):
|
|
* itemp[i] = c # <<<<<<<<<<<<<<
|
|
@@ -12469,7 +12756,7 @@
|
|
}
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
|
|
- /* "View.MemoryView":497
|
|
+ /* "View.MemoryView":501
|
|
* return result
|
|
*
|
|
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
|
|
@@ -12497,7 +12784,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":514
|
|
+/* "View.MemoryView":518
|
|
*
|
|
* @cname('getbuffer')
|
|
* def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
|
|
@@ -12529,6 +12816,9 @@
|
|
void *__pyx_t_6;
|
|
int __pyx_t_7;
|
|
Py_ssize_t __pyx_t_8;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
if (__pyx_v_info == NULL) {
|
|
PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
|
|
return -1;
|
|
@@ -12537,7 +12827,7 @@
|
|
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(__pyx_v_info->obj);
|
|
|
|
- /* "View.MemoryView":515
|
|
+ /* "View.MemoryView":519
|
|
* @cname('getbuffer')
|
|
* def __getbuffer__(self, Py_buffer *info, int flags):
|
|
* if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
|
|
@@ -12555,20 +12845,20 @@
|
|
__pyx_L4_bool_binop_done:;
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
- /* "View.MemoryView":516
|
|
+ /* "View.MemoryView":520
|
|
* def __getbuffer__(self, Py_buffer *info, int flags):
|
|
* if flags & PyBUF_WRITABLE and self.view.readonly:
|
|
* raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
|
|
*
|
|
* if flags & PyBUF_ND:
|
|
*/
|
|
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
- __PYX_ERR(0, 516, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 520, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":515
|
|
+ /* "View.MemoryView":519
|
|
* @cname('getbuffer')
|
|
* def __getbuffer__(self, Py_buffer *info, int flags):
|
|
* if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
|
|
@@ -12577,7 +12867,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":518
|
|
+ /* "View.MemoryView":522
|
|
* raise ValueError("Cannot create writable memory view from read-only memoryview")
|
|
*
|
|
* if flags & PyBUF_ND: # <<<<<<<<<<<<<<
|
|
@@ -12587,7 +12877,7 @@
|
|
__pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":519
|
|
+ /* "View.MemoryView":523
|
|
*
|
|
* if flags & PyBUF_ND:
|
|
* info.shape = self.view.shape # <<<<<<<<<<<<<<
|
|
@@ -12597,7 +12887,7 @@
|
|
__pyx_t_4 = __pyx_v_self->view.shape;
|
|
__pyx_v_info->shape = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":518
|
|
+ /* "View.MemoryView":522
|
|
* raise ValueError("Cannot create writable memory view from read-only memoryview")
|
|
*
|
|
* if flags & PyBUF_ND: # <<<<<<<<<<<<<<
|
|
@@ -12607,7 +12897,7 @@
|
|
goto __pyx_L6;
|
|
}
|
|
|
|
- /* "View.MemoryView":521
|
|
+ /* "View.MemoryView":525
|
|
* info.shape = self.view.shape
|
|
* else:
|
|
* info.shape = NULL # <<<<<<<<<<<<<<
|
|
@@ -12619,7 +12909,7 @@
|
|
}
|
|
__pyx_L6:;
|
|
|
|
- /* "View.MemoryView":523
|
|
+ /* "View.MemoryView":527
|
|
* info.shape = NULL
|
|
*
|
|
* if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
|
|
@@ -12629,7 +12919,7 @@
|
|
__pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":524
|
|
+ /* "View.MemoryView":528
|
|
*
|
|
* if flags & PyBUF_STRIDES:
|
|
* info.strides = self.view.strides # <<<<<<<<<<<<<<
|
|
@@ -12639,7 +12929,7 @@
|
|
__pyx_t_4 = __pyx_v_self->view.strides;
|
|
__pyx_v_info->strides = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":523
|
|
+ /* "View.MemoryView":527
|
|
* info.shape = NULL
|
|
*
|
|
* if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
|
|
@@ -12649,7 +12939,7 @@
|
|
goto __pyx_L7;
|
|
}
|
|
|
|
- /* "View.MemoryView":526
|
|
+ /* "View.MemoryView":530
|
|
* info.strides = self.view.strides
|
|
* else:
|
|
* info.strides = NULL # <<<<<<<<<<<<<<
|
|
@@ -12661,7 +12951,7 @@
|
|
}
|
|
__pyx_L7:;
|
|
|
|
- /* "View.MemoryView":528
|
|
+ /* "View.MemoryView":532
|
|
* info.strides = NULL
|
|
*
|
|
* if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
|
|
@@ -12671,7 +12961,7 @@
|
|
__pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":529
|
|
+ /* "View.MemoryView":533
|
|
*
|
|
* if flags & PyBUF_INDIRECT:
|
|
* info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
|
|
@@ -12681,7 +12971,7 @@
|
|
__pyx_t_4 = __pyx_v_self->view.suboffsets;
|
|
__pyx_v_info->suboffsets = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":528
|
|
+ /* "View.MemoryView":532
|
|
* info.strides = NULL
|
|
*
|
|
* if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
|
|
@@ -12691,7 +12981,7 @@
|
|
goto __pyx_L8;
|
|
}
|
|
|
|
- /* "View.MemoryView":531
|
|
+ /* "View.MemoryView":535
|
|
* info.suboffsets = self.view.suboffsets
|
|
* else:
|
|
* info.suboffsets = NULL # <<<<<<<<<<<<<<
|
|
@@ -12703,7 +12993,7 @@
|
|
}
|
|
__pyx_L8:;
|
|
|
|
- /* "View.MemoryView":533
|
|
+ /* "View.MemoryView":537
|
|
* info.suboffsets = NULL
|
|
*
|
|
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
|
|
@@ -12713,7 +13003,7 @@
|
|
__pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":534
|
|
+ /* "View.MemoryView":538
|
|
*
|
|
* if flags & PyBUF_FORMAT:
|
|
* info.format = self.view.format # <<<<<<<<<<<<<<
|
|
@@ -12723,7 +13013,7 @@
|
|
__pyx_t_5 = __pyx_v_self->view.format;
|
|
__pyx_v_info->format = __pyx_t_5;
|
|
|
|
- /* "View.MemoryView":533
|
|
+ /* "View.MemoryView":537
|
|
* info.suboffsets = NULL
|
|
*
|
|
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
|
|
@@ -12733,7 +13023,7 @@
|
|
goto __pyx_L9;
|
|
}
|
|
|
|
- /* "View.MemoryView":536
|
|
+ /* "View.MemoryView":540
|
|
* info.format = self.view.format
|
|
* else:
|
|
* info.format = NULL # <<<<<<<<<<<<<<
|
|
@@ -12745,7 +13035,7 @@
|
|
}
|
|
__pyx_L9:;
|
|
|
|
- /* "View.MemoryView":538
|
|
+ /* "View.MemoryView":542
|
|
* info.format = NULL
|
|
*
|
|
* info.buf = self.view.buf # <<<<<<<<<<<<<<
|
|
@@ -12755,7 +13045,7 @@
|
|
__pyx_t_6 = __pyx_v_self->view.buf;
|
|
__pyx_v_info->buf = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":539
|
|
+ /* "View.MemoryView":543
|
|
*
|
|
* info.buf = self.view.buf
|
|
* info.ndim = self.view.ndim # <<<<<<<<<<<<<<
|
|
@@ -12765,7 +13055,7 @@
|
|
__pyx_t_7 = __pyx_v_self->view.ndim;
|
|
__pyx_v_info->ndim = __pyx_t_7;
|
|
|
|
- /* "View.MemoryView":540
|
|
+ /* "View.MemoryView":544
|
|
* info.buf = self.view.buf
|
|
* info.ndim = self.view.ndim
|
|
* info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -12775,7 +13065,7 @@
|
|
__pyx_t_8 = __pyx_v_self->view.itemsize;
|
|
__pyx_v_info->itemsize = __pyx_t_8;
|
|
|
|
- /* "View.MemoryView":541
|
|
+ /* "View.MemoryView":545
|
|
* info.ndim = self.view.ndim
|
|
* info.itemsize = self.view.itemsize
|
|
* info.len = self.view.len # <<<<<<<<<<<<<<
|
|
@@ -12785,7 +13075,7 @@
|
|
__pyx_t_8 = __pyx_v_self->view.len;
|
|
__pyx_v_info->len = __pyx_t_8;
|
|
|
|
- /* "View.MemoryView":542
|
|
+ /* "View.MemoryView":546
|
|
* info.itemsize = self.view.itemsize
|
|
* info.len = self.view.len
|
|
* info.readonly = self.view.readonly # <<<<<<<<<<<<<<
|
|
@@ -12795,7 +13085,7 @@
|
|
__pyx_t_1 = __pyx_v_self->view.readonly;
|
|
__pyx_v_info->readonly = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":543
|
|
+ /* "View.MemoryView":547
|
|
* info.len = self.view.len
|
|
* info.readonly = self.view.readonly
|
|
* info.obj = self # <<<<<<<<<<<<<<
|
|
@@ -12808,7 +13098,7 @@
|
|
__Pyx_DECREF(__pyx_v_info->obj);
|
|
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
|
|
|
|
- /* "View.MemoryView":514
|
|
+ /* "View.MemoryView":518
|
|
*
|
|
* @cname('getbuffer')
|
|
* def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
|
|
@@ -12838,7 +13128,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":549
|
|
+/* "View.MemoryView":553
|
|
*
|
|
* @property
|
|
* def T(self): # <<<<<<<<<<<<<<
|
|
@@ -12865,31 +13155,34 @@
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":550
|
|
+ /* "View.MemoryView":554
|
|
* @property
|
|
* def T(self):
|
|
* cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
|
|
* transpose_memslice(&result.from_slice)
|
|
* return result
|
|
*/
|
|
- __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 550, __pyx_L1_error)
|
|
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 554, __pyx_L1_error)
|
|
__pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
- /* "View.MemoryView":551
|
|
+ /* "View.MemoryView":555
|
|
* def T(self):
|
|
* cdef _memoryviewslice result = memoryview_copy(self)
|
|
* transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
|
|
* return result
|
|
*
|
|
*/
|
|
- __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 551, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 555, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":552
|
|
+ /* "View.MemoryView":556
|
|
* cdef _memoryviewslice result = memoryview_copy(self)
|
|
* transpose_memslice(&result.from_slice)
|
|
* return result # <<<<<<<<<<<<<<
|
|
@@ -12901,7 +13194,7 @@
|
|
__pyx_r = ((PyObject *)__pyx_v_result);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":549
|
|
+ /* "View.MemoryView":553
|
|
*
|
|
* @property
|
|
* def T(self): # <<<<<<<<<<<<<<
|
|
@@ -12921,7 +13214,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":555
|
|
+/* "View.MemoryView":559
|
|
*
|
|
* @property
|
|
* def base(self): # <<<<<<<<<<<<<<
|
|
@@ -12947,7 +13240,7 @@
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":556
|
|
+ /* "View.MemoryView":560
|
|
* @property
|
|
* def base(self):
|
|
* return self.obj # <<<<<<<<<<<<<<
|
|
@@ -12959,7 +13252,7 @@
|
|
__pyx_r = __pyx_v_self->obj;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":555
|
|
+ /* "View.MemoryView":559
|
|
*
|
|
* @property
|
|
* def base(self): # <<<<<<<<<<<<<<
|
|
@@ -12974,7 +13267,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":559
|
|
+/* "View.MemoryView":563
|
|
*
|
|
* @property
|
|
* def shape(self): # <<<<<<<<<<<<<<
|
|
@@ -13004,9 +13297,12 @@
|
|
Py_ssize_t *__pyx_t_3;
|
|
Py_ssize_t *__pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":560
|
|
+ /* "View.MemoryView":564
|
|
* @property
|
|
* def shape(self):
|
|
* return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
|
|
@@ -13014,25 +13310,25 @@
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
|
|
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
|
|
for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
__pyx_v_length = (__pyx_t_2[0]);
|
|
- __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
|
|
+ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 560, __pyx_L1_error)
|
|
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 564, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
}
|
|
- __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
|
|
+ __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_5;
|
|
__pyx_t_5 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":559
|
|
+ /* "View.MemoryView":563
|
|
*
|
|
* @property
|
|
* def shape(self): # <<<<<<<<<<<<<<
|
|
@@ -13052,7 +13348,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":563
|
|
+/* "View.MemoryView":567
|
|
*
|
|
* @property
|
|
* def strides(self): # <<<<<<<<<<<<<<
|
|
@@ -13083,9 +13379,12 @@
|
|
Py_ssize_t *__pyx_t_4;
|
|
Py_ssize_t *__pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":564
|
|
+ /* "View.MemoryView":568
|
|
* @property
|
|
* def strides(self):
|
|
* if self.view.strides == NULL: # <<<<<<<<<<<<<<
|
|
@@ -13095,20 +13394,20 @@
|
|
__pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
- /* "View.MemoryView":566
|
|
+ /* "View.MemoryView":570
|
|
* if self.view.strides == NULL:
|
|
*
|
|
* raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
|
|
*
|
|
* return tuple([stride for stride in self.view.strides[:self.view.ndim]])
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
- __PYX_ERR(0, 566, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 570, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":564
|
|
+ /* "View.MemoryView":568
|
|
* @property
|
|
* def strides(self):
|
|
* if self.view.strides == NULL: # <<<<<<<<<<<<<<
|
|
@@ -13117,7 +13416,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":568
|
|
+ /* "View.MemoryView":572
|
|
* raise ValueError("Buffer view does not expose strides")
|
|
*
|
|
* return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
|
|
@@ -13125,25 +13424,25 @@
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
|
|
for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_v_stride = (__pyx_t_3[0]);
|
|
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
|
|
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 568, __pyx_L1_error)
|
|
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 572, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
- __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
|
|
+ __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":563
|
|
+ /* "View.MemoryView":567
|
|
*
|
|
* @property
|
|
* def strides(self): # <<<<<<<<<<<<<<
|
|
@@ -13163,7 +13462,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":571
|
|
+/* "View.MemoryView":575
|
|
*
|
|
* @property
|
|
* def suboffsets(self): # <<<<<<<<<<<<<<
|
|
@@ -13194,9 +13493,12 @@
|
|
Py_ssize_t *__pyx_t_4;
|
|
Py_ssize_t *__pyx_t_5;
|
|
Py_ssize_t *__pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":572
|
|
+ /* "View.MemoryView":576
|
|
* @property
|
|
* def suboffsets(self):
|
|
* if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
|
|
@@ -13206,7 +13508,7 @@
|
|
__pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":573
|
|
+ /* "View.MemoryView":577
|
|
* def suboffsets(self):
|
|
* if self.view.suboffsets == NULL:
|
|
* return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
|
|
@@ -13214,16 +13516,16 @@
|
|
* return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__21, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__21, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":572
|
|
+ /* "View.MemoryView":576
|
|
* @property
|
|
* def suboffsets(self):
|
|
* if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
|
|
@@ -13232,7 +13534,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":575
|
|
+ /* "View.MemoryView":579
|
|
* return (-1,) * self.view.ndim
|
|
*
|
|
* return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
|
|
@@ -13240,25 +13542,25 @@
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
|
|
for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
|
|
__pyx_t_4 = __pyx_t_6;
|
|
__pyx_v_suboffset = (__pyx_t_4[0]);
|
|
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 575, __pyx_L1_error)
|
|
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 579, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
}
|
|
- __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":571
|
|
+ /* "View.MemoryView":575
|
|
*
|
|
* @property
|
|
* def suboffsets(self): # <<<<<<<<<<<<<<
|
|
@@ -13278,7 +13580,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":578
|
|
+/* "View.MemoryView":582
|
|
*
|
|
* @property
|
|
* def ndim(self): # <<<<<<<<<<<<<<
|
|
@@ -13303,9 +13605,12 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":579
|
|
+ /* "View.MemoryView":583
|
|
* @property
|
|
* def ndim(self):
|
|
* return self.view.ndim # <<<<<<<<<<<<<<
|
|
@@ -13313,13 +13618,13 @@
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":578
|
|
+ /* "View.MemoryView":582
|
|
*
|
|
* @property
|
|
* def ndim(self): # <<<<<<<<<<<<<<
|
|
@@ -13338,7 +13643,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":582
|
|
+/* "View.MemoryView":586
|
|
*
|
|
* @property
|
|
* def itemsize(self): # <<<<<<<<<<<<<<
|
|
@@ -13363,9 +13668,12 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":583
|
|
+ /* "View.MemoryView":587
|
|
* @property
|
|
* def itemsize(self):
|
|
* return self.view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -13373,13 +13681,13 @@
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
|
|
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":582
|
|
+ /* "View.MemoryView":586
|
|
*
|
|
* @property
|
|
* def itemsize(self): # <<<<<<<<<<<<<<
|
|
@@ -13398,7 +13706,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":586
|
|
+/* "View.MemoryView":590
|
|
*
|
|
* @property
|
|
* def nbytes(self): # <<<<<<<<<<<<<<
|
|
@@ -13425,9 +13733,12 @@
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":587
|
|
+ /* "View.MemoryView":591
|
|
* @property
|
|
* def nbytes(self):
|
|
* return self.size * self.view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -13435,11 +13746,11 @@
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -13447,7 +13758,7 @@
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":586
|
|
+ /* "View.MemoryView":590
|
|
*
|
|
* @property
|
|
* def nbytes(self): # <<<<<<<<<<<<<<
|
|
@@ -13468,7 +13779,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":590
|
|
+/* "View.MemoryView":594
|
|
*
|
|
* @property
|
|
* def size(self): # <<<<<<<<<<<<<<
|
|
@@ -13500,9 +13811,12 @@
|
|
Py_ssize_t *__pyx_t_4;
|
|
Py_ssize_t *__pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":591
|
|
+ /* "View.MemoryView":595
|
|
* @property
|
|
* def size(self):
|
|
* if self._size is None: # <<<<<<<<<<<<<<
|
|
@@ -13513,7 +13827,7 @@
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":592
|
|
+ /* "View.MemoryView":596
|
|
* def size(self):
|
|
* if self._size is None:
|
|
* result = 1 # <<<<<<<<<<<<<<
|
|
@@ -13523,7 +13837,7 @@
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
__pyx_v_result = __pyx_int_1;
|
|
|
|
- /* "View.MemoryView":594
|
|
+ /* "View.MemoryView":598
|
|
* result = 1
|
|
*
|
|
* for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
|
|
@@ -13533,25 +13847,25 @@
|
|
__pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
|
|
for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
- __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error)
|
|
+ __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
- /* "View.MemoryView":595
|
|
+ /* "View.MemoryView":599
|
|
*
|
|
* for length in self.view.shape[:self.view.ndim]:
|
|
* result *= length # <<<<<<<<<<<<<<
|
|
*
|
|
* self._size = result
|
|
*/
|
|
- __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
|
|
+ __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
}
|
|
|
|
- /* "View.MemoryView":597
|
|
+ /* "View.MemoryView":601
|
|
* result *= length
|
|
*
|
|
* self._size = result # <<<<<<<<<<<<<<
|
|
@@ -13564,7 +13878,7 @@
|
|
__Pyx_DECREF(__pyx_v_self->_size);
|
|
__pyx_v_self->_size = __pyx_v_result;
|
|
|
|
- /* "View.MemoryView":591
|
|
+ /* "View.MemoryView":595
|
|
* @property
|
|
* def size(self):
|
|
* if self._size is None: # <<<<<<<<<<<<<<
|
|
@@ -13573,7 +13887,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":599
|
|
+ /* "View.MemoryView":603
|
|
* self._size = result
|
|
*
|
|
* return self._size # <<<<<<<<<<<<<<
|
|
@@ -13585,7 +13899,7 @@
|
|
__pyx_r = __pyx_v_self->_size;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":590
|
|
+ /* "View.MemoryView":594
|
|
*
|
|
* @property
|
|
* def size(self): # <<<<<<<<<<<<<<
|
|
@@ -13606,7 +13920,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":601
|
|
+/* "View.MemoryView":605
|
|
* return self._size
|
|
*
|
|
* def __len__(self): # <<<<<<<<<<<<<<
|
|
@@ -13633,7 +13947,7 @@
|
|
int __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("__len__", 0);
|
|
|
|
- /* "View.MemoryView":602
|
|
+ /* "View.MemoryView":606
|
|
*
|
|
* def __len__(self):
|
|
* if self.view.ndim >= 1: # <<<<<<<<<<<<<<
|
|
@@ -13643,7 +13957,7 @@
|
|
__pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":603
|
|
+ /* "View.MemoryView":607
|
|
* def __len__(self):
|
|
* if self.view.ndim >= 1:
|
|
* return self.view.shape[0] # <<<<<<<<<<<<<<
|
|
@@ -13653,7 +13967,7 @@
|
|
__pyx_r = (__pyx_v_self->view.shape[0]);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":602
|
|
+ /* "View.MemoryView":606
|
|
*
|
|
* def __len__(self):
|
|
* if self.view.ndim >= 1: # <<<<<<<<<<<<<<
|
|
@@ -13662,7 +13976,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":605
|
|
+ /* "View.MemoryView":609
|
|
* return self.view.shape[0]
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
@@ -13672,7 +13986,7 @@
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":601
|
|
+ /* "View.MemoryView":605
|
|
* return self._size
|
|
*
|
|
* def __len__(self): # <<<<<<<<<<<<<<
|
|
@@ -13686,7 +14000,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":607
|
|
+/* "View.MemoryView":611
|
|
* return 0
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
@@ -13713,9 +14027,12 @@
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__repr__", 0);
|
|
|
|
- /* "View.MemoryView":608
|
|
+ /* "View.MemoryView":612
|
|
*
|
|
* def __repr__(self):
|
|
* return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
|
|
@@ -13723,33 +14040,33 @@
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":609
|
|
+ /* "View.MemoryView":613
|
|
* def __repr__(self):
|
|
* return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
|
|
* id(self)) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
|
|
- /* "View.MemoryView":608
|
|
+ /* "View.MemoryView":612
|
|
*
|
|
* def __repr__(self):
|
|
* return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
|
|
* id(self))
|
|
*
|
|
*/
|
|
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
|
|
@@ -13757,14 +14074,14 @@
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
- __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":607
|
|
+ /* "View.MemoryView":611
|
|
* return 0
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
@@ -13785,7 +14102,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":611
|
|
+/* "View.MemoryView":615
|
|
* id(self))
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
@@ -13811,9 +14128,12 @@
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
- /* "View.MemoryView":612
|
|
+ /* "View.MemoryView":616
|
|
*
|
|
* def __str__(self):
|
|
* return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
|
|
@@ -13821,27 +14141,27 @@
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
- __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":611
|
|
+ /* "View.MemoryView":615
|
|
* id(self))
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
@@ -13861,7 +14181,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":615
|
|
+/* "View.MemoryView":619
|
|
*
|
|
*
|
|
* def is_c_contig(self): # <<<<<<<<<<<<<<
|
|
@@ -13887,19 +14207,24 @@
|
|
__Pyx_memviewslice __pyx_v_tmp;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
- PyObject *__pyx_t_1 = NULL;
|
|
+ __Pyx_memviewslice *__pyx_t_1;
|
|
+ PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("is_c_contig", 0);
|
|
|
|
- /* "View.MemoryView":618
|
|
+ /* "View.MemoryView":622
|
|
* cdef __Pyx_memviewslice *mslice
|
|
* cdef __Pyx_memviewslice tmp
|
|
* mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
|
|
* return slice_is_contig(mslice[0], 'C', self.view.ndim)
|
|
*
|
|
*/
|
|
- __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
|
|
+ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 622, __pyx_L1_error)
|
|
+ __pyx_v_mslice = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":619
|
|
+ /* "View.MemoryView":623
|
|
* cdef __Pyx_memviewslice tmp
|
|
* mslice = get_slice_from_memview(self, &tmp)
|
|
* return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
|
|
@@ -13907,13 +14232,13 @@
|
|
* def is_f_contig(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
|
|
- __Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_r = __pyx_t_1;
|
|
- __pyx_t_1 = 0;
|
|
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)
|
|
+ __Pyx_GOTREF(__pyx_t_2);
|
|
+ __pyx_r = __pyx_t_2;
|
|
+ __pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":615
|
|
+ /* "View.MemoryView":619
|
|
*
|
|
*
|
|
* def is_c_contig(self): # <<<<<<<<<<<<<<
|
|
@@ -13923,7 +14248,7 @@
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
- __Pyx_XDECREF(__pyx_t_1);
|
|
+ __Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
@@ -13932,7 +14257,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":621
|
|
+/* "View.MemoryView":625
|
|
* return slice_is_contig(mslice[0], 'C', self.view.ndim)
|
|
*
|
|
* def is_f_contig(self): # <<<<<<<<<<<<<<
|
|
@@ -13958,19 +14283,24 @@
|
|
__Pyx_memviewslice __pyx_v_tmp;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
- PyObject *__pyx_t_1 = NULL;
|
|
+ __Pyx_memviewslice *__pyx_t_1;
|
|
+ PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("is_f_contig", 0);
|
|
|
|
- /* "View.MemoryView":624
|
|
+ /* "View.MemoryView":628
|
|
* cdef __Pyx_memviewslice *mslice
|
|
* cdef __Pyx_memviewslice tmp
|
|
* mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
|
|
* return slice_is_contig(mslice[0], 'F', self.view.ndim)
|
|
*
|
|
*/
|
|
- __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
|
|
+ __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 628, __pyx_L1_error)
|
|
+ __pyx_v_mslice = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":625
|
|
+ /* "View.MemoryView":629
|
|
* cdef __Pyx_memviewslice tmp
|
|
* mslice = get_slice_from_memview(self, &tmp)
|
|
* return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
|
|
@@ -13978,13 +14308,13 @@
|
|
* def copy(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
|
|
- __Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_r = __pyx_t_1;
|
|
- __pyx_t_1 = 0;
|
|
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
|
|
+ __Pyx_GOTREF(__pyx_t_2);
|
|
+ __pyx_r = __pyx_t_2;
|
|
+ __pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":621
|
|
+ /* "View.MemoryView":625
|
|
* return slice_is_contig(mslice[0], 'C', self.view.ndim)
|
|
*
|
|
* def is_f_contig(self): # <<<<<<<<<<<<<<
|
|
@@ -13994,7 +14324,7 @@
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
- __Pyx_XDECREF(__pyx_t_1);
|
|
+ __Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
@@ -14003,7 +14333,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":627
|
|
+/* "View.MemoryView":631
|
|
* return slice_is_contig(mslice[0], 'F', self.view.ndim)
|
|
*
|
|
* def copy(self): # <<<<<<<<<<<<<<
|
|
@@ -14031,9 +14361,12 @@
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_memviewslice __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("copy", 0);
|
|
|
|
- /* "View.MemoryView":629
|
|
+ /* "View.MemoryView":633
|
|
* def copy(self):
|
|
* cdef __Pyx_memviewslice mslice
|
|
* cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
|
|
@@ -14042,7 +14375,7 @@
|
|
*/
|
|
__pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
|
|
|
|
- /* "View.MemoryView":631
|
|
+ /* "View.MemoryView":635
|
|
* cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
|
|
*
|
|
* slice_copy(self, &mslice) # <<<<<<<<<<<<<<
|
|
@@ -14051,17 +14384,17 @@
|
|
*/
|
|
__pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
|
|
|
|
- /* "View.MemoryView":632
|
|
+ /* "View.MemoryView":636
|
|
*
|
|
* slice_copy(self, &mslice)
|
|
* mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
|
|
* self.view.itemsize,
|
|
* flags|PyBUF_C_CONTIGUOUS,
|
|
*/
|
|
- __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
|
|
__pyx_v_mslice = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":637
|
|
+ /* "View.MemoryView":641
|
|
* self.dtype_is_object)
|
|
*
|
|
* return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
|
|
@@ -14069,13 +14402,13 @@
|
|
* def copy_fortran(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":627
|
|
+ /* "View.MemoryView":631
|
|
* return slice_is_contig(mslice[0], 'F', self.view.ndim)
|
|
*
|
|
* def copy(self): # <<<<<<<<<<<<<<
|
|
@@ -14094,7 +14427,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":639
|
|
+/* "View.MemoryView":643
|
|
* return memoryview_copy_from_slice(self, &mslice)
|
|
*
|
|
* def copy_fortran(self): # <<<<<<<<<<<<<<
|
|
@@ -14123,9 +14456,12 @@
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_memviewslice __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("copy_fortran", 0);
|
|
|
|
- /* "View.MemoryView":641
|
|
+ /* "View.MemoryView":645
|
|
* def copy_fortran(self):
|
|
* cdef __Pyx_memviewslice src, dst
|
|
* cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
|
|
@@ -14134,7 +14470,7 @@
|
|
*/
|
|
__pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
|
|
|
|
- /* "View.MemoryView":643
|
|
+ /* "View.MemoryView":647
|
|
* cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
|
|
*
|
|
* slice_copy(self, &src) # <<<<<<<<<<<<<<
|
|
@@ -14143,17 +14479,17 @@
|
|
*/
|
|
__pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
|
|
|
|
- /* "View.MemoryView":644
|
|
+ /* "View.MemoryView":648
|
|
*
|
|
* slice_copy(self, &src)
|
|
* dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
|
|
* self.view.itemsize,
|
|
* flags|PyBUF_F_CONTIGUOUS,
|
|
*/
|
|
- __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error)
|
|
__pyx_v_dst = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":649
|
|
+ /* "View.MemoryView":653
|
|
* self.dtype_is_object)
|
|
*
|
|
* return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
|
|
@@ -14161,13 +14497,13 @@
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":639
|
|
+ /* "View.MemoryView":643
|
|
* return memoryview_copy_from_slice(self, &mslice)
|
|
*
|
|
* def copy_fortran(self): # <<<<<<<<<<<<<<
|
|
@@ -14209,6 +14545,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":2
|
|
@@ -14263,6 +14602,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -14293,7 +14635,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":653
|
|
+/* "View.MemoryView":657
|
|
*
|
|
* @cname('__pyx_memoryview_new')
|
|
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
|
|
@@ -14308,20 +14650,23 @@
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
|
|
|
|
- /* "View.MemoryView":654
|
|
+ /* "View.MemoryView":658
|
|
* @cname('__pyx_memoryview_new')
|
|
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
|
|
* cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
|
|
* result.typeinfo = typeinfo
|
|
* return result
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_o);
|
|
__Pyx_GIVEREF(__pyx_v_o);
|
|
@@ -14332,13 +14677,13 @@
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":655
|
|
+ /* "View.MemoryView":659
|
|
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
|
|
* cdef memoryview result = memoryview(o, flags, dtype_is_object)
|
|
* result.typeinfo = typeinfo # <<<<<<<<<<<<<<
|
|
@@ -14347,7 +14692,7 @@
|
|
*/
|
|
__pyx_v_result->typeinfo = __pyx_v_typeinfo;
|
|
|
|
- /* "View.MemoryView":656
|
|
+ /* "View.MemoryView":660
|
|
* cdef memoryview result = memoryview(o, flags, dtype_is_object)
|
|
* result.typeinfo = typeinfo
|
|
* return result # <<<<<<<<<<<<<<
|
|
@@ -14359,7 +14704,7 @@
|
|
__pyx_r = ((PyObject *)__pyx_v_result);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":653
|
|
+ /* "View.MemoryView":657
|
|
*
|
|
* @cname('__pyx_memoryview_new')
|
|
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
|
|
@@ -14381,7 +14726,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":659
|
|
+/* "View.MemoryView":663
|
|
*
|
|
* @cname('__pyx_memoryview_check')
|
|
* cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
|
|
@@ -14395,7 +14740,7 @@
|
|
int __pyx_t_1;
|
|
__Pyx_RefNannySetupContext("memoryview_check", 0);
|
|
|
|
- /* "View.MemoryView":660
|
|
+ /* "View.MemoryView":664
|
|
* @cname('__pyx_memoryview_check')
|
|
* cdef inline bint memoryview_check(object o):
|
|
* return isinstance(o, memoryview) # <<<<<<<<<<<<<<
|
|
@@ -14406,7 +14751,7 @@
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":659
|
|
+ /* "View.MemoryView":663
|
|
*
|
|
* @cname('__pyx_memoryview_check')
|
|
* cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
|
|
@@ -14420,7 +14765,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":662
|
|
+/* "View.MemoryView":666
|
|
* return isinstance(o, memoryview)
|
|
*
|
|
* cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
|
|
@@ -14449,9 +14794,12 @@
|
|
int __pyx_t_9;
|
|
int __pyx_t_10;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("_unellipsify", 0);
|
|
|
|
- /* "View.MemoryView":667
|
|
+ /* "View.MemoryView":671
|
|
* full slices.
|
|
* """
|
|
* if not isinstance(index, tuple): # <<<<<<<<<<<<<<
|
|
@@ -14462,14 +14810,14 @@
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":668
|
|
+ /* "View.MemoryView":672
|
|
* """
|
|
* if not isinstance(index, tuple):
|
|
* tup = (index,) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* tup = index
|
|
*/
|
|
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_index);
|
|
__Pyx_GIVEREF(__pyx_v_index);
|
|
@@ -14477,7 +14825,7 @@
|
|
__pyx_v_tup = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":667
|
|
+ /* "View.MemoryView":671
|
|
* full slices.
|
|
* """
|
|
* if not isinstance(index, tuple): # <<<<<<<<<<<<<<
|
|
@@ -14487,7 +14835,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":670
|
|
+ /* "View.MemoryView":674
|
|
* tup = (index,)
|
|
* else:
|
|
* tup = index # <<<<<<<<<<<<<<
|
|
@@ -14500,19 +14848,19 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":672
|
|
+ /* "View.MemoryView":676
|
|
* tup = index
|
|
*
|
|
* result = [] # <<<<<<<<<<<<<<
|
|
* have_slices = False
|
|
* seen_ellipsis = False
|
|
*/
|
|
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v_result = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":673
|
|
+ /* "View.MemoryView":677
|
|
*
|
|
* result = []
|
|
* have_slices = False # <<<<<<<<<<<<<<
|
|
@@ -14521,7 +14869,7 @@
|
|
*/
|
|
__pyx_v_have_slices = 0;
|
|
|
|
- /* "View.MemoryView":674
|
|
+ /* "View.MemoryView":678
|
|
* result = []
|
|
* have_slices = False
|
|
* seen_ellipsis = False # <<<<<<<<<<<<<<
|
|
@@ -14530,7 +14878,7 @@
|
|
*/
|
|
__pyx_v_seen_ellipsis = 0;
|
|
|
|
- /* "View.MemoryView":675
|
|
+ /* "View.MemoryView":679
|
|
* have_slices = False
|
|
* seen_ellipsis = False
|
|
* for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
|
|
@@ -14543,26 +14891,26 @@
|
|
__pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
|
|
__pyx_t_6 = NULL;
|
|
} else {
|
|
- __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
- __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
}
|
|
for (;;) {
|
|
if (likely(!__pyx_t_6)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_4))) {
|
|
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
#else
|
|
- __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
#else
|
|
- __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
#endif
|
|
}
|
|
@@ -14572,7 +14920,7 @@
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
- else __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ else __PYX_ERR(0, 679, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
@@ -14582,13 +14930,13 @@
|
|
__pyx_t_7 = 0;
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
|
|
- __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
|
|
+ __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_3);
|
|
__pyx_t_3 = __pyx_t_7;
|
|
__pyx_t_7 = 0;
|
|
|
|
- /* "View.MemoryView":676
|
|
+ /* "View.MemoryView":680
|
|
* seen_ellipsis = False
|
|
* for idx, item in enumerate(tup):
|
|
* if item is Ellipsis: # <<<<<<<<<<<<<<
|
|
@@ -14599,7 +14947,7 @@
|
|
__pyx_t_1 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":677
|
|
+ /* "View.MemoryView":681
|
|
* for idx, item in enumerate(tup):
|
|
* if item is Ellipsis:
|
|
* if not seen_ellipsis: # <<<<<<<<<<<<<<
|
|
@@ -14609,15 +14957,15 @@
|
|
__pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":678
|
|
+ /* "View.MemoryView":682
|
|
* if item is Ellipsis:
|
|
* if not seen_ellipsis:
|
|
* result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
|
|
* seen_ellipsis = True
|
|
* else:
|
|
*/
|
|
- __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
|
|
- __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
|
|
+ __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
|
|
+ __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
{ Py_ssize_t __pyx_temp;
|
|
for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
|
|
@@ -14626,10 +14974,10 @@
|
|
PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__24);
|
|
}
|
|
}
|
|
- __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
- /* "View.MemoryView":679
|
|
+ /* "View.MemoryView":683
|
|
* if not seen_ellipsis:
|
|
* result.extend([slice(None)] * (ndim - len(tup) + 1))
|
|
* seen_ellipsis = True # <<<<<<<<<<<<<<
|
|
@@ -14638,7 +14986,7 @@
|
|
*/
|
|
__pyx_v_seen_ellipsis = 1;
|
|
|
|
- /* "View.MemoryView":677
|
|
+ /* "View.MemoryView":681
|
|
* for idx, item in enumerate(tup):
|
|
* if item is Ellipsis:
|
|
* if not seen_ellipsis: # <<<<<<<<<<<<<<
|
|
@@ -14648,7 +14996,7 @@
|
|
goto __pyx_L7;
|
|
}
|
|
|
|
- /* "View.MemoryView":681
|
|
+ /* "View.MemoryView":685
|
|
* seen_ellipsis = True
|
|
* else:
|
|
* result.append(slice(None)) # <<<<<<<<<<<<<<
|
|
@@ -14656,11 +15004,11 @@
|
|
* else:
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__24); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 681, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__24); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)
|
|
}
|
|
__pyx_L7:;
|
|
|
|
- /* "View.MemoryView":682
|
|
+ /* "View.MemoryView":686
|
|
* else:
|
|
* result.append(slice(None))
|
|
* have_slices = True # <<<<<<<<<<<<<<
|
|
@@ -14669,7 +15017,7 @@
|
|
*/
|
|
__pyx_v_have_slices = 1;
|
|
|
|
- /* "View.MemoryView":676
|
|
+ /* "View.MemoryView":680
|
|
* seen_ellipsis = False
|
|
* for idx, item in enumerate(tup):
|
|
* if item is Ellipsis: # <<<<<<<<<<<<<<
|
|
@@ -14679,7 +15027,7 @@
|
|
goto __pyx_L6;
|
|
}
|
|
|
|
- /* "View.MemoryView":684
|
|
+ /* "View.MemoryView":688
|
|
* have_slices = True
|
|
* else:
|
|
* if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
|
|
@@ -14699,23 +15047,23 @@
|
|
__pyx_L9_bool_binop_done:;
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
- /* "View.MemoryView":685
|
|
+ /* "View.MemoryView":689
|
|
* else:
|
|
* if not isinstance(item, slice) and not PyIndex_Check(item):
|
|
* raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
|
|
*
|
|
* have_slices = have_slices or isinstance(item, slice)
|
|
*/
|
|
- __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 685, __pyx_L1_error)
|
|
+ __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
- __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 685, __pyx_L1_error)
|
|
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 689, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_11);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_Raise(__pyx_t_11, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
- __PYX_ERR(0, 685, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 689, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":684
|
|
+ /* "View.MemoryView":688
|
|
* have_slices = True
|
|
* else:
|
|
* if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
|
|
@@ -14724,7 +15072,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":687
|
|
+ /* "View.MemoryView":691
|
|
* raise TypeError("Cannot index with type '%s'" % type(item))
|
|
*
|
|
* have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
|
|
@@ -14743,18 +15091,18 @@
|
|
__pyx_L11_bool_binop_done:;
|
|
__pyx_v_have_slices = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":688
|
|
+ /* "View.MemoryView":692
|
|
*
|
|
* have_slices = have_slices or isinstance(item, slice)
|
|
* result.append(item) # <<<<<<<<<<<<<<
|
|
*
|
|
* nslices = ndim - len(result)
|
|
*/
|
|
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 688, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
|
|
}
|
|
__pyx_L6:;
|
|
|
|
- /* "View.MemoryView":675
|
|
+ /* "View.MemoryView":679
|
|
* have_slices = False
|
|
* seen_ellipsis = False
|
|
* for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
|
|
@@ -14765,17 +15113,17 @@
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":690
|
|
+ /* "View.MemoryView":694
|
|
* result.append(item)
|
|
*
|
|
* nslices = ndim - len(result) # <<<<<<<<<<<<<<
|
|
* if nslices:
|
|
* result.extend([slice(None)] * nslices)
|
|
*/
|
|
- __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 690, __pyx_L1_error)
|
|
+ __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 694, __pyx_L1_error)
|
|
__pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
|
|
|
|
- /* "View.MemoryView":691
|
|
+ /* "View.MemoryView":695
|
|
*
|
|
* nslices = ndim - len(result)
|
|
* if nslices: # <<<<<<<<<<<<<<
|
|
@@ -14785,14 +15133,14 @@
|
|
__pyx_t_1 = (__pyx_v_nslices != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":692
|
|
+ /* "View.MemoryView":696
|
|
* nslices = ndim - len(result)
|
|
* if nslices:
|
|
* result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
|
|
*
|
|
* return have_slices or nslices, tuple(result)
|
|
*/
|
|
- __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
{ Py_ssize_t __pyx_temp;
|
|
for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
|
|
@@ -14801,10 +15149,10 @@
|
|
PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__24);
|
|
}
|
|
}
|
|
- __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":691
|
|
+ /* "View.MemoryView":695
|
|
*
|
|
* nslices = ndim - len(result)
|
|
* if nslices: # <<<<<<<<<<<<<<
|
|
@@ -14813,7 +15161,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":694
|
|
+ /* "View.MemoryView":698
|
|
* result.extend([slice(None)] * nslices)
|
|
*
|
|
* return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
|
|
@@ -14823,20 +15171,20 @@
|
|
__Pyx_XDECREF(__pyx_r);
|
|
if (!__pyx_v_have_slices) {
|
|
} else {
|
|
- __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L14_bool_binop_done;
|
|
}
|
|
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
|
|
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
__pyx_L14_bool_binop_done:;
|
|
- __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
|
|
+ __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
- __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 694, __pyx_L1_error)
|
|
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 698, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_11);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
|
|
@@ -14848,7 +15196,7 @@
|
|
__pyx_t_11 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":662
|
|
+ /* "View.MemoryView":666
|
|
* return isinstance(o, memoryview)
|
|
*
|
|
* cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
|
|
@@ -14874,7 +15222,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":696
|
|
+/* "View.MemoryView":700
|
|
* return have_slices or nslices, tuple(result)
|
|
*
|
|
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
|
|
@@ -14891,9 +15239,12 @@
|
|
Py_ssize_t *__pyx_t_3;
|
|
int __pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
|
|
|
|
- /* "View.MemoryView":697
|
|
+ /* "View.MemoryView":701
|
|
*
|
|
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
|
|
* for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
|
|
@@ -14905,7 +15256,7 @@
|
|
__pyx_t_1 = __pyx_t_3;
|
|
__pyx_v_suboffset = (__pyx_t_1[0]);
|
|
|
|
- /* "View.MemoryView":698
|
|
+ /* "View.MemoryView":702
|
|
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
|
|
* for suboffset in suboffsets[:ndim]:
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -14915,20 +15266,20 @@
|
|
__pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
|
|
if (unlikely(__pyx_t_4)) {
|
|
|
|
- /* "View.MemoryView":699
|
|
+ /* "View.MemoryView":703
|
|
* for suboffset in suboffsets[:ndim]:
|
|
* if suboffset >= 0:
|
|
* raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error)
|
|
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
- __PYX_ERR(0, 699, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 703, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":698
|
|
+ /* "View.MemoryView":702
|
|
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
|
|
* for suboffset in suboffsets[:ndim]:
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -14938,7 +15289,7 @@
|
|
}
|
|
}
|
|
|
|
- /* "View.MemoryView":696
|
|
+ /* "View.MemoryView":700
|
|
* return have_slices or nslices, tuple(result)
|
|
*
|
|
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
|
|
@@ -14959,7 +15310,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":706
|
|
+/* "View.MemoryView":710
|
|
*
|
|
* @cname('__pyx_memview_slice')
|
|
* cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
|
|
@@ -14998,9 +15349,12 @@
|
|
Py_ssize_t __pyx_t_10;
|
|
int __pyx_t_11;
|
|
Py_ssize_t __pyx_t_12;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("memview_slice", 0);
|
|
|
|
- /* "View.MemoryView":707
|
|
+ /* "View.MemoryView":711
|
|
* @cname('__pyx_memview_slice')
|
|
* cdef memoryview memview_slice(memoryview memview, object indices):
|
|
* cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
|
|
@@ -15010,7 +15364,7 @@
|
|
__pyx_v_new_ndim = 0;
|
|
__pyx_v_suboffset_dim = -1;
|
|
|
|
- /* "View.MemoryView":714
|
|
+ /* "View.MemoryView":718
|
|
*
|
|
*
|
|
* memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
|
|
@@ -15019,7 +15373,7 @@
|
|
*/
|
|
(void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
|
|
|
|
- /* "View.MemoryView":718
|
|
+ /* "View.MemoryView":722
|
|
* cdef _memoryviewslice memviewsliceobj
|
|
*
|
|
* assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
|
|
@@ -15030,12 +15384,12 @@
|
|
if (unlikely(!Py_OptimizeFlag)) {
|
|
if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
|
|
PyErr_SetNone(PyExc_AssertionError);
|
|
- __PYX_ERR(0, 718, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 722, __pyx_L1_error)
|
|
}
|
|
}
|
|
#endif
|
|
|
|
- /* "View.MemoryView":720
|
|
+ /* "View.MemoryView":724
|
|
* assert memview.view.ndim > 0
|
|
*
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
@@ -15046,20 +15400,20 @@
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":721
|
|
+ /* "View.MemoryView":725
|
|
*
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* memviewsliceobj = memview # <<<<<<<<<<<<<<
|
|
* p_src = &memviewsliceobj.from_slice
|
|
* else:
|
|
*/
|
|
- if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 721, __pyx_L1_error)
|
|
+ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 725, __pyx_L1_error)
|
|
__pyx_t_3 = ((PyObject *)__pyx_v_memview);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":722
|
|
+ /* "View.MemoryView":726
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* memviewsliceobj = memview
|
|
* p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
|
|
@@ -15068,7 +15422,7 @@
|
|
*/
|
|
__pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
|
|
|
|
- /* "View.MemoryView":720
|
|
+ /* "View.MemoryView":724
|
|
* assert memview.view.ndim > 0
|
|
*
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
@@ -15078,7 +15432,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":724
|
|
+ /* "View.MemoryView":728
|
|
* p_src = &memviewsliceobj.from_slice
|
|
* else:
|
|
* slice_copy(memview, &src) # <<<<<<<<<<<<<<
|
|
@@ -15088,7 +15442,7 @@
|
|
/*else*/ {
|
|
__pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
|
|
|
|
- /* "View.MemoryView":725
|
|
+ /* "View.MemoryView":729
|
|
* else:
|
|
* slice_copy(memview, &src)
|
|
* p_src = &src # <<<<<<<<<<<<<<
|
|
@@ -15099,7 +15453,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":731
|
|
+ /* "View.MemoryView":735
|
|
*
|
|
*
|
|
* dst.memview = p_src.memview # <<<<<<<<<<<<<<
|
|
@@ -15109,7 +15463,7 @@
|
|
__pyx_t_4 = __pyx_v_p_src->memview;
|
|
__pyx_v_dst.memview = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":732
|
|
+ /* "View.MemoryView":736
|
|
*
|
|
* dst.memview = p_src.memview
|
|
* dst.data = p_src.data # <<<<<<<<<<<<<<
|
|
@@ -15119,7 +15473,7 @@
|
|
__pyx_t_5 = __pyx_v_p_src->data;
|
|
__pyx_v_dst.data = __pyx_t_5;
|
|
|
|
- /* "View.MemoryView":737
|
|
+ /* "View.MemoryView":741
|
|
*
|
|
*
|
|
* cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
|
|
@@ -15128,7 +15482,7 @@
|
|
*/
|
|
__pyx_v_p_dst = (&__pyx_v_dst);
|
|
|
|
- /* "View.MemoryView":738
|
|
+ /* "View.MemoryView":742
|
|
*
|
|
* cdef __Pyx_memviewslice *p_dst = &dst
|
|
* cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
|
|
@@ -15137,7 +15491,7 @@
|
|
*/
|
|
__pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
|
|
|
|
- /* "View.MemoryView":742
|
|
+ /* "View.MemoryView":746
|
|
* cdef bint have_start, have_stop, have_step
|
|
*
|
|
* for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
|
|
@@ -15149,26 +15503,26 @@
|
|
__pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
|
|
__pyx_t_8 = NULL;
|
|
} else {
|
|
- __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
|
|
}
|
|
for (;;) {
|
|
if (likely(!__pyx_t_8)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_3))) {
|
|
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
- __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
|
|
#else
|
|
- __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
- __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
|
|
#else
|
|
- __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
#endif
|
|
}
|
|
@@ -15178,7 +15532,7 @@
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
- else __PYX_ERR(0, 742, __pyx_L1_error)
|
|
+ else __PYX_ERR(0, 746, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
@@ -15189,7 +15543,7 @@
|
|
__pyx_v_dim = __pyx_t_6;
|
|
__pyx_t_6 = (__pyx_t_6 + 1);
|
|
|
|
- /* "View.MemoryView":743
|
|
+ /* "View.MemoryView":747
|
|
*
|
|
* for dim, index in enumerate(indices):
|
|
* if PyIndex_Check(index): # <<<<<<<<<<<<<<
|
|
@@ -15199,25 +15553,25 @@
|
|
__pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":747
|
|
+ /* "View.MemoryView":751
|
|
* p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
|
|
* dim, new_ndim, p_suboffset_dim,
|
|
* index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
|
|
* 0, 0, 0, # have_{start,stop,step}
|
|
* False)
|
|
*/
|
|
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L1_error)
|
|
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 751, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":744
|
|
+ /* "View.MemoryView":748
|
|
* for dim, index in enumerate(indices):
|
|
* if PyIndex_Check(index):
|
|
* slice_memviewslice( # <<<<<<<<<<<<<<
|
|
* p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
|
|
* dim, new_ndim, p_suboffset_dim,
|
|
*/
|
|
- __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 744, __pyx_L1_error)
|
|
+ __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 748, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":743
|
|
+ /* "View.MemoryView":747
|
|
*
|
|
* for dim, index in enumerate(indices):
|
|
* if PyIndex_Check(index): # <<<<<<<<<<<<<<
|
|
@@ -15227,7 +15581,7 @@
|
|
goto __pyx_L6;
|
|
}
|
|
|
|
- /* "View.MemoryView":750
|
|
+ /* "View.MemoryView":754
|
|
* 0, 0, 0, # have_{start,stop,step}
|
|
* False)
|
|
* elif index is None: # <<<<<<<<<<<<<<
|
|
@@ -15238,7 +15592,7 @@
|
|
__pyx_t_1 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":751
|
|
+ /* "View.MemoryView":755
|
|
* False)
|
|
* elif index is None:
|
|
* p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
|
|
@@ -15247,7 +15601,7 @@
|
|
*/
|
|
(__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
|
|
|
|
- /* "View.MemoryView":752
|
|
+ /* "View.MemoryView":756
|
|
* elif index is None:
|
|
* p_dst.shape[new_ndim] = 1
|
|
* p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
|
|
@@ -15256,7 +15610,7 @@
|
|
*/
|
|
(__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
|
|
|
|
- /* "View.MemoryView":753
|
|
+ /* "View.MemoryView":757
|
|
* p_dst.shape[new_ndim] = 1
|
|
* p_dst.strides[new_ndim] = 0
|
|
* p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
|
|
@@ -15265,7 +15619,7 @@
|
|
*/
|
|
(__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
|
|
|
|
- /* "View.MemoryView":754
|
|
+ /* "View.MemoryView":758
|
|
* p_dst.strides[new_ndim] = 0
|
|
* p_dst.suboffsets[new_ndim] = -1
|
|
* new_ndim += 1 # <<<<<<<<<<<<<<
|
|
@@ -15274,7 +15628,7 @@
|
|
*/
|
|
__pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
|
|
|
|
- /* "View.MemoryView":750
|
|
+ /* "View.MemoryView":754
|
|
* 0, 0, 0, # have_{start,stop,step}
|
|
* False)
|
|
* elif index is None: # <<<<<<<<<<<<<<
|
|
@@ -15284,7 +15638,7 @@
|
|
goto __pyx_L6;
|
|
}
|
|
|
|
- /* "View.MemoryView":756
|
|
+ /* "View.MemoryView":760
|
|
* new_ndim += 1
|
|
* else:
|
|
* start = index.start or 0 # <<<<<<<<<<<<<<
|
|
@@ -15292,13 +15646,13 @@
|
|
* step = index.step or 0
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 756, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 760, __pyx_L1_error)
|
|
if (!__pyx_t_1) {
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else {
|
|
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error)
|
|
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
|
|
__pyx_t_10 = __pyx_t_12;
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
goto __pyx_L7_bool_binop_done;
|
|
@@ -15307,20 +15661,20 @@
|
|
__pyx_L7_bool_binop_done:;
|
|
__pyx_v_start = __pyx_t_10;
|
|
|
|
- /* "View.MemoryView":757
|
|
+ /* "View.MemoryView":761
|
|
* else:
|
|
* start = index.start or 0
|
|
* stop = index.stop or 0 # <<<<<<<<<<<<<<
|
|
* step = index.step or 0
|
|
*
|
|
*/
|
|
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 757, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 757, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
|
|
if (!__pyx_t_1) {
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else {
|
|
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error)
|
|
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
|
|
__pyx_t_10 = __pyx_t_12;
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
goto __pyx_L9_bool_binop_done;
|
|
@@ -15329,20 +15683,20 @@
|
|
__pyx_L9_bool_binop_done:;
|
|
__pyx_v_stop = __pyx_t_10;
|
|
|
|
- /* "View.MemoryView":758
|
|
+ /* "View.MemoryView":762
|
|
* start = index.start or 0
|
|
* stop = index.stop or 0
|
|
* step = index.step or 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* have_start = index.start is not None
|
|
*/
|
|
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 758, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
|
|
if (!__pyx_t_1) {
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else {
|
|
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 758, __pyx_L1_error)
|
|
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
|
|
__pyx_t_10 = __pyx_t_12;
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
goto __pyx_L11_bool_binop_done;
|
|
@@ -15351,55 +15705,55 @@
|
|
__pyx_L11_bool_binop_done:;
|
|
__pyx_v_step = __pyx_t_10;
|
|
|
|
- /* "View.MemoryView":760
|
|
+ /* "View.MemoryView":764
|
|
* step = index.step or 0
|
|
*
|
|
* have_start = index.start is not None # <<<<<<<<<<<<<<
|
|
* have_stop = index.stop is not None
|
|
* have_step = index.step is not None
|
|
*/
|
|
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_1 = (__pyx_t_9 != Py_None);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_v_have_start = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":761
|
|
+ /* "View.MemoryView":765
|
|
*
|
|
* have_start = index.start is not None
|
|
* have_stop = index.stop is not None # <<<<<<<<<<<<<<
|
|
* have_step = index.step is not None
|
|
*
|
|
*/
|
|
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_1 = (__pyx_t_9 != Py_None);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_v_have_stop = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":762
|
|
+ /* "View.MemoryView":766
|
|
* have_start = index.start is not None
|
|
* have_stop = index.stop is not None
|
|
* have_step = index.step is not None # <<<<<<<<<<<<<<
|
|
*
|
|
* slice_memviewslice(
|
|
*/
|
|
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_1 = (__pyx_t_9 != Py_None);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_v_have_step = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":764
|
|
+ /* "View.MemoryView":768
|
|
* have_step = index.step is not None
|
|
*
|
|
* slice_memviewslice( # <<<<<<<<<<<<<<
|
|
* p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
|
|
* dim, new_ndim, p_suboffset_dim,
|
|
*/
|
|
- __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 764, __pyx_L1_error)
|
|
+ __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 768, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":770
|
|
+ /* "View.MemoryView":774
|
|
* have_start, have_stop, have_step,
|
|
* True)
|
|
* new_ndim += 1 # <<<<<<<<<<<<<<
|
|
@@ -15410,7 +15764,7 @@
|
|
}
|
|
__pyx_L6:;
|
|
|
|
- /* "View.MemoryView":742
|
|
+ /* "View.MemoryView":746
|
|
* cdef bint have_start, have_stop, have_step
|
|
*
|
|
* for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
|
|
@@ -15420,7 +15774,7 @@
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":772
|
|
+ /* "View.MemoryView":776
|
|
* new_ndim += 1
|
|
*
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
@@ -15431,7 +15785,7 @@
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":773
|
|
+ /* "View.MemoryView":777
|
|
*
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
|
|
@@ -15440,39 +15794,39 @@
|
|
*/
|
|
__Pyx_XDECREF(((PyObject *)__pyx_r));
|
|
|
|
- /* "View.MemoryView":774
|
|
+ /* "View.MemoryView":778
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* return memoryview_fromslice(dst, new_ndim,
|
|
* memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
|
|
* memviewsliceobj.to_dtype_func,
|
|
* memview.dtype_is_object)
|
|
*/
|
|
- if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 774, __pyx_L1_error) }
|
|
+ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 778, __pyx_L1_error) }
|
|
|
|
- /* "View.MemoryView":775
|
|
+ /* "View.MemoryView":779
|
|
* return memoryview_fromslice(dst, new_ndim,
|
|
* memviewsliceobj.to_object_func,
|
|
* memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
|
|
* memview.dtype_is_object)
|
|
* else:
|
|
*/
|
|
- if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 775, __pyx_L1_error) }
|
|
+ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 779, __pyx_L1_error) }
|
|
|
|
- /* "View.MemoryView":773
|
|
+ /* "View.MemoryView":777
|
|
*
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
|
|
* memviewsliceobj.to_object_func,
|
|
* memviewsliceobj.to_dtype_func,
|
|
*/
|
|
- __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 773, __pyx_L1_error)
|
|
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 777, __pyx_L1_error)
|
|
__pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":772
|
|
+ /* "View.MemoryView":776
|
|
* new_ndim += 1
|
|
*
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
@@ -15481,7 +15835,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":778
|
|
+ /* "View.MemoryView":782
|
|
* memview.dtype_is_object)
|
|
* else:
|
|
* return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
|
|
@@ -15491,30 +15845,30 @@
|
|
/*else*/ {
|
|
__Pyx_XDECREF(((PyObject *)__pyx_r));
|
|
|
|
- /* "View.MemoryView":779
|
|
+ /* "View.MemoryView":783
|
|
* else:
|
|
* return memoryview_fromslice(dst, new_ndim, NULL, NULL,
|
|
* memview.dtype_is_object) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
|
|
- /* "View.MemoryView":778
|
|
+ /* "View.MemoryView":782
|
|
* memview.dtype_is_object)
|
|
* else:
|
|
* return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
|
|
* memview.dtype_is_object)
|
|
*
|
|
*/
|
|
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 778, __pyx_L1_error)
|
|
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 782, __pyx_L1_error)
|
|
__pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":706
|
|
+ /* "View.MemoryView":710
|
|
*
|
|
* @cname('__pyx_memview_slice')
|
|
* cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
|
|
@@ -15536,7 +15890,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":803
|
|
+/* "View.MemoryView":807
|
|
*
|
|
* @cname('__pyx_memoryview_slice_memviewslice')
|
|
* cdef int slice_memviewslice( # <<<<<<<<<<<<<<
|
|
@@ -15551,8 +15905,11 @@
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
|
|
- /* "View.MemoryView":823
|
|
+ /* "View.MemoryView":827
|
|
* cdef bint negative_step
|
|
*
|
|
* if not is_slice: # <<<<<<<<<<<<<<
|
|
@@ -15562,7 +15919,7 @@
|
|
__pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":825
|
|
+ /* "View.MemoryView":829
|
|
* if not is_slice:
|
|
*
|
|
* if start < 0: # <<<<<<<<<<<<<<
|
|
@@ -15572,7 +15929,7 @@
|
|
__pyx_t_1 = ((__pyx_v_start < 0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":826
|
|
+ /* "View.MemoryView":830
|
|
*
|
|
* if start < 0:
|
|
* start += shape # <<<<<<<<<<<<<<
|
|
@@ -15581,7 +15938,7 @@
|
|
*/
|
|
__pyx_v_start = (__pyx_v_start + __pyx_v_shape);
|
|
|
|
- /* "View.MemoryView":825
|
|
+ /* "View.MemoryView":829
|
|
* if not is_slice:
|
|
*
|
|
* if start < 0: # <<<<<<<<<<<<<<
|
|
@@ -15590,7 +15947,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":827
|
|
+ /* "View.MemoryView":831
|
|
* if start < 0:
|
|
* start += shape
|
|
* if not 0 <= start < shape: # <<<<<<<<<<<<<<
|
|
@@ -15604,16 +15961,16 @@
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":828
|
|
+ /* "View.MemoryView":832
|
|
* start += shape
|
|
* if not 0 <= start < shape:
|
|
* _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
|
|
* else:
|
|
*
|
|
*/
|
|
- __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 828, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 832, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":827
|
|
+ /* "View.MemoryView":831
|
|
* if start < 0:
|
|
* start += shape
|
|
* if not 0 <= start < shape: # <<<<<<<<<<<<<<
|
|
@@ -15622,7 +15979,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":823
|
|
+ /* "View.MemoryView":827
|
|
* cdef bint negative_step
|
|
*
|
|
* if not is_slice: # <<<<<<<<<<<<<<
|
|
@@ -15632,7 +15989,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":831
|
|
+ /* "View.MemoryView":835
|
|
* else:
|
|
*
|
|
* negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
|
|
@@ -15651,7 +16008,7 @@
|
|
__pyx_L6_bool_binop_done:;
|
|
__pyx_v_negative_step = __pyx_t_2;
|
|
|
|
- /* "View.MemoryView":833
|
|
+ /* "View.MemoryView":837
|
|
* negative_step = have_step != 0 and step < 0
|
|
*
|
|
* if have_step and step == 0: # <<<<<<<<<<<<<<
|
|
@@ -15669,16 +16026,16 @@
|
|
__pyx_L9_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":834
|
|
+ /* "View.MemoryView":838
|
|
*
|
|
* if have_step and step == 0:
|
|
* _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 838, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":833
|
|
+ /* "View.MemoryView":837
|
|
* negative_step = have_step != 0 and step < 0
|
|
*
|
|
* if have_step and step == 0: # <<<<<<<<<<<<<<
|
|
@@ -15687,7 +16044,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":837
|
|
+ /* "View.MemoryView":841
|
|
*
|
|
*
|
|
* if have_start: # <<<<<<<<<<<<<<
|
|
@@ -15697,7 +16054,7 @@
|
|
__pyx_t_2 = (__pyx_v_have_start != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":838
|
|
+ /* "View.MemoryView":842
|
|
*
|
|
* if have_start:
|
|
* if start < 0: # <<<<<<<<<<<<<<
|
|
@@ -15707,7 +16064,7 @@
|
|
__pyx_t_2 = ((__pyx_v_start < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":839
|
|
+ /* "View.MemoryView":843
|
|
* if have_start:
|
|
* if start < 0:
|
|
* start += shape # <<<<<<<<<<<<<<
|
|
@@ -15716,7 +16073,7 @@
|
|
*/
|
|
__pyx_v_start = (__pyx_v_start + __pyx_v_shape);
|
|
|
|
- /* "View.MemoryView":840
|
|
+ /* "View.MemoryView":844
|
|
* if start < 0:
|
|
* start += shape
|
|
* if start < 0: # <<<<<<<<<<<<<<
|
|
@@ -15726,7 +16083,7 @@
|
|
__pyx_t_2 = ((__pyx_v_start < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":841
|
|
+ /* "View.MemoryView":845
|
|
* start += shape
|
|
* if start < 0:
|
|
* start = 0 # <<<<<<<<<<<<<<
|
|
@@ -15735,7 +16092,7 @@
|
|
*/
|
|
__pyx_v_start = 0;
|
|
|
|
- /* "View.MemoryView":840
|
|
+ /* "View.MemoryView":844
|
|
* if start < 0:
|
|
* start += shape
|
|
* if start < 0: # <<<<<<<<<<<<<<
|
|
@@ -15744,7 +16101,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":838
|
|
+ /* "View.MemoryView":842
|
|
*
|
|
* if have_start:
|
|
* if start < 0: # <<<<<<<<<<<<<<
|
|
@@ -15754,7 +16111,7 @@
|
|
goto __pyx_L12;
|
|
}
|
|
|
|
- /* "View.MemoryView":842
|
|
+ /* "View.MemoryView":846
|
|
* if start < 0:
|
|
* start = 0
|
|
* elif start >= shape: # <<<<<<<<<<<<<<
|
|
@@ -15764,7 +16121,7 @@
|
|
__pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":843
|
|
+ /* "View.MemoryView":847
|
|
* start = 0
|
|
* elif start >= shape:
|
|
* if negative_step: # <<<<<<<<<<<<<<
|
|
@@ -15774,7 +16131,7 @@
|
|
__pyx_t_2 = (__pyx_v_negative_step != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":844
|
|
+ /* "View.MemoryView":848
|
|
* elif start >= shape:
|
|
* if negative_step:
|
|
* start = shape - 1 # <<<<<<<<<<<<<<
|
|
@@ -15783,7 +16140,7 @@
|
|
*/
|
|
__pyx_v_start = (__pyx_v_shape - 1);
|
|
|
|
- /* "View.MemoryView":843
|
|
+ /* "View.MemoryView":847
|
|
* start = 0
|
|
* elif start >= shape:
|
|
* if negative_step: # <<<<<<<<<<<<<<
|
|
@@ -15793,7 +16150,7 @@
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
- /* "View.MemoryView":846
|
|
+ /* "View.MemoryView":850
|
|
* start = shape - 1
|
|
* else:
|
|
* start = shape # <<<<<<<<<<<<<<
|
|
@@ -15805,7 +16162,7 @@
|
|
}
|
|
__pyx_L14:;
|
|
|
|
- /* "View.MemoryView":842
|
|
+ /* "View.MemoryView":846
|
|
* if start < 0:
|
|
* start = 0
|
|
* elif start >= shape: # <<<<<<<<<<<<<<
|
|
@@ -15815,7 +16172,7 @@
|
|
}
|
|
__pyx_L12:;
|
|
|
|
- /* "View.MemoryView":837
|
|
+ /* "View.MemoryView":841
|
|
*
|
|
*
|
|
* if have_start: # <<<<<<<<<<<<<<
|
|
@@ -15825,7 +16182,7 @@
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
- /* "View.MemoryView":848
|
|
+ /* "View.MemoryView":852
|
|
* start = shape
|
|
* else:
|
|
* if negative_step: # <<<<<<<<<<<<<<
|
|
@@ -15836,7 +16193,7 @@
|
|
__pyx_t_2 = (__pyx_v_negative_step != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":849
|
|
+ /* "View.MemoryView":853
|
|
* else:
|
|
* if negative_step:
|
|
* start = shape - 1 # <<<<<<<<<<<<<<
|
|
@@ -15845,7 +16202,7 @@
|
|
*/
|
|
__pyx_v_start = (__pyx_v_shape - 1);
|
|
|
|
- /* "View.MemoryView":848
|
|
+ /* "View.MemoryView":852
|
|
* start = shape
|
|
* else:
|
|
* if negative_step: # <<<<<<<<<<<<<<
|
|
@@ -15855,7 +16212,7 @@
|
|
goto __pyx_L15;
|
|
}
|
|
|
|
- /* "View.MemoryView":851
|
|
+ /* "View.MemoryView":855
|
|
* start = shape - 1
|
|
* else:
|
|
* start = 0 # <<<<<<<<<<<<<<
|
|
@@ -15869,7 +16226,7 @@
|
|
}
|
|
__pyx_L11:;
|
|
|
|
- /* "View.MemoryView":853
|
|
+ /* "View.MemoryView":857
|
|
* start = 0
|
|
*
|
|
* if have_stop: # <<<<<<<<<<<<<<
|
|
@@ -15879,7 +16236,7 @@
|
|
__pyx_t_2 = (__pyx_v_have_stop != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":854
|
|
+ /* "View.MemoryView":858
|
|
*
|
|
* if have_stop:
|
|
* if stop < 0: # <<<<<<<<<<<<<<
|
|
@@ -15889,7 +16246,7 @@
|
|
__pyx_t_2 = ((__pyx_v_stop < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":855
|
|
+ /* "View.MemoryView":859
|
|
* if have_stop:
|
|
* if stop < 0:
|
|
* stop += shape # <<<<<<<<<<<<<<
|
|
@@ -15898,7 +16255,7 @@
|
|
*/
|
|
__pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
|
|
|
|
- /* "View.MemoryView":856
|
|
+ /* "View.MemoryView":860
|
|
* if stop < 0:
|
|
* stop += shape
|
|
* if stop < 0: # <<<<<<<<<<<<<<
|
|
@@ -15908,7 +16265,7 @@
|
|
__pyx_t_2 = ((__pyx_v_stop < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":857
|
|
+ /* "View.MemoryView":861
|
|
* stop += shape
|
|
* if stop < 0:
|
|
* stop = 0 # <<<<<<<<<<<<<<
|
|
@@ -15917,7 +16274,7 @@
|
|
*/
|
|
__pyx_v_stop = 0;
|
|
|
|
- /* "View.MemoryView":856
|
|
+ /* "View.MemoryView":860
|
|
* if stop < 0:
|
|
* stop += shape
|
|
* if stop < 0: # <<<<<<<<<<<<<<
|
|
@@ -15926,7 +16283,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":854
|
|
+ /* "View.MemoryView":858
|
|
*
|
|
* if have_stop:
|
|
* if stop < 0: # <<<<<<<<<<<<<<
|
|
@@ -15936,7 +16293,7 @@
|
|
goto __pyx_L17;
|
|
}
|
|
|
|
- /* "View.MemoryView":858
|
|
+ /* "View.MemoryView":862
|
|
* if stop < 0:
|
|
* stop = 0
|
|
* elif stop > shape: # <<<<<<<<<<<<<<
|
|
@@ -15946,7 +16303,7 @@
|
|
__pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":859
|
|
+ /* "View.MemoryView":863
|
|
* stop = 0
|
|
* elif stop > shape:
|
|
* stop = shape # <<<<<<<<<<<<<<
|
|
@@ -15955,7 +16312,7 @@
|
|
*/
|
|
__pyx_v_stop = __pyx_v_shape;
|
|
|
|
- /* "View.MemoryView":858
|
|
+ /* "View.MemoryView":862
|
|
* if stop < 0:
|
|
* stop = 0
|
|
* elif stop > shape: # <<<<<<<<<<<<<<
|
|
@@ -15965,7 +16322,7 @@
|
|
}
|
|
__pyx_L17:;
|
|
|
|
- /* "View.MemoryView":853
|
|
+ /* "View.MemoryView":857
|
|
* start = 0
|
|
*
|
|
* if have_stop: # <<<<<<<<<<<<<<
|
|
@@ -15975,7 +16332,7 @@
|
|
goto __pyx_L16;
|
|
}
|
|
|
|
- /* "View.MemoryView":861
|
|
+ /* "View.MemoryView":865
|
|
* stop = shape
|
|
* else:
|
|
* if negative_step: # <<<<<<<<<<<<<<
|
|
@@ -15986,7 +16343,7 @@
|
|
__pyx_t_2 = (__pyx_v_negative_step != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":862
|
|
+ /* "View.MemoryView":866
|
|
* else:
|
|
* if negative_step:
|
|
* stop = -1 # <<<<<<<<<<<<<<
|
|
@@ -15995,7 +16352,7 @@
|
|
*/
|
|
__pyx_v_stop = -1L;
|
|
|
|
- /* "View.MemoryView":861
|
|
+ /* "View.MemoryView":865
|
|
* stop = shape
|
|
* else:
|
|
* if negative_step: # <<<<<<<<<<<<<<
|
|
@@ -16005,7 +16362,7 @@
|
|
goto __pyx_L19;
|
|
}
|
|
|
|
- /* "View.MemoryView":864
|
|
+ /* "View.MemoryView":868
|
|
* stop = -1
|
|
* else:
|
|
* stop = shape # <<<<<<<<<<<<<<
|
|
@@ -16019,7 +16376,7 @@
|
|
}
|
|
__pyx_L16:;
|
|
|
|
- /* "View.MemoryView":866
|
|
+ /* "View.MemoryView":870
|
|
* stop = shape
|
|
*
|
|
* if not have_step: # <<<<<<<<<<<<<<
|
|
@@ -16029,7 +16386,7 @@
|
|
__pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":867
|
|
+ /* "View.MemoryView":871
|
|
*
|
|
* if not have_step:
|
|
* step = 1 # <<<<<<<<<<<<<<
|
|
@@ -16038,7 +16395,7 @@
|
|
*/
|
|
__pyx_v_step = 1;
|
|
|
|
- /* "View.MemoryView":866
|
|
+ /* "View.MemoryView":870
|
|
* stop = shape
|
|
*
|
|
* if not have_step: # <<<<<<<<<<<<<<
|
|
@@ -16047,7 +16404,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":871
|
|
+ /* "View.MemoryView":875
|
|
*
|
|
* with cython.cdivision(True):
|
|
* new_shape = (stop - start) // step # <<<<<<<<<<<<<<
|
|
@@ -16056,7 +16413,7 @@
|
|
*/
|
|
__pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
|
|
|
|
- /* "View.MemoryView":873
|
|
+ /* "View.MemoryView":877
|
|
* new_shape = (stop - start) // step
|
|
*
|
|
* if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
|
|
@@ -16066,7 +16423,7 @@
|
|
__pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":874
|
|
+ /* "View.MemoryView":878
|
|
*
|
|
* if (stop - start) - step * new_shape:
|
|
* new_shape += 1 # <<<<<<<<<<<<<<
|
|
@@ -16075,7 +16432,7 @@
|
|
*/
|
|
__pyx_v_new_shape = (__pyx_v_new_shape + 1);
|
|
|
|
- /* "View.MemoryView":873
|
|
+ /* "View.MemoryView":877
|
|
* new_shape = (stop - start) // step
|
|
*
|
|
* if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
|
|
@@ -16084,7 +16441,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":876
|
|
+ /* "View.MemoryView":880
|
|
* new_shape += 1
|
|
*
|
|
* if new_shape < 0: # <<<<<<<<<<<<<<
|
|
@@ -16094,7 +16451,7 @@
|
|
__pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":877
|
|
+ /* "View.MemoryView":881
|
|
*
|
|
* if new_shape < 0:
|
|
* new_shape = 0 # <<<<<<<<<<<<<<
|
|
@@ -16103,7 +16460,7 @@
|
|
*/
|
|
__pyx_v_new_shape = 0;
|
|
|
|
- /* "View.MemoryView":876
|
|
+ /* "View.MemoryView":880
|
|
* new_shape += 1
|
|
*
|
|
* if new_shape < 0: # <<<<<<<<<<<<<<
|
|
@@ -16112,7 +16469,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":880
|
|
+ /* "View.MemoryView":884
|
|
*
|
|
*
|
|
* dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
|
|
@@ -16121,7 +16478,7 @@
|
|
*/
|
|
(__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
|
|
|
|
- /* "View.MemoryView":881
|
|
+ /* "View.MemoryView":885
|
|
*
|
|
* dst.strides[new_ndim] = stride * step
|
|
* dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
|
|
@@ -16130,7 +16487,7 @@
|
|
*/
|
|
(__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
|
|
|
|
- /* "View.MemoryView":882
|
|
+ /* "View.MemoryView":886
|
|
* dst.strides[new_ndim] = stride * step
|
|
* dst.shape[new_ndim] = new_shape
|
|
* dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
|
|
@@ -16141,7 +16498,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":885
|
|
+ /* "View.MemoryView":889
|
|
*
|
|
*
|
|
* if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
|
|
@@ -16151,7 +16508,7 @@
|
|
__pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":886
|
|
+ /* "View.MemoryView":890
|
|
*
|
|
* if suboffset_dim[0] < 0:
|
|
* dst.data += start * stride # <<<<<<<<<<<<<<
|
|
@@ -16160,7 +16517,7 @@
|
|
*/
|
|
__pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
|
|
|
|
- /* "View.MemoryView":885
|
|
+ /* "View.MemoryView":889
|
|
*
|
|
*
|
|
* if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
|
|
@@ -16170,7 +16527,7 @@
|
|
goto __pyx_L23;
|
|
}
|
|
|
|
- /* "View.MemoryView":888
|
|
+ /* "View.MemoryView":892
|
|
* dst.data += start * stride
|
|
* else:
|
|
* dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
|
|
@@ -16183,7 +16540,7 @@
|
|
}
|
|
__pyx_L23:;
|
|
|
|
- /* "View.MemoryView":890
|
|
+ /* "View.MemoryView":894
|
|
* dst.suboffsets[suboffset_dim[0]] += start * stride
|
|
*
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -16193,7 +16550,7 @@
|
|
__pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":891
|
|
+ /* "View.MemoryView":895
|
|
*
|
|
* if suboffset >= 0:
|
|
* if not is_slice: # <<<<<<<<<<<<<<
|
|
@@ -16203,7 +16560,7 @@
|
|
__pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":892
|
|
+ /* "View.MemoryView":896
|
|
* if suboffset >= 0:
|
|
* if not is_slice:
|
|
* if new_ndim == 0: # <<<<<<<<<<<<<<
|
|
@@ -16213,7 +16570,7 @@
|
|
__pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":893
|
|
+ /* "View.MemoryView":897
|
|
* if not is_slice:
|
|
* if new_ndim == 0:
|
|
* dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
|
|
@@ -16222,7 +16579,7 @@
|
|
*/
|
|
__pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
|
|
|
|
- /* "View.MemoryView":892
|
|
+ /* "View.MemoryView":896
|
|
* if suboffset >= 0:
|
|
* if not is_slice:
|
|
* if new_ndim == 0: # <<<<<<<<<<<<<<
|
|
@@ -16232,7 +16589,7 @@
|
|
goto __pyx_L26;
|
|
}
|
|
|
|
- /* "View.MemoryView":895
|
|
+ /* "View.MemoryView":899
|
|
* dst.data = (<char **> dst.data)[0] + suboffset
|
|
* else:
|
|
* _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
|
|
@@ -16241,18 +16598,18 @@
|
|
*/
|
|
/*else*/ {
|
|
|
|
- /* "View.MemoryView":896
|
|
+ /* "View.MemoryView":900
|
|
* else:
|
|
* _err_dim(IndexError, "All dimensions preceding dimension %d "
|
|
* "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* suboffset_dim[0] = new_ndim
|
|
*/
|
|
- __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 899, __pyx_L1_error)
|
|
}
|
|
__pyx_L26:;
|
|
|
|
- /* "View.MemoryView":891
|
|
+ /* "View.MemoryView":895
|
|
*
|
|
* if suboffset >= 0:
|
|
* if not is_slice: # <<<<<<<<<<<<<<
|
|
@@ -16262,7 +16619,7 @@
|
|
goto __pyx_L25;
|
|
}
|
|
|
|
- /* "View.MemoryView":898
|
|
+ /* "View.MemoryView":902
|
|
* "must be indexed and not sliced", dim)
|
|
* else:
|
|
* suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
|
|
@@ -16274,7 +16631,7 @@
|
|
}
|
|
__pyx_L25:;
|
|
|
|
- /* "View.MemoryView":890
|
|
+ /* "View.MemoryView":894
|
|
* dst.suboffsets[suboffset_dim[0]] += start * stride
|
|
*
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -16283,7 +16640,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":900
|
|
+ /* "View.MemoryView":904
|
|
* suboffset_dim[0] = new_ndim
|
|
*
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
@@ -16293,7 +16650,7 @@
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":803
|
|
+ /* "View.MemoryView":807
|
|
*
|
|
* @cname('__pyx_memoryview_slice_memviewslice')
|
|
* cdef int slice_memviewslice( # <<<<<<<<<<<<<<
|
|
@@ -16317,7 +16674,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":906
|
|
+/* "View.MemoryView":910
|
|
*
|
|
* @cname('__pyx_pybuffer_index')
|
|
* cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
|
|
@@ -16337,9 +16694,12 @@
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("pybuffer_index", 0);
|
|
|
|
- /* "View.MemoryView":908
|
|
+ /* "View.MemoryView":912
|
|
* cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
|
|
* Py_ssize_t dim) except NULL:
|
|
* cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
|
|
@@ -16348,7 +16708,7 @@
|
|
*/
|
|
__pyx_v_suboffset = -1L;
|
|
|
|
- /* "View.MemoryView":909
|
|
+ /* "View.MemoryView":913
|
|
* Py_ssize_t dim) except NULL:
|
|
* cdef Py_ssize_t shape, stride, suboffset = -1
|
|
* cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -16358,7 +16718,7 @@
|
|
__pyx_t_1 = __pyx_v_view->itemsize;
|
|
__pyx_v_itemsize = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":912
|
|
+ /* "View.MemoryView":916
|
|
* cdef char *resultp
|
|
*
|
|
* if view.ndim == 0: # <<<<<<<<<<<<<<
|
|
@@ -16368,7 +16728,7 @@
|
|
__pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":913
|
|
+ /* "View.MemoryView":917
|
|
*
|
|
* if view.ndim == 0:
|
|
* shape = view.len / itemsize # <<<<<<<<<<<<<<
|
|
@@ -16377,15 +16737,15 @@
|
|
*/
|
|
if (unlikely(__pyx_v_itemsize == 0)) {
|
|
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
|
|
- __PYX_ERR(0, 913, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 917, __pyx_L1_error)
|
|
}
|
|
else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
|
|
PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
|
|
- __PYX_ERR(0, 913, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 917, __pyx_L1_error)
|
|
}
|
|
__pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
|
|
|
|
- /* "View.MemoryView":914
|
|
+ /* "View.MemoryView":918
|
|
* if view.ndim == 0:
|
|
* shape = view.len / itemsize
|
|
* stride = itemsize # <<<<<<<<<<<<<<
|
|
@@ -16394,7 +16754,7 @@
|
|
*/
|
|
__pyx_v_stride = __pyx_v_itemsize;
|
|
|
|
- /* "View.MemoryView":912
|
|
+ /* "View.MemoryView":916
|
|
* cdef char *resultp
|
|
*
|
|
* if view.ndim == 0: # <<<<<<<<<<<<<<
|
|
@@ -16404,7 +16764,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":916
|
|
+ /* "View.MemoryView":920
|
|
* stride = itemsize
|
|
* else:
|
|
* shape = view.shape[dim] # <<<<<<<<<<<<<<
|
|
@@ -16414,7 +16774,7 @@
|
|
/*else*/ {
|
|
__pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
|
|
|
|
- /* "View.MemoryView":917
|
|
+ /* "View.MemoryView":921
|
|
* else:
|
|
* shape = view.shape[dim]
|
|
* stride = view.strides[dim] # <<<<<<<<<<<<<<
|
|
@@ -16423,7 +16783,7 @@
|
|
*/
|
|
__pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
|
|
|
|
- /* "View.MemoryView":918
|
|
+ /* "View.MemoryView":922
|
|
* shape = view.shape[dim]
|
|
* stride = view.strides[dim]
|
|
* if view.suboffsets != NULL: # <<<<<<<<<<<<<<
|
|
@@ -16433,7 +16793,7 @@
|
|
__pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":919
|
|
+ /* "View.MemoryView":923
|
|
* stride = view.strides[dim]
|
|
* if view.suboffsets != NULL:
|
|
* suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
|
|
@@ -16442,7 +16802,7 @@
|
|
*/
|
|
__pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
|
|
|
|
- /* "View.MemoryView":918
|
|
+ /* "View.MemoryView":922
|
|
* shape = view.shape[dim]
|
|
* stride = view.strides[dim]
|
|
* if view.suboffsets != NULL: # <<<<<<<<<<<<<<
|
|
@@ -16453,7 +16813,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":921
|
|
+ /* "View.MemoryView":925
|
|
* suboffset = view.suboffsets[dim]
|
|
*
|
|
* if index < 0: # <<<<<<<<<<<<<<
|
|
@@ -16463,7 +16823,7 @@
|
|
__pyx_t_2 = ((__pyx_v_index < 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":922
|
|
+ /* "View.MemoryView":926
|
|
*
|
|
* if index < 0:
|
|
* index += view.shape[dim] # <<<<<<<<<<<<<<
|
|
@@ -16472,7 +16832,7 @@
|
|
*/
|
|
__pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
|
|
|
|
- /* "View.MemoryView":923
|
|
+ /* "View.MemoryView":927
|
|
* if index < 0:
|
|
* index += view.shape[dim]
|
|
* if index < 0: # <<<<<<<<<<<<<<
|
|
@@ -16482,26 +16842,26 @@
|
|
__pyx_t_2 = ((__pyx_v_index < 0) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
- /* "View.MemoryView":924
|
|
+ /* "View.MemoryView":928
|
|
* index += view.shape[dim]
|
|
* if index < 0:
|
|
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
|
|
*
|
|
* if index >= shape:
|
|
*/
|
|
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
- __PYX_ERR(0, 924, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 928, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":923
|
|
+ /* "View.MemoryView":927
|
|
* if index < 0:
|
|
* index += view.shape[dim]
|
|
* if index < 0: # <<<<<<<<<<<<<<
|
|
@@ -16510,7 +16870,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":921
|
|
+ /* "View.MemoryView":925
|
|
* suboffset = view.suboffsets[dim]
|
|
*
|
|
* if index < 0: # <<<<<<<<<<<<<<
|
|
@@ -16519,7 +16879,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":926
|
|
+ /* "View.MemoryView":930
|
|
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
|
|
*
|
|
* if index >= shape: # <<<<<<<<<<<<<<
|
|
@@ -16529,26 +16889,26 @@
|
|
__pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
- /* "View.MemoryView":927
|
|
+ /* "View.MemoryView":931
|
|
*
|
|
* if index >= shape:
|
|
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
|
|
*
|
|
* resultp = bufp + index * stride
|
|
*/
|
|
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
- __PYX_ERR(0, 927, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 931, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":926
|
|
+ /* "View.MemoryView":930
|
|
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
|
|
*
|
|
* if index >= shape: # <<<<<<<<<<<<<<
|
|
@@ -16557,7 +16917,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":929
|
|
+ /* "View.MemoryView":933
|
|
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
|
|
*
|
|
* resultp = bufp + index * stride # <<<<<<<<<<<<<<
|
|
@@ -16566,7 +16926,7 @@
|
|
*/
|
|
__pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
|
|
|
|
- /* "View.MemoryView":930
|
|
+ /* "View.MemoryView":934
|
|
*
|
|
* resultp = bufp + index * stride
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -16576,7 +16936,7 @@
|
|
__pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":931
|
|
+ /* "View.MemoryView":935
|
|
* resultp = bufp + index * stride
|
|
* if suboffset >= 0:
|
|
* resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
|
|
@@ -16585,7 +16945,7 @@
|
|
*/
|
|
__pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
|
|
|
|
- /* "View.MemoryView":930
|
|
+ /* "View.MemoryView":934
|
|
*
|
|
* resultp = bufp + index * stride
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -16594,7 +16954,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":933
|
|
+ /* "View.MemoryView":937
|
|
* resultp = (<char **> resultp)[0] + suboffset
|
|
*
|
|
* return resultp # <<<<<<<<<<<<<<
|
|
@@ -16604,7 +16964,7 @@
|
|
__pyx_r = __pyx_v_resultp;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":906
|
|
+ /* "View.MemoryView":910
|
|
*
|
|
* @cname('__pyx_pybuffer_index')
|
|
* cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
|
|
@@ -16623,7 +16983,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":939
|
|
+/* "View.MemoryView":943
|
|
*
|
|
* @cname('__pyx_memslice_transpose')
|
|
* cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
|
|
@@ -16647,8 +17007,11 @@
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
int __pyx_t_9;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
|
|
- /* "View.MemoryView":940
|
|
+ /* "View.MemoryView":944
|
|
* @cname('__pyx_memslice_transpose')
|
|
* cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
|
|
* cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
|
|
@@ -16658,7 +17021,7 @@
|
|
__pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
|
|
__pyx_v_ndim = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":942
|
|
+ /* "View.MemoryView":946
|
|
* cdef int ndim = memslice.memview.view.ndim
|
|
*
|
|
* cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
|
|
@@ -16668,7 +17031,7 @@
|
|
__pyx_t_2 = __pyx_v_memslice->shape;
|
|
__pyx_v_shape = __pyx_t_2;
|
|
|
|
- /* "View.MemoryView":943
|
|
+ /* "View.MemoryView":947
|
|
*
|
|
* cdef Py_ssize_t *shape = memslice.shape
|
|
* cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
|
|
@@ -16678,7 +17041,7 @@
|
|
__pyx_t_2 = __pyx_v_memslice->strides;
|
|
__pyx_v_strides = __pyx_t_2;
|
|
|
|
- /* "View.MemoryView":947
|
|
+ /* "View.MemoryView":951
|
|
*
|
|
* cdef int i, j
|
|
* for i in range(ndim / 2): # <<<<<<<<<<<<<<
|
|
@@ -16690,7 +17053,7 @@
|
|
for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
|
|
__pyx_v_i = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":948
|
|
+ /* "View.MemoryView":952
|
|
* cdef int i, j
|
|
* for i in range(ndim / 2):
|
|
* j = ndim - 1 - i # <<<<<<<<<<<<<<
|
|
@@ -16699,7 +17062,7 @@
|
|
*/
|
|
__pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
|
|
|
|
- /* "View.MemoryView":949
|
|
+ /* "View.MemoryView":953
|
|
* for i in range(ndim / 2):
|
|
* j = ndim - 1 - i
|
|
* strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
|
|
@@ -16711,7 +17074,7 @@
|
|
(__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
|
|
(__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":950
|
|
+ /* "View.MemoryView":954
|
|
* j = ndim - 1 - i
|
|
* strides[i], strides[j] = strides[j], strides[i]
|
|
* shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
|
|
@@ -16723,7 +17086,7 @@
|
|
(__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
|
|
(__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
|
|
|
|
- /* "View.MemoryView":952
|
|
+ /* "View.MemoryView":956
|
|
* shape[i], shape[j] = shape[j], shape[i]
|
|
*
|
|
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
|
|
@@ -16741,16 +17104,16 @@
|
|
__pyx_L6_bool_binop_done:;
|
|
if (__pyx_t_7) {
|
|
|
|
- /* "View.MemoryView":953
|
|
+ /* "View.MemoryView":957
|
|
*
|
|
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
|
|
* _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
|
|
*
|
|
* return 1
|
|
*/
|
|
- __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 953, __pyx_L1_error)
|
|
+ __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":952
|
|
+ /* "View.MemoryView":956
|
|
* shape[i], shape[j] = shape[j], shape[i]
|
|
*
|
|
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
|
|
@@ -16760,7 +17123,7 @@
|
|
}
|
|
}
|
|
|
|
- /* "View.MemoryView":955
|
|
+ /* "View.MemoryView":959
|
|
* _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
|
|
*
|
|
* return 1 # <<<<<<<<<<<<<<
|
|
@@ -16770,7 +17133,7 @@
|
|
__pyx_r = 1;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":939
|
|
+ /* "View.MemoryView":943
|
|
*
|
|
* @cname('__pyx_memslice_transpose')
|
|
* cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
|
|
@@ -16794,7 +17157,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":972
|
|
+/* "View.MemoryView":976
|
|
* cdef int (*to_dtype_func)(char *, object) except 0
|
|
*
|
|
* def __dealloc__(self): # <<<<<<<<<<<<<<
|
|
@@ -16817,7 +17180,7 @@
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__dealloc__", 0);
|
|
|
|
- /* "View.MemoryView":973
|
|
+ /* "View.MemoryView":977
|
|
*
|
|
* def __dealloc__(self):
|
|
* __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
|
|
@@ -16826,7 +17189,7 @@
|
|
*/
|
|
__PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
|
|
|
|
- /* "View.MemoryView":972
|
|
+ /* "View.MemoryView":976
|
|
* cdef int (*to_dtype_func)(char *, object) except 0
|
|
*
|
|
* def __dealloc__(self): # <<<<<<<<<<<<<<
|
|
@@ -16838,7 +17201,7 @@
|
|
__Pyx_RefNannyFinishContext();
|
|
}
|
|
|
|
-/* "View.MemoryView":975
|
|
+/* "View.MemoryView":979
|
|
* __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
|
|
@@ -16851,9 +17214,12 @@
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("convert_item_to_object", 0);
|
|
|
|
- /* "View.MemoryView":976
|
|
+ /* "View.MemoryView":980
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp):
|
|
* if self.to_object_func != NULL: # <<<<<<<<<<<<<<
|
|
@@ -16863,7 +17229,7 @@
|
|
__pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":977
|
|
+ /* "View.MemoryView":981
|
|
* cdef convert_item_to_object(self, char *itemp):
|
|
* if self.to_object_func != NULL:
|
|
* return self.to_object_func(itemp) # <<<<<<<<<<<<<<
|
|
@@ -16871,13 +17237,13 @@
|
|
* return memoryview.convert_item_to_object(self, itemp)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":976
|
|
+ /* "View.MemoryView":980
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp):
|
|
* if self.to_object_func != NULL: # <<<<<<<<<<<<<<
|
|
@@ -16886,7 +17252,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":979
|
|
+ /* "View.MemoryView":983
|
|
* return self.to_object_func(itemp)
|
|
* else:
|
|
* return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
|
|
@@ -16895,14 +17261,14 @@
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":975
|
|
+ /* "View.MemoryView":979
|
|
* __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
|
|
*
|
|
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
|
|
@@ -16921,7 +17287,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":981
|
|
+/* "View.MemoryView":985
|
|
* return memoryview.convert_item_to_object(self, itemp)
|
|
*
|
|
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
|
|
@@ -16935,9 +17301,12 @@
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("assign_item_from_object", 0);
|
|
|
|
- /* "View.MemoryView":982
|
|
+ /* "View.MemoryView":986
|
|
*
|
|
* cdef assign_item_from_object(self, char *itemp, object value):
|
|
* if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
|
|
@@ -16947,16 +17316,16 @@
|
|
__pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":983
|
|
+ /* "View.MemoryView":987
|
|
* cdef assign_item_from_object(self, char *itemp, object value):
|
|
* if self.to_dtype_func != NULL:
|
|
* self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* memoryview.assign_item_from_object(self, itemp, value)
|
|
*/
|
|
- __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 983, __pyx_L1_error)
|
|
+ __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 987, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":982
|
|
+ /* "View.MemoryView":986
|
|
*
|
|
* cdef assign_item_from_object(self, char *itemp, object value):
|
|
* if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
|
|
@@ -16966,7 +17335,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":985
|
|
+ /* "View.MemoryView":989
|
|
* self.to_dtype_func(itemp, value)
|
|
* else:
|
|
* memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
|
|
@@ -16974,13 +17343,13 @@
|
|
* @property
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":981
|
|
+ /* "View.MemoryView":985
|
|
* return memoryview.convert_item_to_object(self, itemp)
|
|
*
|
|
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
|
|
@@ -17001,7 +17370,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":988
|
|
+/* "View.MemoryView":992
|
|
*
|
|
* @property
|
|
* def base(self): # <<<<<<<<<<<<<<
|
|
@@ -17027,7 +17396,7 @@
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
- /* "View.MemoryView":989
|
|
+ /* "View.MemoryView":993
|
|
* @property
|
|
* def base(self):
|
|
* return self.from_object # <<<<<<<<<<<<<<
|
|
@@ -17039,7 +17408,7 @@
|
|
__pyx_r = __pyx_v_self->from_object;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":988
|
|
+ /* "View.MemoryView":992
|
|
*
|
|
* @property
|
|
* def base(self): # <<<<<<<<<<<<<<
|
|
@@ -17077,6 +17446,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":2
|
|
@@ -17131,6 +17503,9 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -17161,7 +17536,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":995
|
|
+/* "View.MemoryView":999
|
|
*
|
|
* @cname('__pyx_memoryview_fromslice')
|
|
* cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
|
|
@@ -17184,9 +17559,12 @@
|
|
Py_ssize_t *__pyx_t_7;
|
|
Py_ssize_t *__pyx_t_8;
|
|
Py_ssize_t __pyx_t_9;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("memoryview_fromslice", 0);
|
|
|
|
- /* "View.MemoryView":1003
|
|
+ /* "View.MemoryView":1007
|
|
* cdef _memoryviewslice result
|
|
*
|
|
* if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
|
|
@@ -17196,7 +17574,7 @@
|
|
__pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1004
|
|
+ /* "View.MemoryView":1008
|
|
*
|
|
* if <PyObject *> memviewslice.memview == Py_None:
|
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -17207,7 +17585,7 @@
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1003
|
|
+ /* "View.MemoryView":1007
|
|
* cdef _memoryviewslice result
|
|
*
|
|
* if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
|
|
@@ -17216,16 +17594,16 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1009
|
|
+ /* "View.MemoryView":1013
|
|
*
|
|
*
|
|
* result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
|
|
*
|
|
* result.from_slice = memviewslice
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
@@ -17236,13 +17614,13 @@
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":1011
|
|
+ /* "View.MemoryView":1015
|
|
* result = _memoryviewslice(None, 0, dtype_is_object)
|
|
*
|
|
* result.from_slice = memviewslice # <<<<<<<<<<<<<<
|
|
@@ -17251,7 +17629,7 @@
|
|
*/
|
|
__pyx_v_result->from_slice = __pyx_v_memviewslice;
|
|
|
|
- /* "View.MemoryView":1012
|
|
+ /* "View.MemoryView":1016
|
|
*
|
|
* result.from_slice = memviewslice
|
|
* __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
|
|
@@ -17260,14 +17638,14 @@
|
|
*/
|
|
__PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
|
|
|
|
- /* "View.MemoryView":1014
|
|
+ /* "View.MemoryView":1018
|
|
* __PYX_INC_MEMVIEW(&memviewslice, 1)
|
|
*
|
|
* result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
|
|
* result.typeinfo = memviewslice.memview.typeinfo
|
|
*
|
|
*/
|
|
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_result->from_object);
|
|
@@ -17275,7 +17653,7 @@
|
|
__pyx_v_result->from_object = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":1015
|
|
+ /* "View.MemoryView":1019
|
|
*
|
|
* result.from_object = (<memoryview> memviewslice.memview).base
|
|
* result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
|
|
@@ -17285,7 +17663,7 @@
|
|
__pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
|
|
__pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1017
|
|
+ /* "View.MemoryView":1021
|
|
* result.typeinfo = memviewslice.memview.typeinfo
|
|
*
|
|
* result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
|
|
@@ -17295,7 +17673,7 @@
|
|
__pyx_t_5 = __pyx_v_memviewslice.memview->view;
|
|
__pyx_v_result->__pyx_base.view = __pyx_t_5;
|
|
|
|
- /* "View.MemoryView":1018
|
|
+ /* "View.MemoryView":1022
|
|
*
|
|
* result.view = memviewslice.memview.view
|
|
* result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
|
|
@@ -17304,7 +17682,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
|
|
|
|
- /* "View.MemoryView":1019
|
|
+ /* "View.MemoryView":1023
|
|
* result.view = memviewslice.memview.view
|
|
* result.view.buf = <void *> memviewslice.data
|
|
* result.view.ndim = ndim # <<<<<<<<<<<<<<
|
|
@@ -17313,7 +17691,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
|
|
|
|
- /* "View.MemoryView":1020
|
|
+ /* "View.MemoryView":1024
|
|
* result.view.buf = <void *> memviewslice.data
|
|
* result.view.ndim = ndim
|
|
* (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
|
|
@@ -17322,7 +17700,7 @@
|
|
*/
|
|
((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
|
|
|
|
- /* "View.MemoryView":1021
|
|
+ /* "View.MemoryView":1025
|
|
* result.view.ndim = ndim
|
|
* (<__pyx_buffer *> &result.view).obj = Py_None
|
|
* Py_INCREF(Py_None) # <<<<<<<<<<<<<<
|
|
@@ -17331,7 +17709,7 @@
|
|
*/
|
|
Py_INCREF(Py_None);
|
|
|
|
- /* "View.MemoryView":1023
|
|
+ /* "View.MemoryView":1027
|
|
* Py_INCREF(Py_None)
|
|
*
|
|
* if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
|
|
@@ -17341,7 +17719,7 @@
|
|
__pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1024
|
|
+ /* "View.MemoryView":1028
|
|
*
|
|
* if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
|
|
* result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
|
|
@@ -17350,7 +17728,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
|
|
|
|
- /* "View.MemoryView":1023
|
|
+ /* "View.MemoryView":1027
|
|
* Py_INCREF(Py_None)
|
|
*
|
|
* if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
|
|
@@ -17360,7 +17738,7 @@
|
|
goto __pyx_L4;
|
|
}
|
|
|
|
- /* "View.MemoryView":1026
|
|
+ /* "View.MemoryView":1030
|
|
* result.flags = PyBUF_RECORDS
|
|
* else:
|
|
* result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
|
|
@@ -17372,7 +17750,7 @@
|
|
}
|
|
__pyx_L4:;
|
|
|
|
- /* "View.MemoryView":1028
|
|
+ /* "View.MemoryView":1032
|
|
* result.flags = PyBUF_RECORDS_RO
|
|
*
|
|
* result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
|
|
@@ -17381,7 +17759,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
|
|
|
|
- /* "View.MemoryView":1029
|
|
+ /* "View.MemoryView":1033
|
|
*
|
|
* result.view.shape = <Py_ssize_t *> result.from_slice.shape
|
|
* result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
|
|
@@ -17390,7 +17768,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
|
|
|
|
- /* "View.MemoryView":1032
|
|
+ /* "View.MemoryView":1036
|
|
*
|
|
*
|
|
* result.view.suboffsets = NULL # <<<<<<<<<<<<<<
|
|
@@ -17399,7 +17777,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.view.suboffsets = NULL;
|
|
|
|
- /* "View.MemoryView":1033
|
|
+ /* "View.MemoryView":1037
|
|
*
|
|
* result.view.suboffsets = NULL
|
|
* for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
|
|
@@ -17411,7 +17789,7 @@
|
|
__pyx_t_6 = __pyx_t_8;
|
|
__pyx_v_suboffset = (__pyx_t_6[0]);
|
|
|
|
- /* "View.MemoryView":1034
|
|
+ /* "View.MemoryView":1038
|
|
* result.view.suboffsets = NULL
|
|
* for suboffset in result.from_slice.suboffsets[:ndim]:
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -17421,7 +17799,7 @@
|
|
__pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1035
|
|
+ /* "View.MemoryView":1039
|
|
* for suboffset in result.from_slice.suboffsets[:ndim]:
|
|
* if suboffset >= 0:
|
|
* result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
|
|
@@ -17430,7 +17808,7 @@
|
|
*/
|
|
__pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
|
|
|
|
- /* "View.MemoryView":1036
|
|
+ /* "View.MemoryView":1040
|
|
* if suboffset >= 0:
|
|
* result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
|
|
* break # <<<<<<<<<<<<<<
|
|
@@ -17439,7 +17817,7 @@
|
|
*/
|
|
goto __pyx_L6_break;
|
|
|
|
- /* "View.MemoryView":1034
|
|
+ /* "View.MemoryView":1038
|
|
* result.view.suboffsets = NULL
|
|
* for suboffset in result.from_slice.suboffsets[:ndim]:
|
|
* if suboffset >= 0: # <<<<<<<<<<<<<<
|
|
@@ -17450,7 +17828,7 @@
|
|
}
|
|
__pyx_L6_break:;
|
|
|
|
- /* "View.MemoryView":1038
|
|
+ /* "View.MemoryView":1042
|
|
* break
|
|
*
|
|
* result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -17460,7 +17838,7 @@
|
|
__pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
|
|
__pyx_v_result->__pyx_base.view.len = __pyx_t_9;
|
|
|
|
- /* "View.MemoryView":1039
|
|
+ /* "View.MemoryView":1043
|
|
*
|
|
* result.view.len = result.view.itemsize
|
|
* for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
|
|
@@ -17470,29 +17848,29 @@
|
|
__pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
|
|
for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
|
|
__pyx_t_6 = __pyx_t_8;
|
|
- __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
- /* "View.MemoryView":1040
|
|
+ /* "View.MemoryView":1044
|
|
* result.view.len = result.view.itemsize
|
|
* for length in result.view.shape[:ndim]:
|
|
* result.view.len *= length # <<<<<<<<<<<<<<
|
|
*
|
|
* result.to_object_func = to_object_func
|
|
*/
|
|
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
- __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error)
|
|
+ __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_result->__pyx_base.view.len = __pyx_t_9;
|
|
}
|
|
|
|
- /* "View.MemoryView":1042
|
|
+ /* "View.MemoryView":1046
|
|
* result.view.len *= length
|
|
*
|
|
* result.to_object_func = to_object_func # <<<<<<<<<<<<<<
|
|
@@ -17501,7 +17879,7 @@
|
|
*/
|
|
__pyx_v_result->to_object_func = __pyx_v_to_object_func;
|
|
|
|
- /* "View.MemoryView":1043
|
|
+ /* "View.MemoryView":1047
|
|
*
|
|
* result.to_object_func = to_object_func
|
|
* result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
|
|
@@ -17510,7 +17888,7 @@
|
|
*/
|
|
__pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
|
|
|
|
- /* "View.MemoryView":1045
|
|
+ /* "View.MemoryView":1049
|
|
* result.to_dtype_func = to_dtype_func
|
|
*
|
|
* return result # <<<<<<<<<<<<<<
|
|
@@ -17522,7 +17900,7 @@
|
|
__pyx_r = ((PyObject *)__pyx_v_result);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":995
|
|
+ /* "View.MemoryView":999
|
|
*
|
|
* @cname('__pyx_memoryview_fromslice')
|
|
* cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
|
|
@@ -17544,11 +17922,11 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1048
|
|
+/* "View.MemoryView":1052
|
|
*
|
|
* @cname('__pyx_memoryview_get_slice_from_memoryview')
|
|
* cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
|
|
- * __Pyx_memviewslice *mslice):
|
|
+ * __Pyx_memviewslice *mslice) except NULL:
|
|
* cdef _memoryviewslice obj
|
|
*/
|
|
|
|
@@ -17559,10 +17937,13 @@
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("get_slice_from_memview", 0);
|
|
|
|
- /* "View.MemoryView":1051
|
|
- * __Pyx_memviewslice *mslice):
|
|
+ /* "View.MemoryView":1055
|
|
+ * __Pyx_memviewslice *mslice) except NULL:
|
|
* cdef _memoryviewslice obj
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
* obj = memview
|
|
@@ -17572,20 +17953,20 @@
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1052
|
|
+ /* "View.MemoryView":1056
|
|
* cdef _memoryviewslice obj
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* obj = memview # <<<<<<<<<<<<<<
|
|
* return &obj.from_slice
|
|
* else:
|
|
*/
|
|
- if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1052, __pyx_L1_error)
|
|
+ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1056, __pyx_L1_error)
|
|
__pyx_t_3 = ((PyObject *)__pyx_v_memview);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":1053
|
|
+ /* "View.MemoryView":1057
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* obj = memview
|
|
* return &obj.from_slice # <<<<<<<<<<<<<<
|
|
@@ -17595,8 +17976,8 @@
|
|
__pyx_r = (&__pyx_v_obj->from_slice);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1051
|
|
- * __Pyx_memviewslice *mslice):
|
|
+ /* "View.MemoryView":1055
|
|
+ * __Pyx_memviewslice *mslice) except NULL:
|
|
* cdef _memoryviewslice obj
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
* obj = memview
|
|
@@ -17604,7 +17985,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1055
|
|
+ /* "View.MemoryView":1059
|
|
* return &obj.from_slice
|
|
* else:
|
|
* slice_copy(memview, mslice) # <<<<<<<<<<<<<<
|
|
@@ -17614,7 +17995,7 @@
|
|
/*else*/ {
|
|
__pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
|
|
|
|
- /* "View.MemoryView":1056
|
|
+ /* "View.MemoryView":1060
|
|
* else:
|
|
* slice_copy(memview, mslice)
|
|
* return mslice # <<<<<<<<<<<<<<
|
|
@@ -17625,26 +18006,26 @@
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":1048
|
|
+ /* "View.MemoryView":1052
|
|
*
|
|
* @cname('__pyx_memoryview_get_slice_from_memoryview')
|
|
* cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
|
|
- * __Pyx_memviewslice *mslice):
|
|
+ * __Pyx_memviewslice *mslice) except NULL:
|
|
* cdef _memoryviewslice obj
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
- __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
|
|
- __pyx_r = 0;
|
|
+ __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
+ __pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_obj);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1059
|
|
+/* "View.MemoryView":1063
|
|
*
|
|
* @cname('__pyx_memoryview_slice_copy')
|
|
* cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
|
|
@@ -17665,7 +18046,7 @@
|
|
Py_ssize_t __pyx_t_5;
|
|
__Pyx_RefNannySetupContext("slice_copy", 0);
|
|
|
|
- /* "View.MemoryView":1063
|
|
+ /* "View.MemoryView":1067
|
|
* cdef (Py_ssize_t*) shape, strides, suboffsets
|
|
*
|
|
* shape = memview.view.shape # <<<<<<<<<<<<<<
|
|
@@ -17675,7 +18056,7 @@
|
|
__pyx_t_1 = __pyx_v_memview->view.shape;
|
|
__pyx_v_shape = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1064
|
|
+ /* "View.MemoryView":1068
|
|
*
|
|
* shape = memview.view.shape
|
|
* strides = memview.view.strides # <<<<<<<<<<<<<<
|
|
@@ -17685,7 +18066,7 @@
|
|
__pyx_t_1 = __pyx_v_memview->view.strides;
|
|
__pyx_v_strides = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1065
|
|
+ /* "View.MemoryView":1069
|
|
* shape = memview.view.shape
|
|
* strides = memview.view.strides
|
|
* suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
|
|
@@ -17695,7 +18076,7 @@
|
|
__pyx_t_1 = __pyx_v_memview->view.suboffsets;
|
|
__pyx_v_suboffsets = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1067
|
|
+ /* "View.MemoryView":1071
|
|
* suboffsets = memview.view.suboffsets
|
|
*
|
|
* dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
|
|
@@ -17704,7 +18085,7 @@
|
|
*/
|
|
__pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
|
|
|
|
- /* "View.MemoryView":1068
|
|
+ /* "View.MemoryView":1072
|
|
*
|
|
* dst.memview = <__pyx_memoryview *> memview
|
|
* dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
|
|
@@ -17713,7 +18094,7 @@
|
|
*/
|
|
__pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
|
|
|
|
- /* "View.MemoryView":1070
|
|
+ /* "View.MemoryView":1074
|
|
* dst.data = <char *> memview.view.buf
|
|
*
|
|
* for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
|
|
@@ -17725,7 +18106,7 @@
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_dim = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1071
|
|
+ /* "View.MemoryView":1075
|
|
*
|
|
* for dim in range(memview.view.ndim):
|
|
* dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
|
|
@@ -17734,7 +18115,7 @@
|
|
*/
|
|
(__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
|
|
|
|
- /* "View.MemoryView":1072
|
|
+ /* "View.MemoryView":1076
|
|
* for dim in range(memview.view.ndim):
|
|
* dst.shape[dim] = shape[dim]
|
|
* dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
|
|
@@ -17743,7 +18124,7 @@
|
|
*/
|
|
(__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
|
|
|
|
- /* "View.MemoryView":1073
|
|
+ /* "View.MemoryView":1077
|
|
* dst.shape[dim] = shape[dim]
|
|
* dst.strides[dim] = strides[dim]
|
|
* dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
|
|
@@ -17758,7 +18139,7 @@
|
|
(__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
|
|
}
|
|
|
|
- /* "View.MemoryView":1059
|
|
+ /* "View.MemoryView":1063
|
|
*
|
|
* @cname('__pyx_memoryview_slice_copy')
|
|
* cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
|
|
@@ -17770,7 +18151,7 @@
|
|
__Pyx_RefNannyFinishContext();
|
|
}
|
|
|
|
-/* "View.MemoryView":1076
|
|
+/* "View.MemoryView":1080
|
|
*
|
|
* @cname('__pyx_memoryview_copy_object')
|
|
* cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
|
|
@@ -17783,9 +18164,12 @@
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("memoryview_copy", 0);
|
|
|
|
- /* "View.MemoryView":1079
|
|
+ /* "View.MemoryView":1083
|
|
* "Create a new memoryview object"
|
|
* cdef __Pyx_memviewslice memviewslice
|
|
* slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
|
|
@@ -17794,7 +18178,7 @@
|
|
*/
|
|
__pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
|
|
|
|
- /* "View.MemoryView":1080
|
|
+ /* "View.MemoryView":1084
|
|
* cdef __Pyx_memviewslice memviewslice
|
|
* slice_copy(memview, &memviewslice)
|
|
* return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
|
|
@@ -17802,13 +18186,13 @@
|
|
* @cname('__pyx_memoryview_copy_object_from_slice')
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
- __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1076
|
|
+ /* "View.MemoryView":1080
|
|
*
|
|
* @cname('__pyx_memoryview_copy_object')
|
|
* cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
|
|
@@ -17827,7 +18211,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1083
|
|
+/* "View.MemoryView":1087
|
|
*
|
|
* @cname('__pyx_memoryview_copy_object_from_slice')
|
|
* cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
|
|
@@ -17845,9 +18229,12 @@
|
|
PyObject *(*__pyx_t_3)(char *);
|
|
int (*__pyx_t_4)(char *, PyObject *);
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
|
|
|
|
- /* "View.MemoryView":1090
|
|
+ /* "View.MemoryView":1094
|
|
* cdef int (*to_dtype_func)(char *, object) except 0
|
|
*
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
@@ -17858,7 +18245,7 @@
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1091
|
|
+ /* "View.MemoryView":1095
|
|
*
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
|
|
@@ -17868,7 +18255,7 @@
|
|
__pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
|
|
__pyx_v_to_object_func = __pyx_t_3;
|
|
|
|
- /* "View.MemoryView":1092
|
|
+ /* "View.MemoryView":1096
|
|
* if isinstance(memview, _memoryviewslice):
|
|
* to_object_func = (<_memoryviewslice> memview).to_object_func
|
|
* to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
|
|
@@ -17878,7 +18265,7 @@
|
|
__pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
|
|
__pyx_v_to_dtype_func = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1090
|
|
+ /* "View.MemoryView":1094
|
|
* cdef int (*to_dtype_func)(char *, object) except 0
|
|
*
|
|
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
|
|
@@ -17888,7 +18275,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":1094
|
|
+ /* "View.MemoryView":1098
|
|
* to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
|
|
* else:
|
|
* to_object_func = NULL # <<<<<<<<<<<<<<
|
|
@@ -17898,7 +18285,7 @@
|
|
/*else*/ {
|
|
__pyx_v_to_object_func = NULL;
|
|
|
|
- /* "View.MemoryView":1095
|
|
+ /* "View.MemoryView":1099
|
|
* else:
|
|
* to_object_func = NULL
|
|
* to_dtype_func = NULL # <<<<<<<<<<<<<<
|
|
@@ -17909,7 +18296,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":1097
|
|
+ /* "View.MemoryView":1101
|
|
* to_dtype_func = NULL
|
|
*
|
|
* return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
|
|
@@ -17918,20 +18305,20 @@
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
|
|
- /* "View.MemoryView":1099
|
|
+ /* "View.MemoryView":1103
|
|
* return memoryview_fromslice(memviewslice[0], memview.view.ndim,
|
|
* to_object_func, to_dtype_func,
|
|
* memview.dtype_is_object) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
|
|
+ __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_r = __pyx_t_5;
|
|
__pyx_t_5 = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1083
|
|
+ /* "View.MemoryView":1087
|
|
*
|
|
* @cname('__pyx_memoryview_copy_object_from_slice')
|
|
* cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
|
|
@@ -17950,7 +18337,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1105
|
|
+/* "View.MemoryView":1109
|
|
*
|
|
*
|
|
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
|
|
@@ -17962,7 +18349,7 @@
|
|
Py_ssize_t __pyx_r;
|
|
int __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1106
|
|
+ /* "View.MemoryView":1110
|
|
*
|
|
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
|
|
* if arg < 0: # <<<<<<<<<<<<<<
|
|
@@ -17972,7 +18359,7 @@
|
|
__pyx_t_1 = ((__pyx_v_arg < 0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1107
|
|
+ /* "View.MemoryView":1111
|
|
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
|
|
* if arg < 0:
|
|
* return -arg # <<<<<<<<<<<<<<
|
|
@@ -17982,7 +18369,7 @@
|
|
__pyx_r = (-__pyx_v_arg);
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1106
|
|
+ /* "View.MemoryView":1110
|
|
*
|
|
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
|
|
* if arg < 0: # <<<<<<<<<<<<<<
|
|
@@ -17991,7 +18378,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1109
|
|
+ /* "View.MemoryView":1113
|
|
* return -arg
|
|
* else:
|
|
* return arg # <<<<<<<<<<<<<<
|
|
@@ -18003,7 +18390,7 @@
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":1105
|
|
+ /* "View.MemoryView":1109
|
|
*
|
|
*
|
|
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
|
|
@@ -18016,7 +18403,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1112
|
|
+/* "View.MemoryView":1116
|
|
*
|
|
* @cname('__pyx_get_best_slice_order')
|
|
* cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
|
|
@@ -18034,7 +18421,7 @@
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1117
|
|
+ /* "View.MemoryView":1121
|
|
* """
|
|
* cdef int i
|
|
* cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
|
|
@@ -18043,7 +18430,7 @@
|
|
*/
|
|
__pyx_v_c_stride = 0;
|
|
|
|
- /* "View.MemoryView":1118
|
|
+ /* "View.MemoryView":1122
|
|
* cdef int i
|
|
* cdef Py_ssize_t c_stride = 0
|
|
* cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
|
|
@@ -18052,7 +18439,7 @@
|
|
*/
|
|
__pyx_v_f_stride = 0;
|
|
|
|
- /* "View.MemoryView":1120
|
|
+ /* "View.MemoryView":1124
|
|
* cdef Py_ssize_t f_stride = 0
|
|
*
|
|
* for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
|
|
@@ -18062,7 +18449,7 @@
|
|
for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
|
|
__pyx_v_i = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1121
|
|
+ /* "View.MemoryView":1125
|
|
*
|
|
* for i in range(ndim - 1, -1, -1):
|
|
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
|
|
@@ -18072,7 +18459,7 @@
|
|
__pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1122
|
|
+ /* "View.MemoryView":1126
|
|
* for i in range(ndim - 1, -1, -1):
|
|
* if mslice.shape[i] > 1:
|
|
* c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
|
|
@@ -18081,7 +18468,7 @@
|
|
*/
|
|
__pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
|
|
|
|
- /* "View.MemoryView":1123
|
|
+ /* "View.MemoryView":1127
|
|
* if mslice.shape[i] > 1:
|
|
* c_stride = mslice.strides[i]
|
|
* break # <<<<<<<<<<<<<<
|
|
@@ -18090,7 +18477,7 @@
|
|
*/
|
|
goto __pyx_L4_break;
|
|
|
|
- /* "View.MemoryView":1121
|
|
+ /* "View.MemoryView":1125
|
|
*
|
|
* for i in range(ndim - 1, -1, -1):
|
|
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
|
|
@@ -18101,7 +18488,7 @@
|
|
}
|
|
__pyx_L4_break:;
|
|
|
|
- /* "View.MemoryView":1125
|
|
+ /* "View.MemoryView":1129
|
|
* break
|
|
*
|
|
* for i in range(ndim): # <<<<<<<<<<<<<<
|
|
@@ -18113,7 +18500,7 @@
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_i = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1126
|
|
+ /* "View.MemoryView":1130
|
|
*
|
|
* for i in range(ndim):
|
|
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
|
|
@@ -18123,7 +18510,7 @@
|
|
__pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1127
|
|
+ /* "View.MemoryView":1131
|
|
* for i in range(ndim):
|
|
* if mslice.shape[i] > 1:
|
|
* f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
|
|
@@ -18132,7 +18519,7 @@
|
|
*/
|
|
__pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
|
|
|
|
- /* "View.MemoryView":1128
|
|
+ /* "View.MemoryView":1132
|
|
* if mslice.shape[i] > 1:
|
|
* f_stride = mslice.strides[i]
|
|
* break # <<<<<<<<<<<<<<
|
|
@@ -18141,7 +18528,7 @@
|
|
*/
|
|
goto __pyx_L7_break;
|
|
|
|
- /* "View.MemoryView":1126
|
|
+ /* "View.MemoryView":1130
|
|
*
|
|
* for i in range(ndim):
|
|
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
|
|
@@ -18152,7 +18539,7 @@
|
|
}
|
|
__pyx_L7_break:;
|
|
|
|
- /* "View.MemoryView":1130
|
|
+ /* "View.MemoryView":1134
|
|
* break
|
|
*
|
|
* if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
|
|
@@ -18162,7 +18549,7 @@
|
|
__pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1131
|
|
+ /* "View.MemoryView":1135
|
|
*
|
|
* if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
|
|
* return 'C' # <<<<<<<<<<<<<<
|
|
@@ -18172,7 +18559,7 @@
|
|
__pyx_r = 'C';
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1130
|
|
+ /* "View.MemoryView":1134
|
|
* break
|
|
*
|
|
* if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
|
|
@@ -18181,7 +18568,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1133
|
|
+ /* "View.MemoryView":1137
|
|
* return 'C'
|
|
* else:
|
|
* return 'F' # <<<<<<<<<<<<<<
|
|
@@ -18193,7 +18580,7 @@
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
- /* "View.MemoryView":1112
|
|
+ /* "View.MemoryView":1116
|
|
*
|
|
* @cname('__pyx_get_best_slice_order')
|
|
* cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
|
|
@@ -18206,7 +18593,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1136
|
|
+/* "View.MemoryView":1140
|
|
*
|
|
* @cython.cdivision(True)
|
|
* cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
|
|
@@ -18227,7 +18614,7 @@
|
|
Py_ssize_t __pyx_t_5;
|
|
Py_ssize_t __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":1143
|
|
+ /* "View.MemoryView":1147
|
|
*
|
|
* cdef Py_ssize_t i
|
|
* cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
|
|
@@ -18236,7 +18623,7 @@
|
|
*/
|
|
__pyx_v_src_extent = (__pyx_v_src_shape[0]);
|
|
|
|
- /* "View.MemoryView":1144
|
|
+ /* "View.MemoryView":1148
|
|
* cdef Py_ssize_t i
|
|
* cdef Py_ssize_t src_extent = src_shape[0]
|
|
* cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
|
|
@@ -18245,7 +18632,7 @@
|
|
*/
|
|
__pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
|
|
|
|
- /* "View.MemoryView":1145
|
|
+ /* "View.MemoryView":1149
|
|
* cdef Py_ssize_t src_extent = src_shape[0]
|
|
* cdef Py_ssize_t dst_extent = dst_shape[0]
|
|
* cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
|
|
@@ -18254,7 +18641,7 @@
|
|
*/
|
|
__pyx_v_src_stride = (__pyx_v_src_strides[0]);
|
|
|
|
- /* "View.MemoryView":1146
|
|
+ /* "View.MemoryView":1150
|
|
* cdef Py_ssize_t dst_extent = dst_shape[0]
|
|
* cdef Py_ssize_t src_stride = src_strides[0]
|
|
* cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
|
|
@@ -18263,7 +18650,7 @@
|
|
*/
|
|
__pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
|
|
|
|
- /* "View.MemoryView":1148
|
|
+ /* "View.MemoryView":1152
|
|
* cdef Py_ssize_t dst_stride = dst_strides[0]
|
|
*
|
|
* if ndim == 1: # <<<<<<<<<<<<<<
|
|
@@ -18273,7 +18660,7 @@
|
|
__pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1149
|
|
+ /* "View.MemoryView":1153
|
|
*
|
|
* if ndim == 1:
|
|
* if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
|
|
@@ -18293,7 +18680,7 @@
|
|
goto __pyx_L5_bool_binop_done;
|
|
}
|
|
|
|
- /* "View.MemoryView":1150
|
|
+ /* "View.MemoryView":1154
|
|
* if ndim == 1:
|
|
* if (src_stride > 0 and dst_stride > 0 and
|
|
* <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
|
|
@@ -18308,7 +18695,7 @@
|
|
__pyx_t_1 = __pyx_t_3;
|
|
__pyx_L5_bool_binop_done:;
|
|
|
|
- /* "View.MemoryView":1149
|
|
+ /* "View.MemoryView":1153
|
|
*
|
|
* if ndim == 1:
|
|
* if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
|
|
@@ -18317,7 +18704,7 @@
|
|
*/
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1151
|
|
+ /* "View.MemoryView":1155
|
|
* if (src_stride > 0 and dst_stride > 0 and
|
|
* <size_t> src_stride == itemsize == <size_t> dst_stride):
|
|
* memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
|
|
@@ -18326,7 +18713,7 @@
|
|
*/
|
|
(void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
|
|
|
|
- /* "View.MemoryView":1149
|
|
+ /* "View.MemoryView":1153
|
|
*
|
|
* if ndim == 1:
|
|
* if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
|
|
@@ -18336,7 +18723,7 @@
|
|
goto __pyx_L4;
|
|
}
|
|
|
|
- /* "View.MemoryView":1153
|
|
+ /* "View.MemoryView":1157
|
|
* memcpy(dst_data, src_data, itemsize * dst_extent)
|
|
* else:
|
|
* for i in range(dst_extent): # <<<<<<<<<<<<<<
|
|
@@ -18349,7 +18736,7 @@
|
|
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
|
|
__pyx_v_i = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":1154
|
|
+ /* "View.MemoryView":1158
|
|
* else:
|
|
* for i in range(dst_extent):
|
|
* memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
|
|
@@ -18358,7 +18745,7 @@
|
|
*/
|
|
(void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
|
|
|
|
- /* "View.MemoryView":1155
|
|
+ /* "View.MemoryView":1159
|
|
* for i in range(dst_extent):
|
|
* memcpy(dst_data, src_data, itemsize)
|
|
* src_data += src_stride # <<<<<<<<<<<<<<
|
|
@@ -18367,7 +18754,7 @@
|
|
*/
|
|
__pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
|
|
|
|
- /* "View.MemoryView":1156
|
|
+ /* "View.MemoryView":1160
|
|
* memcpy(dst_data, src_data, itemsize)
|
|
* src_data += src_stride
|
|
* dst_data += dst_stride # <<<<<<<<<<<<<<
|
|
@@ -18379,7 +18766,7 @@
|
|
}
|
|
__pyx_L4:;
|
|
|
|
- /* "View.MemoryView":1148
|
|
+ /* "View.MemoryView":1152
|
|
* cdef Py_ssize_t dst_stride = dst_strides[0]
|
|
*
|
|
* if ndim == 1: # <<<<<<<<<<<<<<
|
|
@@ -18389,7 +18776,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":1158
|
|
+ /* "View.MemoryView":1162
|
|
* dst_data += dst_stride
|
|
* else:
|
|
* for i in range(dst_extent): # <<<<<<<<<<<<<<
|
|
@@ -18402,7 +18789,7 @@
|
|
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
|
|
__pyx_v_i = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":1159
|
|
+ /* "View.MemoryView":1163
|
|
* else:
|
|
* for i in range(dst_extent):
|
|
* _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
|
|
@@ -18411,7 +18798,7 @@
|
|
*/
|
|
_copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
|
|
|
|
- /* "View.MemoryView":1163
|
|
+ /* "View.MemoryView":1167
|
|
* src_shape + 1, dst_shape + 1,
|
|
* ndim - 1, itemsize)
|
|
* src_data += src_stride # <<<<<<<<<<<<<<
|
|
@@ -18420,7 +18807,7 @@
|
|
*/
|
|
__pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
|
|
|
|
- /* "View.MemoryView":1164
|
|
+ /* "View.MemoryView":1168
|
|
* ndim - 1, itemsize)
|
|
* src_data += src_stride
|
|
* dst_data += dst_stride # <<<<<<<<<<<<<<
|
|
@@ -18432,7 +18819,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":1136
|
|
+ /* "View.MemoryView":1140
|
|
*
|
|
* @cython.cdivision(True)
|
|
* cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
|
|
@@ -18443,7 +18830,7 @@
|
|
/* function exit code */
|
|
}
|
|
|
|
-/* "View.MemoryView":1166
|
|
+/* "View.MemoryView":1170
|
|
* dst_data += dst_stride
|
|
*
|
|
* cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
|
|
@@ -18453,7 +18840,7 @@
|
|
|
|
static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
|
|
|
|
- /* "View.MemoryView":1169
|
|
+ /* "View.MemoryView":1173
|
|
* __Pyx_memviewslice *dst,
|
|
* int ndim, size_t itemsize) nogil:
|
|
* _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
|
|
@@ -18462,7 +18849,7 @@
|
|
*/
|
|
_copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
|
|
|
|
- /* "View.MemoryView":1166
|
|
+ /* "View.MemoryView":1170
|
|
* dst_data += dst_stride
|
|
*
|
|
* cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
|
|
@@ -18473,57 +18860,57 @@
|
|
/* function exit code */
|
|
}
|
|
|
|
-/* "View.MemoryView":1173
|
|
+/* "View.MemoryView":1177
|
|
*
|
|
* @cname('__pyx_memoryview_slice_get_size')
|
|
* cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
|
|
* "Return the size of the memory occupied by the slice in number of bytes"
|
|
- * cdef int i
|
|
+ * cdef Py_ssize_t shape, size = src.memview.view.itemsize
|
|
*/
|
|
|
|
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
|
|
- int __pyx_v_i;
|
|
+ Py_ssize_t __pyx_v_shape;
|
|
Py_ssize_t __pyx_v_size;
|
|
Py_ssize_t __pyx_r;
|
|
Py_ssize_t __pyx_t_1;
|
|
- int __pyx_t_2;
|
|
- int __pyx_t_3;
|
|
- int __pyx_t_4;
|
|
+ Py_ssize_t *__pyx_t_2;
|
|
+ Py_ssize_t *__pyx_t_3;
|
|
+ Py_ssize_t *__pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1176
|
|
+ /* "View.MemoryView":1179
|
|
+ * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
|
|
* "Return the size of the memory occupied by the slice in number of bytes"
|
|
- * cdef int i
|
|
- * cdef Py_ssize_t size = src.memview.view.itemsize # <<<<<<<<<<<<<<
|
|
+ * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
|
|
*
|
|
- * for i in range(ndim):
|
|
+ * for shape in src.shape[:ndim]:
|
|
*/
|
|
__pyx_t_1 = __pyx_v_src->memview->view.itemsize;
|
|
__pyx_v_size = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1178
|
|
- * cdef Py_ssize_t size = src.memview.view.itemsize
|
|
+ /* "View.MemoryView":1181
|
|
+ * cdef Py_ssize_t shape, size = src.memview.view.itemsize
|
|
*
|
|
- * for i in range(ndim): # <<<<<<<<<<<<<<
|
|
- * size *= src.shape[i]
|
|
+ * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
|
|
+ * size *= shape
|
|
*
|
|
*/
|
|
- __pyx_t_2 = __pyx_v_ndim;
|
|
- __pyx_t_3 = __pyx_t_2;
|
|
- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
- __pyx_v_i = __pyx_t_4;
|
|
+ __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
|
|
+ for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
|
|
+ __pyx_t_2 = __pyx_t_4;
|
|
+ __pyx_v_shape = (__pyx_t_2[0]);
|
|
|
|
- /* "View.MemoryView":1179
|
|
+ /* "View.MemoryView":1182
|
|
*
|
|
- * for i in range(ndim):
|
|
- * size *= src.shape[i] # <<<<<<<<<<<<<<
|
|
+ * for shape in src.shape[:ndim]:
|
|
+ * size *= shape # <<<<<<<<<<<<<<
|
|
*
|
|
* return size
|
|
*/
|
|
- __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i]));
|
|
+ __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
|
|
}
|
|
|
|
- /* "View.MemoryView":1181
|
|
- * size *= src.shape[i]
|
|
+ /* "View.MemoryView":1184
|
|
+ * size *= shape
|
|
*
|
|
* return size # <<<<<<<<<<<<<<
|
|
*
|
|
@@ -18532,12 +18919,12 @@
|
|
__pyx_r = __pyx_v_size;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1173
|
|
+ /* "View.MemoryView":1177
|
|
*
|
|
* @cname('__pyx_memoryview_slice_get_size')
|
|
* cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
|
|
* "Return the size of the memory occupied by the slice in number of bytes"
|
|
- * cdef int i
|
|
+ * cdef Py_ssize_t shape, size = src.memview.view.itemsize
|
|
*/
|
|
|
|
/* function exit code */
|
|
@@ -18545,7 +18932,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1184
|
|
+/* "View.MemoryView":1187
|
|
*
|
|
* @cname('__pyx_fill_contig_strides_array')
|
|
* cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
|
|
@@ -18561,7 +18948,7 @@
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1193
|
|
+ /* "View.MemoryView":1196
|
|
* cdef int idx
|
|
*
|
|
* if order == 'F': # <<<<<<<<<<<<<<
|
|
@@ -18571,38 +18958,38 @@
|
|
__pyx_t_1 = ((__pyx_v_order == 'F') != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1194
|
|
+ /* "View.MemoryView":1197
|
|
*
|
|
* if order == 'F':
|
|
* for idx in range(ndim): # <<<<<<<<<<<<<<
|
|
* strides[idx] = stride
|
|
- * stride = stride * shape[idx]
|
|
+ * stride *= shape[idx]
|
|
*/
|
|
__pyx_t_2 = __pyx_v_ndim;
|
|
__pyx_t_3 = __pyx_t_2;
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_idx = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1195
|
|
+ /* "View.MemoryView":1198
|
|
* if order == 'F':
|
|
* for idx in range(ndim):
|
|
* strides[idx] = stride # <<<<<<<<<<<<<<
|
|
- * stride = stride * shape[idx]
|
|
+ * stride *= shape[idx]
|
|
* else:
|
|
*/
|
|
(__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
|
|
|
|
- /* "View.MemoryView":1196
|
|
+ /* "View.MemoryView":1199
|
|
* for idx in range(ndim):
|
|
* strides[idx] = stride
|
|
- * stride = stride * shape[idx] # <<<<<<<<<<<<<<
|
|
+ * stride *= shape[idx] # <<<<<<<<<<<<<<
|
|
* else:
|
|
* for idx in range(ndim - 1, -1, -1):
|
|
*/
|
|
__pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
|
|
}
|
|
|
|
- /* "View.MemoryView":1193
|
|
+ /* "View.MemoryView":1196
|
|
* cdef int idx
|
|
*
|
|
* if order == 'F': # <<<<<<<<<<<<<<
|
|
@@ -18612,30 +18999,30 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":1198
|
|
- * stride = stride * shape[idx]
|
|
+ /* "View.MemoryView":1201
|
|
+ * stride *= shape[idx]
|
|
* else:
|
|
* for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
|
|
* strides[idx] = stride
|
|
- * stride = stride * shape[idx]
|
|
+ * stride *= shape[idx]
|
|
*/
|
|
/*else*/ {
|
|
for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
|
|
__pyx_v_idx = __pyx_t_2;
|
|
|
|
- /* "View.MemoryView":1199
|
|
+ /* "View.MemoryView":1202
|
|
* else:
|
|
* for idx in range(ndim - 1, -1, -1):
|
|
* strides[idx] = stride # <<<<<<<<<<<<<<
|
|
- * stride = stride * shape[idx]
|
|
+ * stride *= shape[idx]
|
|
*
|
|
*/
|
|
(__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
|
|
|
|
- /* "View.MemoryView":1200
|
|
+ /* "View.MemoryView":1203
|
|
* for idx in range(ndim - 1, -1, -1):
|
|
* strides[idx] = stride
|
|
- * stride = stride * shape[idx] # <<<<<<<<<<<<<<
|
|
+ * stride *= shape[idx] # <<<<<<<<<<<<<<
|
|
*
|
|
* return stride
|
|
*/
|
|
@@ -18644,8 +19031,8 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":1202
|
|
- * stride = stride * shape[idx]
|
|
+ /* "View.MemoryView":1205
|
|
+ * stride *= shape[idx]
|
|
*
|
|
* return stride # <<<<<<<<<<<<<<
|
|
*
|
|
@@ -18654,7 +19041,7 @@
|
|
__pyx_r = __pyx_v_stride;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1184
|
|
+ /* "View.MemoryView":1187
|
|
*
|
|
* @cname('__pyx_fill_contig_strides_array')
|
|
* cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
|
|
@@ -18667,7 +19054,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1205
|
|
+/* "View.MemoryView":1208
|
|
*
|
|
* @cname('__pyx_memoryview_copy_data_to_temp')
|
|
* cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
|
|
@@ -18687,8 +19074,11 @@
|
|
struct __pyx_memoryview_obj *__pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
|
|
- /* "View.MemoryView":1216
|
|
+ /* "View.MemoryView":1219
|
|
* cdef void *result
|
|
*
|
|
* cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -18698,7 +19088,7 @@
|
|
__pyx_t_1 = __pyx_v_src->memview->view.itemsize;
|
|
__pyx_v_itemsize = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1217
|
|
+ /* "View.MemoryView":1220
|
|
*
|
|
* cdef size_t itemsize = src.memview.view.itemsize
|
|
* cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
|
|
@@ -18707,7 +19097,7 @@
|
|
*/
|
|
__pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
|
|
|
|
- /* "View.MemoryView":1219
|
|
+ /* "View.MemoryView":1222
|
|
* cdef size_t size = slice_get_size(src, ndim)
|
|
*
|
|
* result = malloc(size) # <<<<<<<<<<<<<<
|
|
@@ -18716,7 +19106,7 @@
|
|
*/
|
|
__pyx_v_result = malloc(__pyx_v_size);
|
|
|
|
- /* "View.MemoryView":1220
|
|
+ /* "View.MemoryView":1223
|
|
*
|
|
* result = malloc(size)
|
|
* if not result: # <<<<<<<<<<<<<<
|
|
@@ -18726,16 +19116,16 @@
|
|
__pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1221
|
|
+ /* "View.MemoryView":1224
|
|
* result = malloc(size)
|
|
* if not result:
|
|
* _err(MemoryError, NULL) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1221, __pyx_L1_error)
|
|
+ __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1224, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1220
|
|
+ /* "View.MemoryView":1223
|
|
*
|
|
* result = malloc(size)
|
|
* if not result: # <<<<<<<<<<<<<<
|
|
@@ -18744,7 +19134,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1224
|
|
+ /* "View.MemoryView":1227
|
|
*
|
|
*
|
|
* tmpslice.data = <char *> result # <<<<<<<<<<<<<<
|
|
@@ -18753,7 +19143,7 @@
|
|
*/
|
|
__pyx_v_tmpslice->data = ((char *)__pyx_v_result);
|
|
|
|
- /* "View.MemoryView":1225
|
|
+ /* "View.MemoryView":1228
|
|
*
|
|
* tmpslice.data = <char *> result
|
|
* tmpslice.memview = src.memview # <<<<<<<<<<<<<<
|
|
@@ -18763,7 +19153,7 @@
|
|
__pyx_t_4 = __pyx_v_src->memview;
|
|
__pyx_v_tmpslice->memview = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1226
|
|
+ /* "View.MemoryView":1229
|
|
* tmpslice.data = <char *> result
|
|
* tmpslice.memview = src.memview
|
|
* for i in range(ndim): # <<<<<<<<<<<<<<
|
|
@@ -18775,7 +19165,7 @@
|
|
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
|
|
__pyx_v_i = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":1227
|
|
+ /* "View.MemoryView":1230
|
|
* tmpslice.memview = src.memview
|
|
* for i in range(ndim):
|
|
* tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
|
|
@@ -18784,7 +19174,7 @@
|
|
*/
|
|
(__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
|
|
|
|
- /* "View.MemoryView":1228
|
|
+ /* "View.MemoryView":1231
|
|
* for i in range(ndim):
|
|
* tmpslice.shape[i] = src.shape[i]
|
|
* tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
|
|
@@ -18794,7 +19184,7 @@
|
|
(__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
|
|
}
|
|
|
|
- /* "View.MemoryView":1230
|
|
+ /* "View.MemoryView":1233
|
|
* tmpslice.suboffsets[i] = -1
|
|
*
|
|
* fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
|
|
@@ -18803,7 +19193,7 @@
|
|
*/
|
|
(void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
|
|
|
|
- /* "View.MemoryView":1234
|
|
+ /* "View.MemoryView":1237
|
|
*
|
|
*
|
|
* for i in range(ndim): # <<<<<<<<<<<<<<
|
|
@@ -18815,7 +19205,7 @@
|
|
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
|
|
__pyx_v_i = __pyx_t_6;
|
|
|
|
- /* "View.MemoryView":1235
|
|
+ /* "View.MemoryView":1238
|
|
*
|
|
* for i in range(ndim):
|
|
* if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
|
|
@@ -18825,7 +19215,7 @@
|
|
__pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1236
|
|
+ /* "View.MemoryView":1239
|
|
* for i in range(ndim):
|
|
* if tmpslice.shape[i] == 1:
|
|
* tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
|
|
@@ -18834,7 +19224,7 @@
|
|
*/
|
|
(__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
|
|
|
|
- /* "View.MemoryView":1235
|
|
+ /* "View.MemoryView":1238
|
|
*
|
|
* for i in range(ndim):
|
|
* if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
|
|
@@ -18844,7 +19234,7 @@
|
|
}
|
|
}
|
|
|
|
- /* "View.MemoryView":1238
|
|
+ /* "View.MemoryView":1241
|
|
* tmpslice.strides[i] = 0
|
|
*
|
|
* if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
|
|
@@ -18854,7 +19244,7 @@
|
|
__pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1239
|
|
+ /* "View.MemoryView":1242
|
|
*
|
|
* if slice_is_contig(src[0], order, ndim):
|
|
* memcpy(result, src.data, size) # <<<<<<<<<<<<<<
|
|
@@ -18863,7 +19253,7 @@
|
|
*/
|
|
(void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
|
|
|
|
- /* "View.MemoryView":1238
|
|
+ /* "View.MemoryView":1241
|
|
* tmpslice.strides[i] = 0
|
|
*
|
|
* if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
|
|
@@ -18873,7 +19263,7 @@
|
|
goto __pyx_L9;
|
|
}
|
|
|
|
- /* "View.MemoryView":1241
|
|
+ /* "View.MemoryView":1244
|
|
* memcpy(result, src.data, size)
|
|
* else:
|
|
* copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
|
|
@@ -18885,7 +19275,7 @@
|
|
}
|
|
__pyx_L9:;
|
|
|
|
- /* "View.MemoryView":1243
|
|
+ /* "View.MemoryView":1246
|
|
* copy_strided_to_strided(src, tmpslice, ndim, itemsize)
|
|
*
|
|
* return result # <<<<<<<<<<<<<<
|
|
@@ -18895,7 +19285,7 @@
|
|
__pyx_r = __pyx_v_result;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1205
|
|
+ /* "View.MemoryView":1208
|
|
*
|
|
* @cname('__pyx_memoryview_copy_data_to_temp')
|
|
* cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
|
|
@@ -18919,7 +19309,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1248
|
|
+/* "View.MemoryView":1251
|
|
*
|
|
* @cname('__pyx_memoryview_err_extents')
|
|
* cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
|
|
@@ -18934,25 +19324,28 @@
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
#ifdef WITH_THREAD
|
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
#endif
|
|
__Pyx_RefNannySetupContext("_err_extents", 0);
|
|
|
|
- /* "View.MemoryView":1251
|
|
+ /* "View.MemoryView":1254
|
|
* Py_ssize_t extent2) except -1 with gil:
|
|
* raise ValueError("got differing extents in dimension %d (got %d and %d)" %
|
|
* (i, extent1, extent2)) # <<<<<<<<<<<<<<
|
|
*
|
|
* @cname('__pyx_memoryview_err_dim')
|
|
*/
|
|
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
|
|
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
|
|
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
|
|
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error)
|
|
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
|
|
@@ -18964,24 +19357,24 @@
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
|
|
- /* "View.MemoryView":1250
|
|
+ /* "View.MemoryView":1253
|
|
* cdef int _err_extents(int i, Py_ssize_t extent1,
|
|
* Py_ssize_t extent2) except -1 with gil:
|
|
* raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
|
|
* (i, extent1, extent2))
|
|
*
|
|
*/
|
|
- __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error)
|
|
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
- __PYX_ERR(0, 1250, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 1253, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1248
|
|
+ /* "View.MemoryView":1251
|
|
*
|
|
* @cname('__pyx_memoryview_err_extents')
|
|
* cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
|
|
@@ -19004,7 +19397,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1254
|
|
+/* "View.MemoryView":1257
|
|
*
|
|
* @cname('__pyx_memoryview_err_dim')
|
|
* cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
|
|
@@ -19019,24 +19412,27 @@
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
#ifdef WITH_THREAD
|
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
#endif
|
|
__Pyx_RefNannySetupContext("_err_dim", 0);
|
|
__Pyx_INCREF(__pyx_v_error);
|
|
|
|
- /* "View.MemoryView":1255
|
|
+ /* "View.MemoryView":1258
|
|
* @cname('__pyx_memoryview_err_dim')
|
|
* cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
|
|
* raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
|
|
*
|
|
* @cname('__pyx_memoryview_err')
|
|
*/
|
|
- __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
|
|
+ __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
- __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
|
|
+ __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
@@ -19054,14 +19450,14 @@
|
|
__pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
|
|
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
- __PYX_ERR(0, 1255, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 1258, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1254
|
|
+ /* "View.MemoryView":1257
|
|
*
|
|
* @cname('__pyx_memoryview_err_dim')
|
|
* cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
|
|
@@ -19085,7 +19481,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1258
|
|
+/* "View.MemoryView":1261
|
|
*
|
|
* @cname('__pyx_memoryview_err')
|
|
* cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
|
|
@@ -19101,13 +19497,16 @@
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
#ifdef WITH_THREAD
|
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
#endif
|
|
__Pyx_RefNannySetupContext("_err", 0);
|
|
__Pyx_INCREF(__pyx_v_error);
|
|
|
|
- /* "View.MemoryView":1259
|
|
+ /* "View.MemoryView":1262
|
|
* @cname('__pyx_memoryview_err')
|
|
* cdef int _err(object error, char *msg) except -1 with gil:
|
|
* if msg != NULL: # <<<<<<<<<<<<<<
|
|
@@ -19117,14 +19516,14 @@
|
|
__pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
- /* "View.MemoryView":1260
|
|
+ /* "View.MemoryView":1263
|
|
* cdef int _err(object error, char *msg) except -1 with gil:
|
|
* if msg != NULL:
|
|
* raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* raise error
|
|
*/
|
|
- __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
|
|
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_error);
|
|
__pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
|
|
@@ -19140,14 +19539,14 @@
|
|
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
|
|
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
- __PYX_ERR(0, 1260, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 1263, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1259
|
|
+ /* "View.MemoryView":1262
|
|
* @cname('__pyx_memoryview_err')
|
|
* cdef int _err(object error, char *msg) except -1 with gil:
|
|
* if msg != NULL: # <<<<<<<<<<<<<<
|
|
@@ -19156,7 +19555,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1262
|
|
+ /* "View.MemoryView":1265
|
|
* raise error(msg.decode('ascii'))
|
|
* else:
|
|
* raise error # <<<<<<<<<<<<<<
|
|
@@ -19165,10 +19564,10 @@
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_Raise(__pyx_v_error, 0, 0, 0);
|
|
- __PYX_ERR(0, 1262, __pyx_L1_error)
|
|
+ __PYX_ERR(0, 1265, __pyx_L1_error)
|
|
}
|
|
|
|
- /* "View.MemoryView":1258
|
|
+ /* "View.MemoryView":1261
|
|
*
|
|
* @cname('__pyx_memoryview_err')
|
|
* cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
|
|
@@ -19192,7 +19591,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1265
|
|
+/* "View.MemoryView":1268
|
|
*
|
|
* @cname('__pyx_memoryview_copy_contents')
|
|
* cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
|
|
@@ -19218,8 +19617,11 @@
|
|
int __pyx_t_6;
|
|
void *__pyx_t_7;
|
|
int __pyx_t_8;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
|
|
- /* "View.MemoryView":1273
|
|
+ /* "View.MemoryView":1276
|
|
* Check for overlapping memory and verify the shapes.
|
|
* """
|
|
* cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
|
|
@@ -19228,7 +19630,7 @@
|
|
*/
|
|
__pyx_v_tmpdata = NULL;
|
|
|
|
- /* "View.MemoryView":1274
|
|
+ /* "View.MemoryView":1277
|
|
* """
|
|
* cdef void *tmpdata = NULL
|
|
* cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
|
|
@@ -19238,7 +19640,7 @@
|
|
__pyx_t_1 = __pyx_v_src.memview->view.itemsize;
|
|
__pyx_v_itemsize = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1276
|
|
+ /* "View.MemoryView":1279
|
|
* cdef size_t itemsize = src.memview.view.itemsize
|
|
* cdef int i
|
|
* cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
|
|
@@ -19247,7 +19649,7 @@
|
|
*/
|
|
__pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
|
|
|
|
- /* "View.MemoryView":1277
|
|
+ /* "View.MemoryView":1280
|
|
* cdef int i
|
|
* cdef char order = get_best_order(&src, src_ndim)
|
|
* cdef bint broadcasting = False # <<<<<<<<<<<<<<
|
|
@@ -19256,7 +19658,7 @@
|
|
*/
|
|
__pyx_v_broadcasting = 0;
|
|
|
|
- /* "View.MemoryView":1278
|
|
+ /* "View.MemoryView":1281
|
|
* cdef char order = get_best_order(&src, src_ndim)
|
|
* cdef bint broadcasting = False
|
|
* cdef bint direct_copy = False # <<<<<<<<<<<<<<
|
|
@@ -19265,7 +19667,7 @@
|
|
*/
|
|
__pyx_v_direct_copy = 0;
|
|
|
|
- /* "View.MemoryView":1281
|
|
+ /* "View.MemoryView":1284
|
|
* cdef __Pyx_memviewslice tmp
|
|
*
|
|
* if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
|
|
@@ -19275,7 +19677,7 @@
|
|
__pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1282
|
|
+ /* "View.MemoryView":1285
|
|
*
|
|
* if src_ndim < dst_ndim:
|
|
* broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
|
|
@@ -19284,7 +19686,7 @@
|
|
*/
|
|
__pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
|
|
|
|
- /* "View.MemoryView":1281
|
|
+ /* "View.MemoryView":1284
|
|
* cdef __Pyx_memviewslice tmp
|
|
*
|
|
* if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
|
|
@@ -19294,7 +19696,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":1283
|
|
+ /* "View.MemoryView":1286
|
|
* if src_ndim < dst_ndim:
|
|
* broadcast_leading(&src, src_ndim, dst_ndim)
|
|
* elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
|
|
@@ -19304,7 +19706,7 @@
|
|
__pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1284
|
|
+ /* "View.MemoryView":1287
|
|
* broadcast_leading(&src, src_ndim, dst_ndim)
|
|
* elif dst_ndim < src_ndim:
|
|
* broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
|
|
@@ -19313,7 +19715,7 @@
|
|
*/
|
|
__pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
|
|
|
|
- /* "View.MemoryView":1283
|
|
+ /* "View.MemoryView":1286
|
|
* if src_ndim < dst_ndim:
|
|
* broadcast_leading(&src, src_ndim, dst_ndim)
|
|
* elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
|
|
@@ -19323,7 +19725,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":1286
|
|
+ /* "View.MemoryView":1289
|
|
* broadcast_leading(&dst, dst_ndim, src_ndim)
|
|
*
|
|
* cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
|
|
@@ -19339,7 +19741,7 @@
|
|
}
|
|
__pyx_v_ndim = __pyx_t_5;
|
|
|
|
- /* "View.MemoryView":1288
|
|
+ /* "View.MemoryView":1291
|
|
* cdef int ndim = max(src_ndim, dst_ndim)
|
|
*
|
|
* for i in range(ndim): # <<<<<<<<<<<<<<
|
|
@@ -19351,7 +19753,7 @@
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_i = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1289
|
|
+ /* "View.MemoryView":1292
|
|
*
|
|
* for i in range(ndim):
|
|
* if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
|
|
@@ -19361,7 +19763,7 @@
|
|
__pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1290
|
|
+ /* "View.MemoryView":1293
|
|
* for i in range(ndim):
|
|
* if src.shape[i] != dst.shape[i]:
|
|
* if src.shape[i] == 1: # <<<<<<<<<<<<<<
|
|
@@ -19371,7 +19773,7 @@
|
|
__pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1291
|
|
+ /* "View.MemoryView":1294
|
|
* if src.shape[i] != dst.shape[i]:
|
|
* if src.shape[i] == 1:
|
|
* broadcasting = True # <<<<<<<<<<<<<<
|
|
@@ -19380,7 +19782,7 @@
|
|
*/
|
|
__pyx_v_broadcasting = 1;
|
|
|
|
- /* "View.MemoryView":1292
|
|
+ /* "View.MemoryView":1295
|
|
* if src.shape[i] == 1:
|
|
* broadcasting = True
|
|
* src.strides[i] = 0 # <<<<<<<<<<<<<<
|
|
@@ -19389,7 +19791,7 @@
|
|
*/
|
|
(__pyx_v_src.strides[__pyx_v_i]) = 0;
|
|
|
|
- /* "View.MemoryView":1290
|
|
+ /* "View.MemoryView":1293
|
|
* for i in range(ndim):
|
|
* if src.shape[i] != dst.shape[i]:
|
|
* if src.shape[i] == 1: # <<<<<<<<<<<<<<
|
|
@@ -19399,7 +19801,7 @@
|
|
goto __pyx_L7;
|
|
}
|
|
|
|
- /* "View.MemoryView":1294
|
|
+ /* "View.MemoryView":1297
|
|
* src.strides[i] = 0
|
|
* else:
|
|
* _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
|
|
@@ -19407,11 +19809,11 @@
|
|
* if src.suboffsets[i] >= 0:
|
|
*/
|
|
/*else*/ {
|
|
- __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1294, __pyx_L1_error)
|
|
+ __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error)
|
|
}
|
|
__pyx_L7:;
|
|
|
|
- /* "View.MemoryView":1289
|
|
+ /* "View.MemoryView":1292
|
|
*
|
|
* for i in range(ndim):
|
|
* if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
|
|
@@ -19420,7 +19822,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1296
|
|
+ /* "View.MemoryView":1299
|
|
* _err_extents(i, dst.shape[i], src.shape[i])
|
|
*
|
|
* if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
|
|
@@ -19430,16 +19832,16 @@
|
|
__pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1297
|
|
+ /* "View.MemoryView":1300
|
|
*
|
|
* if src.suboffsets[i] >= 0:
|
|
* _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
|
|
*
|
|
* if slices_overlap(&src, &dst, ndim, itemsize):
|
|
*/
|
|
- __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error)
|
|
+ __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1300, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1296
|
|
+ /* "View.MemoryView":1299
|
|
* _err_extents(i, dst.shape[i], src.shape[i])
|
|
*
|
|
* if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
|
|
@@ -19449,7 +19851,7 @@
|
|
}
|
|
}
|
|
|
|
- /* "View.MemoryView":1299
|
|
+ /* "View.MemoryView":1302
|
|
* _err_dim(ValueError, "Dimension %d is not direct", i)
|
|
*
|
|
* if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
|
|
@@ -19459,7 +19861,7 @@
|
|
__pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1301
|
|
+ /* "View.MemoryView":1304
|
|
* if slices_overlap(&src, &dst, ndim, itemsize):
|
|
*
|
|
* if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
|
|
@@ -19469,7 +19871,7 @@
|
|
__pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1302
|
|
+ /* "View.MemoryView":1305
|
|
*
|
|
* if not slice_is_contig(src, order, ndim):
|
|
* order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
|
|
@@ -19478,7 +19880,7 @@
|
|
*/
|
|
__pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
|
|
|
|
- /* "View.MemoryView":1301
|
|
+ /* "View.MemoryView":1304
|
|
* if slices_overlap(&src, &dst, ndim, itemsize):
|
|
*
|
|
* if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
|
|
@@ -19487,17 +19889,17 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1304
|
|
+ /* "View.MemoryView":1307
|
|
* order = get_best_order(&dst, ndim)
|
|
*
|
|
* tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
|
|
* src = tmp
|
|
*
|
|
*/
|
|
- __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1304, __pyx_L1_error)
|
|
+ __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1307, __pyx_L1_error)
|
|
__pyx_v_tmpdata = __pyx_t_7;
|
|
|
|
- /* "View.MemoryView":1305
|
|
+ /* "View.MemoryView":1308
|
|
*
|
|
* tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
|
|
* src = tmp # <<<<<<<<<<<<<<
|
|
@@ -19506,7 +19908,7 @@
|
|
*/
|
|
__pyx_v_src = __pyx_v_tmp;
|
|
|
|
- /* "View.MemoryView":1299
|
|
+ /* "View.MemoryView":1302
|
|
* _err_dim(ValueError, "Dimension %d is not direct", i)
|
|
*
|
|
* if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
|
|
@@ -19515,7 +19917,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1307
|
|
+ /* "View.MemoryView":1310
|
|
* src = tmp
|
|
*
|
|
* if not broadcasting: # <<<<<<<<<<<<<<
|
|
@@ -19525,7 +19927,7 @@
|
|
__pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1310
|
|
+ /* "View.MemoryView":1313
|
|
*
|
|
*
|
|
* if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
|
|
@@ -19535,7 +19937,7 @@
|
|
__pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1311
|
|
+ /* "View.MemoryView":1314
|
|
*
|
|
* if slice_is_contig(src, 'C', ndim):
|
|
* direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
|
|
@@ -19544,7 +19946,7 @@
|
|
*/
|
|
__pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
|
|
|
|
- /* "View.MemoryView":1310
|
|
+ /* "View.MemoryView":1313
|
|
*
|
|
*
|
|
* if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
|
|
@@ -19554,7 +19956,7 @@
|
|
goto __pyx_L12;
|
|
}
|
|
|
|
- /* "View.MemoryView":1312
|
|
+ /* "View.MemoryView":1315
|
|
* if slice_is_contig(src, 'C', ndim):
|
|
* direct_copy = slice_is_contig(dst, 'C', ndim)
|
|
* elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
|
|
@@ -19564,7 +19966,7 @@
|
|
__pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1313
|
|
+ /* "View.MemoryView":1316
|
|
* direct_copy = slice_is_contig(dst, 'C', ndim)
|
|
* elif slice_is_contig(src, 'F', ndim):
|
|
* direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
|
|
@@ -19573,7 +19975,7 @@
|
|
*/
|
|
__pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
|
|
|
|
- /* "View.MemoryView":1312
|
|
+ /* "View.MemoryView":1315
|
|
* if slice_is_contig(src, 'C', ndim):
|
|
* direct_copy = slice_is_contig(dst, 'C', ndim)
|
|
* elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
|
|
@@ -19583,7 +19985,7 @@
|
|
}
|
|
__pyx_L12:;
|
|
|
|
- /* "View.MemoryView":1315
|
|
+ /* "View.MemoryView":1318
|
|
* direct_copy = slice_is_contig(dst, 'F', ndim)
|
|
*
|
|
* if direct_copy: # <<<<<<<<<<<<<<
|
|
@@ -19593,7 +19995,7 @@
|
|
__pyx_t_2 = (__pyx_v_direct_copy != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
- /* "View.MemoryView":1317
|
|
+ /* "View.MemoryView":1320
|
|
* if direct_copy:
|
|
*
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
|
|
@@ -19602,7 +20004,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
|
|
|
|
- /* "View.MemoryView":1318
|
|
+ /* "View.MemoryView":1321
|
|
*
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False)
|
|
* memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
|
|
@@ -19611,7 +20013,7 @@
|
|
*/
|
|
(void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
|
|
|
|
- /* "View.MemoryView":1319
|
|
+ /* "View.MemoryView":1322
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False)
|
|
* memcpy(dst.data, src.data, slice_get_size(&src, ndim))
|
|
* refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
|
|
@@ -19620,7 +20022,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
|
|
|
|
- /* "View.MemoryView":1320
|
|
+ /* "View.MemoryView":1323
|
|
* memcpy(dst.data, src.data, slice_get_size(&src, ndim))
|
|
* refcount_copying(&dst, dtype_is_object, ndim, True)
|
|
* free(tmpdata) # <<<<<<<<<<<<<<
|
|
@@ -19629,7 +20031,7 @@
|
|
*/
|
|
free(__pyx_v_tmpdata);
|
|
|
|
- /* "View.MemoryView":1321
|
|
+ /* "View.MemoryView":1324
|
|
* refcount_copying(&dst, dtype_is_object, ndim, True)
|
|
* free(tmpdata)
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
@@ -19639,7 +20041,7 @@
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1315
|
|
+ /* "View.MemoryView":1318
|
|
* direct_copy = slice_is_contig(dst, 'F', ndim)
|
|
*
|
|
* if direct_copy: # <<<<<<<<<<<<<<
|
|
@@ -19648,7 +20050,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1307
|
|
+ /* "View.MemoryView":1310
|
|
* src = tmp
|
|
*
|
|
* if not broadcasting: # <<<<<<<<<<<<<<
|
|
@@ -19657,7 +20059,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1323
|
|
+ /* "View.MemoryView":1326
|
|
* return 0
|
|
*
|
|
* if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
|
|
@@ -19671,25 +20073,25 @@
|
|
__pyx_t_8 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_8) {
|
|
|
|
- /* "View.MemoryView":1326
|
|
+ /* "View.MemoryView":1329
|
|
*
|
|
*
|
|
* transpose_memslice(&src) # <<<<<<<<<<<<<<
|
|
* transpose_memslice(&dst)
|
|
*
|
|
*/
|
|
- __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1326, __pyx_L1_error)
|
|
+ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1329, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1327
|
|
+ /* "View.MemoryView":1330
|
|
*
|
|
* transpose_memslice(&src)
|
|
* transpose_memslice(&dst) # <<<<<<<<<<<<<<
|
|
*
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False)
|
|
*/
|
|
- __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1327, __pyx_L1_error)
|
|
+ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1330, __pyx_L1_error)
|
|
|
|
- /* "View.MemoryView":1323
|
|
+ /* "View.MemoryView":1326
|
|
* return 0
|
|
*
|
|
* if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
|
|
@@ -19698,7 +20100,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1329
|
|
+ /* "View.MemoryView":1332
|
|
* transpose_memslice(&dst)
|
|
*
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
|
|
@@ -19707,7 +20109,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
|
|
|
|
- /* "View.MemoryView":1330
|
|
+ /* "View.MemoryView":1333
|
|
*
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False)
|
|
* copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
|
|
@@ -19716,7 +20118,7 @@
|
|
*/
|
|
copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
|
|
|
|
- /* "View.MemoryView":1331
|
|
+ /* "View.MemoryView":1334
|
|
* refcount_copying(&dst, dtype_is_object, ndim, False)
|
|
* copy_strided_to_strided(&src, &dst, ndim, itemsize)
|
|
* refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
|
|
@@ -19725,7 +20127,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
|
|
|
|
- /* "View.MemoryView":1333
|
|
+ /* "View.MemoryView":1336
|
|
* refcount_copying(&dst, dtype_is_object, ndim, True)
|
|
*
|
|
* free(tmpdata) # <<<<<<<<<<<<<<
|
|
@@ -19734,7 +20136,7 @@
|
|
*/
|
|
free(__pyx_v_tmpdata);
|
|
|
|
- /* "View.MemoryView":1334
|
|
+ /* "View.MemoryView":1337
|
|
*
|
|
* free(tmpdata)
|
|
* return 0 # <<<<<<<<<<<<<<
|
|
@@ -19744,7 +20146,7 @@
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
|
|
- /* "View.MemoryView":1265
|
|
+ /* "View.MemoryView":1268
|
|
*
|
|
* @cname('__pyx_memoryview_copy_contents')
|
|
* cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
|
|
@@ -19768,7 +20170,7 @@
|
|
return __pyx_r;
|
|
}
|
|
|
|
-/* "View.MemoryView":1337
|
|
+/* "View.MemoryView":1340
|
|
*
|
|
* @cname('__pyx_memoryview_broadcast_leading')
|
|
* cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
|
|
@@ -19783,7 +20185,7 @@
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
|
|
- /* "View.MemoryView":1341
|
|
+ /* "View.MemoryView":1344
|
|
* int ndim_other) nogil:
|
|
* cdef int i
|
|
* cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
|
|
@@ -19792,7 +20194,7 @@
|
|
*/
|
|
__pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
|
|
|
|
- /* "View.MemoryView":1343
|
|
+ /* "View.MemoryView":1346
|
|
* cdef int offset = ndim_other - ndim
|
|
*
|
|
* for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
|
|
@@ -19802,7 +20204,7 @@
|
|
for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
|
|
__pyx_v_i = __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1344
|
|
+ /* "View.MemoryView":1347
|
|
*
|
|
* for i in range(ndim - 1, -1, -1):
|
|
* mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
|
|
@@ -19811,7 +20213,7 @@
|
|
*/
|
|
(__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
|
|
|
|
- /* "View.MemoryView":1345
|
|
+ /* "View.MemoryView":1348
|
|
* for i in range(ndim - 1, -1, -1):
|
|
* mslice.shape[i + offset] = mslice.shape[i]
|
|
* mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
|
|
@@ -19820,7 +20222,7 @@
|
|
*/
|
|
(__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
|
|
|
|
- /* "View.MemoryView":1346
|
|
+ /* "View.MemoryView":1349
|
|
* mslice.shape[i + offset] = mslice.shape[i]
|
|
* mslice.strides[i + offset] = mslice.strides[i]
|
|
* mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
|
|
@@ -19830,7 +20232,7 @@
|
|
(__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
|
|
}
|
|
|
|
- /* "View.MemoryView":1348
|
|
+ /* "View.MemoryView":1351
|
|
* mslice.suboffsets[i + offset] = mslice.suboffsets[i]
|
|
*
|
|
* for i in range(offset): # <<<<<<<<<<<<<<
|
|
@@ -19842,7 +20244,7 @@
|
|
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
|
|
__pyx_v_i = __pyx_t_3;
|
|
|
|
- /* "View.MemoryView":1349
|
|
+ /* "View.MemoryView":1352
|
|
*
|
|
* for i in range(offset):
|
|
* mslice.shape[i] = 1 # <<<<<<<<<<<<<<
|
|
@@ -19851,7 +20253,7 @@
|
|
*/
|
|
(__pyx_v_mslice->shape[__pyx_v_i]) = 1;
|
|
|
|
- /* "View.MemoryView":1350
|
|
+ /* "View.MemoryView":1353
|
|
* for i in range(offset):
|
|
* mslice.shape[i] = 1
|
|
* mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
|
|
@@ -19860,7 +20262,7 @@
|
|
*/
|
|
(__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
|
|
|
|
- /* "View.MemoryView":1351
|
|
+ /* "View.MemoryView":1354
|
|
* mslice.shape[i] = 1
|
|
* mslice.strides[i] = mslice.strides[0]
|
|
* mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
|
|
@@ -19870,7 +20272,7 @@
|
|
(__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
|
|
}
|
|
|
|
- /* "View.MemoryView":1337
|
|
+ /* "View.MemoryView":1340
|
|
*
|
|
* @cname('__pyx_memoryview_broadcast_leading')
|
|
* cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
|
|
@@ -19881,7 +20283,7 @@
|
|
/* function exit code */
|
|
}
|
|
|
|
-/* "View.MemoryView":1359
|
|
+/* "View.MemoryView":1362
|
|
*
|
|
* @cname('__pyx_memoryview_refcount_copying')
|
|
* cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
|
|
@@ -19892,7 +20294,7 @@
|
|
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
|
|
int __pyx_t_1;
|
|
|
|
- /* "View.MemoryView":1363
|
|
+ /* "View.MemoryView":1366
|
|
*
|
|
*
|
|
* if dtype_is_object: # <<<<<<<<<<<<<<
|
|
@@ -19902,7 +20304,7 @@
|
|
__pyx_t_1 = (__pyx_v_dtype_is_object != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1364
|
|
+ /* "View.MemoryView":1367
|
|
*
|
|
* if dtype_is_object:
|
|
* refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
|
|
@@ -19911,7 +20313,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
|
|
|
|
- /* "View.MemoryView":1363
|
|
+ /* "View.MemoryView":1366
|
|
*
|
|
*
|
|
* if dtype_is_object: # <<<<<<<<<<<<<<
|
|
@@ -19920,7 +20322,7 @@
|
|
*/
|
|
}
|
|
|
|
- /* "View.MemoryView":1359
|
|
+ /* "View.MemoryView":1362
|
|
*
|
|
* @cname('__pyx_memoryview_refcount_copying')
|
|
* cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
|
|
@@ -19931,7 +20333,7 @@
|
|
/* function exit code */
|
|
}
|
|
|
|
-/* "View.MemoryView":1368
|
|
+/* "View.MemoryView":1371
|
|
*
|
|
* @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
|
|
* cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
|
|
@@ -19946,7 +20348,7 @@
|
|
#endif
|
|
__Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
|
|
|
|
- /* "View.MemoryView":1371
|
|
+ /* "View.MemoryView":1374
|
|
* Py_ssize_t *strides, int ndim,
|
|
* bint inc) with gil:
|
|
* refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
|
|
@@ -19955,7 +20357,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
|
|
|
|
- /* "View.MemoryView":1368
|
|
+ /* "View.MemoryView":1371
|
|
*
|
|
* @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
|
|
* cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
|
|
@@ -19970,7 +20372,7 @@
|
|
#endif
|
|
}
|
|
|
|
-/* "View.MemoryView":1374
|
|
+/* "View.MemoryView":1377
|
|
*
|
|
* @cname('__pyx_memoryview_refcount_objects_in_slice')
|
|
* cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
|
|
@@ -19987,7 +20389,7 @@
|
|
int __pyx_t_4;
|
|
__Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
|
|
|
|
- /* "View.MemoryView":1378
|
|
+ /* "View.MemoryView":1381
|
|
* cdef Py_ssize_t i
|
|
*
|
|
* for i in range(shape[0]): # <<<<<<<<<<<<<<
|
|
@@ -19999,7 +20401,7 @@
|
|
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
|
|
__pyx_v_i = __pyx_t_3;
|
|
|
|
- /* "View.MemoryView":1379
|
|
+ /* "View.MemoryView":1382
|
|
*
|
|
* for i in range(shape[0]):
|
|
* if ndim == 1: # <<<<<<<<<<<<<<
|
|
@@ -20009,7 +20411,7 @@
|
|
__pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
- /* "View.MemoryView":1380
|
|
+ /* "View.MemoryView":1383
|
|
* for i in range(shape[0]):
|
|
* if ndim == 1:
|
|
* if inc: # <<<<<<<<<<<<<<
|
|
@@ -20019,7 +20421,7 @@
|
|
__pyx_t_4 = (__pyx_v_inc != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
- /* "View.MemoryView":1381
|
|
+ /* "View.MemoryView":1384
|
|
* if ndim == 1:
|
|
* if inc:
|
|
* Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
|
|
@@ -20028,7 +20430,7 @@
|
|
*/
|
|
Py_INCREF((((PyObject **)__pyx_v_data)[0]));
|
|
|
|
- /* "View.MemoryView":1380
|
|
+ /* "View.MemoryView":1383
|
|
* for i in range(shape[0]):
|
|
* if ndim == 1:
|
|
* if inc: # <<<<<<<<<<<<<<
|
|
@@ -20038,7 +20440,7 @@
|
|
goto __pyx_L6;
|
|
}
|
|
|
|
- /* "View.MemoryView":1383
|
|
+ /* "View.MemoryView":1386
|
|
* Py_INCREF((<PyObject **> data)[0])
|
|
* else:
|
|
* Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
|
|
@@ -20050,7 +20452,7 @@
|
|
}
|
|
__pyx_L6:;
|
|
|
|
- /* "View.MemoryView":1379
|
|
+ /* "View.MemoryView":1382
|
|
*
|
|
* for i in range(shape[0]):
|
|
* if ndim == 1: # <<<<<<<<<<<<<<
|
|
@@ -20060,7 +20462,7 @@
|
|
goto __pyx_L5;
|
|
}
|
|
|
|
- /* "View.MemoryView":1385
|
|
+ /* "View.MemoryView":1388
|
|
* Py_DECREF((<PyObject **> data)[0])
|
|
* else:
|
|
* refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
|
|
@@ -20069,7 +20471,7 @@
|
|
*/
|
|
/*else*/ {
|
|
|
|
- /* "View.MemoryView":1386
|
|
+ /* "View.MemoryView":1389
|
|
* else:
|
|
* refcount_objects_in_slice(data, shape + 1, strides + 1,
|
|
* ndim - 1, inc) # <<<<<<<<<<<<<<
|
|
@@ -20080,7 +20482,7 @@
|
|
}
|
|
__pyx_L5:;
|
|
|
|
- /* "View.MemoryView":1388
|
|
+ /* "View.MemoryView":1391
|
|
* ndim - 1, inc)
|
|
*
|
|
* data += strides[0] # <<<<<<<<<<<<<<
|
|
@@ -20090,7 +20492,7 @@
|
|
__pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
|
|
}
|
|
|
|
- /* "View.MemoryView":1374
|
|
+ /* "View.MemoryView":1377
|
|
*
|
|
* @cname('__pyx_memoryview_refcount_objects_in_slice')
|
|
* cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
|
|
@@ -20102,7 +20504,7 @@
|
|
__Pyx_RefNannyFinishContext();
|
|
}
|
|
|
|
-/* "View.MemoryView":1394
|
|
+/* "View.MemoryView":1397
|
|
*
|
|
* @cname('__pyx_memoryview_slice_assign_scalar')
|
|
* cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
|
|
@@ -20112,7 +20514,7 @@
|
|
|
|
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
|
|
|
|
- /* "View.MemoryView":1397
|
|
+ /* "View.MemoryView":1400
|
|
* size_t itemsize, void *item,
|
|
* bint dtype_is_object) nogil:
|
|
* refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
|
|
@@ -20121,7 +20523,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
|
|
|
|
- /* "View.MemoryView":1398
|
|
+ /* "View.MemoryView":1401
|
|
* bint dtype_is_object) nogil:
|
|
* refcount_copying(dst, dtype_is_object, ndim, False)
|
|
* _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
|
|
@@ -20130,7 +20532,7 @@
|
|
*/
|
|
__pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
|
|
|
|
- /* "View.MemoryView":1400
|
|
+ /* "View.MemoryView":1403
|
|
* _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
|
|
* itemsize, item)
|
|
* refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
|
|
@@ -20139,7 +20541,7 @@
|
|
*/
|
|
__pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
|
|
|
|
- /* "View.MemoryView":1394
|
|
+ /* "View.MemoryView":1397
|
|
*
|
|
* @cname('__pyx_memoryview_slice_assign_scalar')
|
|
* cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
|
|
@@ -20150,7 +20552,7 @@
|
|
/* function exit code */
|
|
}
|
|
|
|
-/* "View.MemoryView":1404
|
|
+/* "View.MemoryView":1407
|
|
*
|
|
* @cname('__pyx_memoryview__slice_assign_scalar')
|
|
* cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
|
|
@@ -20167,7 +20569,7 @@
|
|
Py_ssize_t __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1408
|
|
+ /* "View.MemoryView":1411
|
|
* size_t itemsize, void *item) nogil:
|
|
* cdef Py_ssize_t i
|
|
* cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
|
|
@@ -20176,7 +20578,7 @@
|
|
*/
|
|
__pyx_v_stride = (__pyx_v_strides[0]);
|
|
|
|
- /* "View.MemoryView":1409
|
|
+ /* "View.MemoryView":1412
|
|
* cdef Py_ssize_t i
|
|
* cdef Py_ssize_t stride = strides[0]
|
|
* cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
|
|
@@ -20185,7 +20587,7 @@
|
|
*/
|
|
__pyx_v_extent = (__pyx_v_shape[0]);
|
|
|
|
- /* "View.MemoryView":1411
|
|
+ /* "View.MemoryView":1414
|
|
* cdef Py_ssize_t extent = shape[0]
|
|
*
|
|
* if ndim == 1: # <<<<<<<<<<<<<<
|
|
@@ -20195,7 +20597,7 @@
|
|
__pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
- /* "View.MemoryView":1412
|
|
+ /* "View.MemoryView":1415
|
|
*
|
|
* if ndim == 1:
|
|
* for i in range(extent): # <<<<<<<<<<<<<<
|
|
@@ -20207,7 +20609,7 @@
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_i = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1413
|
|
+ /* "View.MemoryView":1416
|
|
* if ndim == 1:
|
|
* for i in range(extent):
|
|
* memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
|
|
@@ -20216,7 +20618,7 @@
|
|
*/
|
|
(void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
|
|
|
|
- /* "View.MemoryView":1414
|
|
+ /* "View.MemoryView":1417
|
|
* for i in range(extent):
|
|
* memcpy(data, item, itemsize)
|
|
* data += stride # <<<<<<<<<<<<<<
|
|
@@ -20226,7 +20628,7 @@
|
|
__pyx_v_data = (__pyx_v_data + __pyx_v_stride);
|
|
}
|
|
|
|
- /* "View.MemoryView":1411
|
|
+ /* "View.MemoryView":1414
|
|
* cdef Py_ssize_t extent = shape[0]
|
|
*
|
|
* if ndim == 1: # <<<<<<<<<<<<<<
|
|
@@ -20236,7 +20638,7 @@
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
- /* "View.MemoryView":1416
|
|
+ /* "View.MemoryView":1419
|
|
* data += stride
|
|
* else:
|
|
* for i in range(extent): # <<<<<<<<<<<<<<
|
|
@@ -20249,7 +20651,7 @@
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_i = __pyx_t_4;
|
|
|
|
- /* "View.MemoryView":1417
|
|
+ /* "View.MemoryView":1420
|
|
* else:
|
|
* for i in range(extent):
|
|
* _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
|
|
@@ -20258,7 +20660,7 @@
|
|
*/
|
|
__pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
|
|
|
|
- /* "View.MemoryView":1419
|
|
+ /* "View.MemoryView":1422
|
|
* _slice_assign_scalar(data, shape + 1, strides + 1,
|
|
* ndim - 1, itemsize, item)
|
|
* data += stride # <<<<<<<<<<<<<<
|
|
@@ -20270,7 +20672,7 @@
|
|
}
|
|
__pyx_L3:;
|
|
|
|
- /* "View.MemoryView":1404
|
|
+ /* "View.MemoryView":1407
|
|
*
|
|
* @cname('__pyx_memoryview__slice_assign_scalar')
|
|
* cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
|
|
@@ -20294,6 +20696,9 @@
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
|
|
@@ -20371,6 +20776,9 @@
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
@@ -20559,6 +20967,9 @@
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
@@ -20725,7 +21136,12 @@
|
|
sizeof(struct __pyx_obj_4pcap_pcap_handler_ctx), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_4pcap_pcap_handler_ctx, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -20775,6 +21191,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_4pcap_bpf(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
|
|
@@ -20797,9 +21219,9 @@
|
|
{
|
|
PyObject *etype, *eval, *etb;
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
|
- ++Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
|
|
__pyx_pw_4pcap_3bpf_5__dealloc__(o);
|
|
- --Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
|
|
PyErr_Restore(etype, eval, etb);
|
|
}
|
|
(*Py_TYPE(o)->tp_free)(o);
|
|
@@ -20818,7 +21240,12 @@
|
|
sizeof(struct __pyx_obj_4pcap_bpf), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_4pcap_bpf, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -20868,6 +21295,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_4pcap_pcap(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
|
|
@@ -20890,9 +21323,9 @@
|
|
{
|
|
PyObject *etype, *eval, *etb;
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
|
- ++Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
|
|
__pyx_pw_4pcap_4pcap_35__dealloc__(o);
|
|
- --Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
|
|
PyErr_Restore(etype, eval, etb);
|
|
}
|
|
(*Py_TYPE(o)->tp_free)(o);
|
|
@@ -20966,7 +21399,12 @@
|
|
sizeof(struct __pyx_obj_4pcap_pcap), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_4pcap_pcap, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -21016,6 +21454,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
static struct __pyx_vtabstruct_array __pyx_vtable_array;
|
|
|
|
@@ -21049,9 +21493,9 @@
|
|
{
|
|
PyObject *etype, *eval, *etb;
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
|
- ++Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
|
|
__pyx_array___dealloc__(o);
|
|
- --Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
|
|
PyErr_Restore(etype, eval, etb);
|
|
}
|
|
Py_CLEAR(p->mode);
|
|
@@ -21144,7 +21588,12 @@
|
|
sizeof(struct __pyx_array_obj), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_array, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -21194,6 +21643,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
|
|
@@ -21252,7 +21707,12 @@
|
|
sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_Enum, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -21302,6 +21762,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
|
|
|
|
@@ -21338,9 +21804,9 @@
|
|
{
|
|
PyObject *etype, *eval, *etb;
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
|
- ++Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
|
|
__pyx_memoryview___dealloc__(o);
|
|
- --Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
|
|
PyErr_Restore(etype, eval, etb);
|
|
}
|
|
Py_CLEAR(p->obj);
|
|
@@ -21502,7 +21968,12 @@
|
|
sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_memoryview, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -21552,6 +22023,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
|
|
|
|
@@ -21577,9 +22054,9 @@
|
|
{
|
|
PyObject *etype, *eval, *etb;
|
|
PyErr_Fetch(&etype, &eval, &etb);
|
|
- ++Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
|
|
__pyx_memoryviewslice___dealloc__(o);
|
|
- --Py_REFCNT(o);
|
|
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
|
|
PyErr_Restore(etype, eval, etb);
|
|
}
|
|
Py_CLEAR(p->from_object);
|
|
@@ -21629,7 +22106,12 @@
|
|
sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
|
|
+ #if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4
|
|
+ 0, /*tp_vectorcall_offset*/
|
|
+ #endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
@@ -21687,6 +22169,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0, /*tp_vectorcall*/
|
|
+ #endif
|
|
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0, /*tp_print*/
|
|
+ #endif
|
|
};
|
|
|
|
static PyMethodDef __pyx_methods[] = {
|
|
@@ -21932,9 +22420,9 @@
|
|
__pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
__pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 151, __pyx_L1_error)
|
|
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 180, __pyx_L1_error)
|
|
- __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 400, __pyx_L1_error)
|
|
- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 609, __pyx_L1_error)
|
|
- __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 828, __pyx_L1_error)
|
|
+ __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 404, __pyx_L1_error)
|
|
+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 613, __pyx_L1_error)
|
|
+ __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 832, __pyx_L1_error)
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
@@ -22087,58 +22575,58 @@
|
|
__Pyx_GOTREF(__pyx_tuple__16);
|
|
__Pyx_GIVEREF(__pyx_tuple__16);
|
|
|
|
- /* "View.MemoryView":414
|
|
+ /* "View.MemoryView":418
|
|
* def __setitem__(memoryview self, object index, object value):
|
|
* if self.view.readonly:
|
|
* raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
|
|
*
|
|
* have_slices, index = _unellipsify(index, self.view.ndim)
|
|
*/
|
|
- __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 414, __pyx_L1_error)
|
|
+ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 418, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__17);
|
|
__Pyx_GIVEREF(__pyx_tuple__17);
|
|
|
|
- /* "View.MemoryView":491
|
|
+ /* "View.MemoryView":495
|
|
* result = struct.unpack(self.view.format, bytesitem)
|
|
* except struct.error:
|
|
* raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
|
|
* else:
|
|
* if len(self.view.format) == 1:
|
|
*/
|
|
- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 491, __pyx_L1_error)
|
|
+ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 495, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__18);
|
|
__Pyx_GIVEREF(__pyx_tuple__18);
|
|
|
|
- /* "View.MemoryView":516
|
|
+ /* "View.MemoryView":520
|
|
* def __getbuffer__(self, Py_buffer *info, int flags):
|
|
* if flags & PyBUF_WRITABLE and self.view.readonly:
|
|
* raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
|
|
*
|
|
* if flags & PyBUF_ND:
|
|
*/
|
|
- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 516, __pyx_L1_error)
|
|
+ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 520, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__19);
|
|
__Pyx_GIVEREF(__pyx_tuple__19);
|
|
|
|
- /* "View.MemoryView":566
|
|
+ /* "View.MemoryView":570
|
|
* if self.view.strides == NULL:
|
|
*
|
|
* raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
|
|
*
|
|
* return tuple([stride for stride in self.view.strides[:self.view.ndim]])
|
|
*/
|
|
- __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 566, __pyx_L1_error)
|
|
+ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 570, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__20);
|
|
__Pyx_GIVEREF(__pyx_tuple__20);
|
|
|
|
- /* "View.MemoryView":573
|
|
+ /* "View.MemoryView":577
|
|
* def suboffsets(self):
|
|
* if self.view.suboffsets == NULL:
|
|
* return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
|
|
*
|
|
* return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
|
|
*/
|
|
- __pyx_tuple__21 = PyTuple_New(1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 573, __pyx_L1_error)
|
|
+ __pyx_tuple__21 = PyTuple_New(1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 577, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__21);
|
|
__Pyx_INCREF(__pyx_int_neg_1);
|
|
__Pyx_GIVEREF(__pyx_int_neg_1);
|
|
@@ -22164,25 +22652,25 @@
|
|
__Pyx_GOTREF(__pyx_tuple__23);
|
|
__Pyx_GIVEREF(__pyx_tuple__23);
|
|
|
|
- /* "View.MemoryView":678
|
|
+ /* "View.MemoryView":682
|
|
* if item is Ellipsis:
|
|
* if not seen_ellipsis:
|
|
* result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
|
|
* seen_ellipsis = True
|
|
* else:
|
|
*/
|
|
- __pyx_slice__24 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 678, __pyx_L1_error)
|
|
+ __pyx_slice__24 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 682, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_slice__24);
|
|
__Pyx_GIVEREF(__pyx_slice__24);
|
|
|
|
- /* "View.MemoryView":699
|
|
+ /* "View.MemoryView":703
|
|
* for suboffset in suboffsets[:ndim]:
|
|
* if suboffset >= 0:
|
|
* raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 699, __pyx_L1_error)
|
|
+ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 703, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__25);
|
|
__Pyx_GIVEREF(__pyx_tuple__25);
|
|
|
|
@@ -22405,10 +22893,15 @@
|
|
|
|
static int __Pyx_modinit_type_init_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
|
|
/*--- Type init code ---*/
|
|
if (PyType_Ready(&__pyx_type_4pcap_pcap_handler_ctx) < 0) __PYX_ERR(1, 109, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_4pcap_pcap_handler_ctx.tp_print = 0;
|
|
+ #endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4pcap_pcap_handler_ctx.tp_dictoffset && __pyx_type_4pcap_pcap_handler_ctx.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_4pcap_pcap_handler_ctx.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
@@ -22416,7 +22909,9 @@
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4pcap_pcap_handler_ctx) < 0) __PYX_ERR(1, 109, __pyx_L1_error)
|
|
__pyx_ptype_4pcap_pcap_handler_ctx = &__pyx_type_4pcap_pcap_handler_ctx;
|
|
if (PyType_Ready(&__pyx_type_4pcap_bpf) < 0) __PYX_ERR(1, 177, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_4pcap_bpf.tp_print = 0;
|
|
+ #endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4pcap_bpf.tp_dictoffset && __pyx_type_4pcap_bpf.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_4pcap_bpf.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
@@ -22424,7 +22919,9 @@
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4pcap_bpf) < 0) __PYX_ERR(1, 177, __pyx_L1_error)
|
|
__pyx_ptype_4pcap_bpf = &__pyx_type_4pcap_bpf;
|
|
if (PyType_Ready(&__pyx_type_4pcap_pcap) < 0) __PYX_ERR(1, 198, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_4pcap_pcap.tp_print = 0;
|
|
+ #endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4pcap_pcap.tp_dictoffset && __pyx_type_4pcap_pcap.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_4pcap_pcap.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
@@ -22434,12 +22931,16 @@
|
|
__pyx_vtabptr_array = &__pyx_vtable_array;
|
|
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
|
|
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type___pyx_array.tp_print = 0;
|
|
+ #endif
|
|
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
__pyx_array_type = &__pyx_type___pyx_array;
|
|
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type___pyx_MemviewEnum.tp_print = 0;
|
|
+ #endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
@@ -22454,7 +22955,9 @@
|
|
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
|
|
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
|
|
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type___pyx_memoryview.tp_print = 0;
|
|
+ #endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
@@ -22466,13 +22969,15 @@
|
|
__pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
|
|
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
|
|
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
|
|
- if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
|
|
+ if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
|
|
+ #if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type___pyx_memoryviewslice.tp_print = 0;
|
|
+ #endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
- if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
|
|
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
|
|
+ if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
|
|
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
|
|
__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
@@ -22506,17 +23011,19 @@
|
|
}
|
|
|
|
|
|
-#if PY_MAJOR_VERSION < 3
|
|
-#ifdef CYTHON_NO_PYINIT_EXPORT
|
|
-#define __Pyx_PyMODINIT_FUNC void
|
|
-#else
|
|
+#ifndef CYTHON_NO_PYINIT_EXPORT
|
|
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
|
|
+#elif PY_MAJOR_VERSION < 3
|
|
+#ifdef __cplusplus
|
|
+#define __Pyx_PyMODINIT_FUNC extern "C" void
|
|
+#else
|
|
+#define __Pyx_PyMODINIT_FUNC void
|
|
#endif
|
|
#else
|
|
-#ifdef CYTHON_NO_PYINIT_EXPORT
|
|
-#define __Pyx_PyMODINIT_FUNC PyObject *
|
|
+#ifdef __cplusplus
|
|
+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
|
|
#else
|
|
-#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
|
|
+#define __Pyx_PyMODINIT_FUNC PyObject *
|
|
#endif
|
|
#endif
|
|
|
|
@@ -22601,6 +23108,9 @@
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
static PyThread_type_lock __pyx_t_4[8];
|
|
+ int __pyx_lineno = 0;
|
|
+ const char *__pyx_filename = NULL;
|
|
+ int __pyx_clineno = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
if (__pyx_m) {
|
|
@@ -22696,7 +23206,7 @@
|
|
(void)__Pyx_modinit_global_init_code();
|
|
(void)__Pyx_modinit_variable_export_code();
|
|
(void)__Pyx_modinit_function_export_code();
|
|
- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
|
|
+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
(void)__Pyx_modinit_type_import_code();
|
|
(void)__Pyx_modinit_variable_import_code();
|
|
(void)__Pyx_modinit_function_import_code();
|
|
@@ -23275,29 +23785,29 @@
|
|
__pyx_t_4[7] = PyThread_allocate_lock();
|
|
memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_4, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
|
|
|
|
- /* "View.MemoryView":545
|
|
+ /* "View.MemoryView":549
|
|
* info.obj = self
|
|
*
|
|
* __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
|
|
+ if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
PyType_Modified(__pyx_memoryview_type);
|
|
|
|
- /* "View.MemoryView":991
|
|
+ /* "View.MemoryView":995
|
|
* return self.from_object
|
|
*
|
|
* __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
- __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
|
|
+ __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
- if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
|
|
+ if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 995, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
PyType_Modified(__pyx_memoryviewslice_type);
|
|
|
|
@@ -23815,7 +24325,7 @@
|
|
return result;
|
|
}
|
|
#if 1 || PY_VERSION_HEX < 0x030600B1
|
|
-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
|
|
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
|
|
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
|
|
PyObject *globals = PyFunction_GET_GLOBALS(func);
|
|
PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
|
|
@@ -23886,12 +24396,12 @@
|
|
}
|
|
#if PY_MAJOR_VERSION >= 3
|
|
result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
|
|
- args, nargs,
|
|
+ args, (int)nargs,
|
|
k, (int)nk,
|
|
d, (int)nd, kwdefs, closure);
|
|
#else
|
|
result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
|
|
- args, nargs,
|
|
+ args, (int)nargs,
|
|
k, (int)nk,
|
|
d, (int)nd, closure);
|
|
#endif
|
|
@@ -24086,7 +24596,7 @@
|
|
}
|
|
name = first_kw_arg;
|
|
#if PY_MAJOR_VERSION < 3
|
|
- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
|
|
+ if (likely(PyString_Check(key))) {
|
|
while (*name) {
|
|
if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
|
|
&& _PyString_Eq(**name, key)) {
|
|
@@ -24113,7 +24623,7 @@
|
|
while (*name) {
|
|
int cmp = (**name == key) ? 0 :
|
|
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
|
|
- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
|
|
+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
|
|
#endif
|
|
PyUnicode_Compare(**name, key);
|
|
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
|
|
@@ -24129,7 +24639,7 @@
|
|
while (argname != first_kw_arg) {
|
|
int cmp = (**argname == key) ? 0 :
|
|
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
|
|
- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
|
|
+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
|
|
#endif
|
|
PyUnicode_Compare(**argname, key);
|
|
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
|
|
@@ -24327,7 +24837,7 @@
|
|
goto done;
|
|
}
|
|
|
|
-/* CythonFunction */
|
|
+/* CythonFunctionShared */
|
|
#include <structmember.h>
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
|
|
@@ -24634,10 +25144,9 @@
|
|
#else
|
|
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
|
|
#endif
|
|
-static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
|
|
- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
|
|
- __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
|
|
- if (op == NULL)
|
|
+static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
|
|
+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
|
|
+ if (unlikely(op == NULL))
|
|
return NULL;
|
|
op->flags = flags;
|
|
__Pyx_CyFunction_weakreflist(op) = NULL;
|
|
@@ -24658,12 +25167,12 @@
|
|
Py_XINCREF(code);
|
|
op->func_code = code;
|
|
op->defaults_pyobjects = 0;
|
|
+ op->defaults_size = 0;
|
|
op->defaults = NULL;
|
|
op->defaults_tuple = NULL;
|
|
op->defaults_kwdict = NULL;
|
|
op->defaults_getter = NULL;
|
|
op->func_annotations = NULL;
|
|
- PyObject_GC_Track(op);
|
|
return (PyObject *) op;
|
|
}
|
|
static int
|
|
@@ -24726,6 +25235,7 @@
|
|
}
|
|
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
|
|
{
|
|
+#if PY_MAJOR_VERSION < 3
|
|
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
|
|
if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
|
|
Py_INCREF(func);
|
|
@@ -24738,6 +25248,7 @@
|
|
}
|
|
if (obj == Py_None)
|
|
obj = NULL;
|
|
+#endif
|
|
return __Pyx_PyMethod_New(func, obj, type);
|
|
}
|
|
static PyObject*
|
|
@@ -24890,6 +25401,12 @@
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0,
|
|
#endif
|
|
+#if PY_VERSION_HEX >= 0x030800b1
|
|
+ 0,
|
|
+#endif
|
|
+#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
+ 0,
|
|
+#endif
|
|
};
|
|
static int __pyx_CyFunction_init(void) {
|
|
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
|
|
@@ -24905,6 +25422,7 @@
|
|
return PyErr_NoMemory();
|
|
memset(m->defaults, 0, size);
|
|
m->defaults_pyobjects = pyobjects;
|
|
+ m->defaults_size = size;
|
|
return m->defaults;
|
|
}
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
|
|
@@ -24923,6 +25441,19 @@
|
|
Py_INCREF(dict);
|
|
}
|
|
|
|
+/* CythonFunction */
|
|
+static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
|
|
+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
|
|
+ PyObject *op = __Pyx_CyFunction_Init(
|
|
+ PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
|
|
+ ml, flags, qualname, closure, module, globals, code
|
|
+ );
|
|
+ if (likely(op)) {
|
|
+ PyObject_GC_Track(op);
|
|
+ }
|
|
+ return op;
|
|
+}
|
|
+
|
|
/* GetItemInt */
|
|
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
|
|
PyObject *r;
|
|
@@ -25057,9 +25588,9 @@
|
|
if (stop < 0)
|
|
stop += length;
|
|
}
|
|
+ if (unlikely(stop <= start))
|
|
+ return __Pyx_NewRef(__pyx_empty_unicode);
|
|
length = stop - start;
|
|
- if (unlikely(length <= 0))
|
|
- return PyUnicode_FromUnicode(NULL, 0);
|
|
cstring += start;
|
|
if (decode_func) {
|
|
return decode_func(cstring, length, errors);
|
|
@@ -25526,7 +26057,7 @@
|
|
{
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (level == -1) {
|
|
- if (strchr(__Pyx_MODULE_NAME, '.')) {
|
|
+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
|
|
module = PyImport_ImportModuleLevelObject(
|
|
name, global_dict, empty_dict, list, 1);
|
|
if (!module) {
|
|
@@ -25880,6 +26411,28 @@
|
|
}
|
|
#endif
|
|
|
|
+/* PyObjectGetAttrStrNoError */
|
|
+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
|
|
+ __Pyx_PyThreadState_declare
|
|
+ __Pyx_PyThreadState_assign
|
|
+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
|
|
+ __Pyx_PyErr_Clear();
|
|
+}
|
|
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
|
|
+ PyObject *result;
|
|
+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
|
|
+ PyTypeObject* tp = Py_TYPE(obj);
|
|
+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
|
|
+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
|
|
+ }
|
|
+#endif
|
|
+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
|
|
+ if (unlikely(!result)) {
|
|
+ __Pyx_PyObject_GetAttrStr_ClearAttributeError();
|
|
+ }
|
|
+ return result;
|
|
+}
|
|
+
|
|
/* SetupReduce */
|
|
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
|
|
int ret;
|
|
@@ -25907,43 +26460,51 @@
|
|
PyObject *setstate = NULL;
|
|
PyObject *setstate_cython = NULL;
|
|
#if CYTHON_USE_PYTYPE_LOOKUP
|
|
- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
|
|
+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
|
|
#else
|
|
- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
|
|
+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
|
|
#endif
|
|
#if CYTHON_USE_PYTYPE_LOOKUP
|
|
- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
|
|
+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
|
|
#else
|
|
- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
|
|
+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
|
|
#endif
|
|
- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
|
|
+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
|
|
if (reduce_ex == object_reduce_ex) {
|
|
#if CYTHON_USE_PYTYPE_LOOKUP
|
|
- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
|
|
+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
|
|
#else
|
|
- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
|
|
+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
|
|
#endif
|
|
- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
|
|
+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
|
|
if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
|
|
- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
|
|
- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
|
|
- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
|
|
+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
|
|
+ if (likely(reduce_cython)) {
|
|
+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
|
|
+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
|
|
+ } else if (reduce == object_reduce || PyErr_Occurred()) {
|
|
+ goto __PYX_BAD;
|
|
+ }
|
|
setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
|
|
if (!setstate) PyErr_Clear();
|
|
if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
|
|
- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
|
|
- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
|
|
- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
|
|
+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
|
|
+ if (likely(setstate_cython)) {
|
|
+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
|
|
+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
|
|
+ } else if (!setstate || PyErr_Occurred()) {
|
|
+ goto __PYX_BAD;
|
|
+ }
|
|
}
|
|
PyType_Modified((PyTypeObject*)type_obj);
|
|
}
|
|
}
|
|
- goto GOOD;
|
|
-BAD:
|
|
+ goto __PYX_GOOD;
|
|
+__PYX_BAD:
|
|
if (!PyErr_Occurred())
|
|
PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
|
|
ret = -1;
|
|
-GOOD:
|
|
+__PYX_GOOD:
|
|
#if !CYTHON_USE_PYTYPE_LOOKUP
|
|
Py_XDECREF(object_reduce);
|
|
Py_XDECREF(object_reduce_ex);
|
|
@@ -25976,7 +26537,7 @@
|
|
|
|
/* CLineInTraceback */
|
|
#ifndef CYTHON_CLINE_IN_TRACEBACK
|
|
-static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
|
|
+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
|
|
PyObject *use_cline;
|
|
PyObject *ptype, *pvalue, *ptraceback;
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
@@ -26080,7 +26641,7 @@
|
|
if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
|
|
int new_max = __pyx_code_cache.max_count + 64;
|
|
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
|
|
- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
|
|
+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
|
|
if (unlikely(!entries)) {
|
|
return;
|
|
}
|
|
@@ -26438,7 +26999,7 @@
|
|
struct __pyx_memoryview_obj *memview_obj = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
|
|
for (i = 0; i < ndim; i++) {
|
|
- if (from_mvs->suboffsets[i] >= 0) {
|
|
+ if (unlikely(from_mvs->suboffsets[i] >= 0)) {
|
|
PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
|
|
"indirect dimensions (axis %d)", i);
|
|
goto fail;
|
|
@@ -26498,7 +27059,7 @@
|
|
int i, retval=-1;
|
|
Py_buffer *buf = &memview->view;
|
|
__Pyx_RefNannySetupContext("init_memviewslice", 0);
|
|
- if (memviewslice->memview || memviewslice->data) {
|
|
+ if (unlikely(memviewslice->memview || memviewslice->data)) {
|
|
PyErr_SetString(PyExc_ValueError,
|
|
"memviewslice is already initialized!");
|
|
goto fail;
|
|
@@ -26577,13 +27138,13 @@
|
|
{
|
|
int first_time;
|
|
struct __pyx_memoryview_obj *memview = memslice->memview;
|
|
- if (!memview || (PyObject *) memview == Py_None)
|
|
+ if (unlikely(!memview || (PyObject *) memview == Py_None))
|
|
return;
|
|
- if (__pyx_get_slice_count(memview) < 0)
|
|
+ if (unlikely(__pyx_get_slice_count(memview) < 0))
|
|
__pyx_fatalerror("Acquisition count is %d (line %d)",
|
|
__pyx_get_slice_count(memview), lineno);
|
|
first_time = __pyx_add_acquisition_count(memview) == 0;
|
|
- if (first_time) {
|
|
+ if (unlikely(first_time)) {
|
|
if (have_gil) {
|
|
Py_INCREF((PyObject *) memview);
|
|
} else {
|
|
@@ -26597,18 +27158,16 @@
|
|
int have_gil, int lineno) {
|
|
int last_time;
|
|
struct __pyx_memoryview_obj *memview = memslice->memview;
|
|
- if (!memview ) {
|
|
- return;
|
|
- } else if ((PyObject *) memview == Py_None) {
|
|
+ if (unlikely(!memview || (PyObject *) memview == Py_None)) {
|
|
memslice->memview = NULL;
|
|
return;
|
|
}
|
|
- if (__pyx_get_slice_count(memview) <= 0)
|
|
+ if (unlikely(__pyx_get_slice_count(memview) <= 0))
|
|
__pyx_fatalerror("Acquisition count is %d (line %d)",
|
|
__pyx_get_slice_count(memview), lineno);
|
|
last_time = __pyx_sub_acquisition_count(memview) == 1;
|
|
memslice->data = NULL;
|
|
- if (last_time) {
|
|
+ if (unlikely(last_time)) {
|
|
if (have_gil) {
|
|
Py_CLEAR(memslice->memview);
|
|
} else {
|