3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
8 #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10 #error Cython requires Python 2.6+ or Python 3.3+.
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
17 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
31 #define DL_IMPORT(t) t
34 #define DL_EXPORT(t) t
37 #ifndef HAVE_LONG_LONG
38 #if PY_VERSION_HEX >= 0x02070000
39 #define HAVE_LONG_LONG
43 #define PY_LONG_LONG LONG_LONG
46 #define Py_HUGE_VAL HUGE_VAL
49 #define CYTHON_COMPILING_IN_PYPY 1
50 #define CYTHON_COMPILING_IN_PYSTON 0
51 #define CYTHON_COMPILING_IN_CPYTHON 0
52 #undef CYTHON_USE_TYPE_SLOTS
53 #define CYTHON_USE_TYPE_SLOTS 0
54 #undef CYTHON_USE_PYTYPE_LOOKUP
55 #define CYTHON_USE_PYTYPE_LOOKUP 0
56 #if PY_VERSION_HEX < 0x03050000
57 #undef CYTHON_USE_ASYNC_SLOTS
58 #define CYTHON_USE_ASYNC_SLOTS 0
59 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60 #define CYTHON_USE_ASYNC_SLOTS 1
62 #undef CYTHON_USE_PYLIST_INTERNALS
63 #define CYTHON_USE_PYLIST_INTERNALS 0
64 #undef CYTHON_USE_UNICODE_INTERNALS
65 #define CYTHON_USE_UNICODE_INTERNALS 0
66 #undef CYTHON_USE_UNICODE_WRITER
67 #define CYTHON_USE_UNICODE_WRITER 0
68 #undef CYTHON_USE_PYLONG_INTERNALS
69 #define CYTHON_USE_PYLONG_INTERNALS 0
70 #undef CYTHON_AVOID_BORROWED_REFS
71 #define CYTHON_AVOID_BORROWED_REFS 1
72 #undef CYTHON_ASSUME_SAFE_MACROS
73 #define CYTHON_ASSUME_SAFE_MACROS 0
74 #undef CYTHON_UNPACK_METHODS
75 #define CYTHON_UNPACK_METHODS 0
76 #undef CYTHON_FAST_THREAD_STATE
77 #define CYTHON_FAST_THREAD_STATE 0
78 #undef CYTHON_FAST_PYCALL
79 #define CYTHON_FAST_PYCALL 0
80 #undef CYTHON_PEP489_MULTI_PHASE_INIT
81 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82 #undef CYTHON_USE_TP_FINALIZE
83 #define CYTHON_USE_TP_FINALIZE 0
84 #undef CYTHON_USE_DICT_VERSIONS
85 #define CYTHON_USE_DICT_VERSIONS 0
86 #undef CYTHON_USE_EXC_INFO_STACK
87 #define CYTHON_USE_EXC_INFO_STACK 0
88 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
91 #elif defined(PYSTON_VERSION)
92 #define CYTHON_COMPILING_IN_PYPY 0
93 #define CYTHON_COMPILING_IN_PYSTON 1
94 #define CYTHON_COMPILING_IN_CPYTHON 0
95 #ifndef CYTHON_USE_TYPE_SLOTS
96 #define CYTHON_USE_TYPE_SLOTS 1
98 #undef CYTHON_USE_PYTYPE_LOOKUP
99 #define CYTHON_USE_PYTYPE_LOOKUP 0
100 #undef CYTHON_USE_ASYNC_SLOTS
101 #define CYTHON_USE_ASYNC_SLOTS 0
102 #undef CYTHON_USE_PYLIST_INTERNALS
103 #define CYTHON_USE_PYLIST_INTERNALS 0
104 #ifndef CYTHON_USE_UNICODE_INTERNALS
105 #define CYTHON_USE_UNICODE_INTERNALS 1
107 #undef CYTHON_USE_UNICODE_WRITER
108 #define CYTHON_USE_UNICODE_WRITER 0
109 #undef CYTHON_USE_PYLONG_INTERNALS
110 #define CYTHON_USE_PYLONG_INTERNALS 0
111 #ifndef CYTHON_AVOID_BORROWED_REFS
112 #define CYTHON_AVOID_BORROWED_REFS 0
114 #ifndef CYTHON_ASSUME_SAFE_MACROS
115 #define CYTHON_ASSUME_SAFE_MACROS 1
117 #ifndef CYTHON_UNPACK_METHODS
118 #define CYTHON_UNPACK_METHODS 1
120 #undef CYTHON_FAST_THREAD_STATE
121 #define CYTHON_FAST_THREAD_STATE 0
122 #undef CYTHON_FAST_PYCALL
123 #define CYTHON_FAST_PYCALL 0
124 #undef CYTHON_PEP489_MULTI_PHASE_INIT
125 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126 #undef CYTHON_USE_TP_FINALIZE
127 #define CYTHON_USE_TP_FINALIZE 0
128 #undef CYTHON_USE_DICT_VERSIONS
129 #define CYTHON_USE_DICT_VERSIONS 0
130 #undef CYTHON_USE_EXC_INFO_STACK
131 #define CYTHON_USE_EXC_INFO_STACK 0
132 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
136 #define CYTHON_COMPILING_IN_PYPY 0
137 #define CYTHON_COMPILING_IN_PYSTON 0
138 #define CYTHON_COMPILING_IN_CPYTHON 1
139 #ifndef CYTHON_USE_TYPE_SLOTS
140 #define CYTHON_USE_TYPE_SLOTS 1
142 #if PY_VERSION_HEX < 0x02070000
143 #undef CYTHON_USE_PYTYPE_LOOKUP
144 #define CYTHON_USE_PYTYPE_LOOKUP 0
145 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146 #define CYTHON_USE_PYTYPE_LOOKUP 1
148 #if PY_MAJOR_VERSION < 3
149 #undef CYTHON_USE_ASYNC_SLOTS
150 #define CYTHON_USE_ASYNC_SLOTS 0
151 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152 #define CYTHON_USE_ASYNC_SLOTS 1
154 #if PY_VERSION_HEX < 0x02070000
155 #undef CYTHON_USE_PYLONG_INTERNALS
156 #define CYTHON_USE_PYLONG_INTERNALS 0
157 #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158 #define CYTHON_USE_PYLONG_INTERNALS 1
160 #ifndef CYTHON_USE_PYLIST_INTERNALS
161 #define CYTHON_USE_PYLIST_INTERNALS 1
163 #ifndef CYTHON_USE_UNICODE_INTERNALS
164 #define CYTHON_USE_UNICODE_INTERNALS 1
166 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167 #undef CYTHON_USE_UNICODE_WRITER
168 #define CYTHON_USE_UNICODE_WRITER 0
169 #elif !defined(CYTHON_USE_UNICODE_WRITER)
170 #define CYTHON_USE_UNICODE_WRITER 1
172 #ifndef CYTHON_AVOID_BORROWED_REFS
173 #define CYTHON_AVOID_BORROWED_REFS 0
175 #ifndef CYTHON_ASSUME_SAFE_MACROS
176 #define CYTHON_ASSUME_SAFE_MACROS 1
178 #ifndef CYTHON_UNPACK_METHODS
179 #define CYTHON_UNPACK_METHODS 1
181 #if PY_VERSION_HEX >= 0x030B00A4
182 #undef CYTHON_FAST_THREAD_STATE
183 #define CYTHON_FAST_THREAD_STATE 0
184 #elif !defined(CYTHON_FAST_THREAD_STATE)
185 #define CYTHON_FAST_THREAD_STATE 1
187 #ifndef CYTHON_FAST_PYCALL
188 #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
190 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
193 #ifndef CYTHON_USE_TP_FINALIZE
194 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
196 #ifndef CYTHON_USE_DICT_VERSIONS
197 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
199 #if PY_VERSION_HEX >= 0x030B00A4
200 #undef CYTHON_USE_EXC_INFO_STACK
201 #define CYTHON_USE_EXC_INFO_STACK 0
202 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203 #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
205 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
212 #if CYTHON_USE_PYLONG_INTERNALS
213 #if PY_MAJOR_VERSION < 3
214 #include "longintrepr.h"
220 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
223 #ifndef __has_attribute
224 #define __has_attribute(x) 0
226 #ifndef __has_cpp_attribute
227 #define __has_cpp_attribute(x) 0
229 #ifndef CYTHON_RESTRICT
230 #if defined(__GNUC__)
231 #define CYTHON_RESTRICT __restrict__
232 #elif defined(_MSC_VER) && _MSC_VER >= 1400
233 #define CYTHON_RESTRICT __restrict
234 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235 #define CYTHON_RESTRICT restrict
237 #define CYTHON_RESTRICT
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
245 # define CYTHON_UNUSED
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
250 # define CYTHON_UNUSED
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255 template<
class T>
void CYTHON_MAYBE_UNUSED_VAR(
const T& ) { }
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
269 #ifndef _MSC_STDINT_H_
271 typedef unsigned char uint8_t;
272 typedef unsigned int uint32_t;
274 typedef unsigned __int8 uint8_t;
275 typedef unsigned __int32 uint32_t;
281 #ifndef CYTHON_FALLTHROUGH
282 #if defined(__cplusplus) && __cplusplus >= 201103L
283 #if __has_cpp_attribute(fallthrough)
284 #define CYTHON_FALLTHROUGH [[fallthrough]]
285 #elif __has_cpp_attribute(clang::fallthrough)
286 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287 #elif __has_cpp_attribute(gnu::fallthrough)
288 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
291 #ifndef CYTHON_FALLTHROUGH
292 #if __has_attribute(fallthrough)
293 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
295 #define CYTHON_FALLTHROUGH
298 #if defined(__clang__ ) && defined(__apple_build_version__)
299 #if __apple_build_version__ < 7000000
300 #undef CYTHON_FALLTHROUGH
301 #define CYTHON_FALLTHROUGH
307 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
309 #ifndef CYTHON_INLINE
310 #if defined(__clang__)
311 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
313 #define CYTHON_INLINE inline
317 void __Pyx_call_destructor(
T& x) {
321 class __Pyx_FakeReference {
323 __Pyx_FakeReference() : ptr(NULL) { }
324 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<
T*>(&ref)) { }
325 T *operator->() {
return ptr; }
326 T *operator&() {
return ptr; }
327 operator T&() {
return *ptr; }
328 template<
typename U>
bool operator ==(
U other) {
return *ptr == other; }
329 template<
typename U>
bool operator !=(
U other) {
return *ptr != other; }
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335 #define Py_OptimizeFlag 0
337 #define __PYX_BUILD_PY_SSIZE_T "n"
338 #define CYTHON_FORMAT_SSIZE_T "z"
339 #if PY_MAJOR_VERSION < 3
340 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
341 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
342 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
343 #define __Pyx_DefaultClassType PyClass_Type
345 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
346 #define __Pyx_DefaultClassType PyType_Type
347 #if PY_VERSION_HEX >= 0x030B00A1
348 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(
int a,
int k,
int l,
int s,
int f,
349 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
350 PyObject *fv, PyObject *cell, PyObject* fn,
351 PyObject *name,
int fline, PyObject *lnos) {
352 PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
353 PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
354 const char *fn_cstr=NULL;
355 const char *name_cstr=NULL;
356 PyCodeObject* co=NULL;
357 PyObject *type, *value, *traceback;
358 PyErr_Fetch(&type, &value, &traceback);
359 if (!(kwds=PyDict_New()))
goto end;
360 if (!(argcount=PyLong_FromLong(a)))
goto end;
361 if (PyDict_SetItemString(kwds,
"co_argcount", argcount) != 0)
goto end;
362 if (!(posonlyargcount=PyLong_FromLong(0)))
goto end;
363 if (PyDict_SetItemString(kwds,
"co_posonlyargcount", posonlyargcount) != 0)
goto end;
364 if (!(kwonlyargcount=PyLong_FromLong(k)))
goto end;
365 if (PyDict_SetItemString(kwds,
"co_kwonlyargcount", kwonlyargcount) != 0)
goto end;
366 if (!(nlocals=PyLong_FromLong(l)))
goto end;
367 if (PyDict_SetItemString(kwds,
"co_nlocals", nlocals) != 0)
goto end;
368 if (!(stacksize=PyLong_FromLong(
s)))
goto end;
369 if (PyDict_SetItemString(kwds,
"co_stacksize", stacksize) != 0)
goto end;
370 if (!(flags=PyLong_FromLong(
f)))
goto end;
371 if (PyDict_SetItemString(kwds,
"co_flags", flags) != 0)
goto end;
372 if (PyDict_SetItemString(kwds,
"co_code", code) != 0)
goto end;
373 if (PyDict_SetItemString(kwds,
"co_consts",
c) != 0)
goto end;
374 if (PyDict_SetItemString(kwds,
"co_names",
n) != 0)
goto end;
375 if (PyDict_SetItemString(kwds,
"co_varnames",
v) != 0)
goto end;
376 if (PyDict_SetItemString(kwds,
"co_freevars", fv) != 0)
goto end;
377 if (PyDict_SetItemString(kwds,
"co_cellvars", cell) != 0)
goto end;
378 if (PyDict_SetItemString(kwds,
"co_linetable", lnos) != 0)
goto end;
379 if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL)))
goto end;
380 if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL)))
goto end;
381 if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline)))
goto end;
382 if (!(replace = PyObject_GetAttrString((PyObject*)co,
"replace")))
goto cleanup_code_too;
383 if (!(empty = PyTuple_New(0)))
goto cleanup_code_too;
384 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
385 Py_XDECREF((PyObject*)co);
386 co = (PyCodeObject*)call_result;
390 Py_XDECREF((PyObject*)co);
395 Py_XDECREF(argcount);
396 Py_XDECREF(posonlyargcount);
397 Py_XDECREF(kwonlyargcount);
399 Py_XDECREF(stacksize);
401 Py_XDECREF(call_result);
404 PyErr_Restore(type, value, traceback);
409 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
410 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
412 #define __Pyx_DefaultClassType PyType_Type
414 #ifndef Py_TPFLAGS_CHECKTYPES
415 #define Py_TPFLAGS_CHECKTYPES 0
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418 #define Py_TPFLAGS_HAVE_INDEX 0
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424 #define Py_TPFLAGS_HAVE_FINALIZE 0
426 #ifndef METH_STACKLESS
427 #define METH_STACKLESS 0
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430 #ifndef METH_FASTCALL
431 #define METH_FASTCALL 0x80
433 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *
self, PyObject *
const *args, Py_ssize_t nargs);
434 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *
self, PyObject *
const *args,
435 Py_ssize_t nargs, PyObject *kwnames);
437 #define __Pyx_PyCFunctionFast _PyCFunctionFast
438 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
440 #if CYTHON_FAST_PYCCALL
441 #define __Pyx_PyFastCFunction_Check(func)\
442 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
444 #define __Pyx_PyFastCFunction_Check(func) 0
446 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
447 #define PyObject_Malloc(s) PyMem_Malloc(s)
448 #define PyObject_Free(p) PyMem_Free(p)
449 #define PyObject_Realloc(p) PyMem_Realloc(p)
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
452 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
453 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
454 #define PyMem_RawFree(p) PyMem_Free(p)
456 #if CYTHON_COMPILING_IN_PYSTON
457 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
458 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
460 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
463 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
464 #define __Pyx_PyThreadState_Current PyThreadState_GET()
465 #elif PY_VERSION_HEX >= 0x03060000
466 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
467 #elif PY_VERSION_HEX >= 0x03000000
468 #define __Pyx_PyThreadState_Current PyThreadState_GET()
470 #define __Pyx_PyThreadState_Current _PyThreadState_Current
472 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
473 #include "pythread.h"
474 #define Py_tss_NEEDS_INIT 0
475 typedef int Py_tss_t;
476 static CYTHON_INLINE
int PyThread_tss_create(Py_tss_t *key) {
477 *key = PyThread_create_key();
480 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(
void) {
481 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(
sizeof(Py_tss_t));
482 *key = Py_tss_NEEDS_INIT;
485 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
488 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
489 return *key != Py_tss_NEEDS_INIT;
491 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
492 PyThread_delete_key(*key);
493 *key = Py_tss_NEEDS_INIT;
495 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
496 return PyThread_set_key_value(*key, value);
498 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
499 return PyThread_get_key_value(*key);
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
507 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
508 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
509 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
511 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
514 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
515 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
519 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
520 #define CYTHON_PEP393_ENABLED 1
521 #if defined(PyUnicode_IS_READY)
522 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
523 0 : _PyUnicode_Ready((PyObject *)(op)))
525 #define __Pyx_PyUnicode_READY(op) (0)
527 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
528 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
529 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
530 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
531 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
532 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
533 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
534 #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
535 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
536 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
538 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
541 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
544 #define CYTHON_PEP393_ENABLED 0
545 #define PyUnicode_1BYTE_KIND 1
546 #define PyUnicode_2BYTE_KIND 2
547 #define PyUnicode_4BYTE_KIND 4
548 #define __Pyx_PyUnicode_READY(op) (0)
549 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
550 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
551 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
552 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
553 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
554 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
555 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
556 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
558 #if CYTHON_COMPILING_IN_PYPY
559 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
560 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
562 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
563 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
564 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
575 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
576 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
577 #if PY_MAJOR_VERSION >= 3
578 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
580 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583 #define PyObject_ASCII(o) PyObject_Repr(o)
585 #if PY_MAJOR_VERSION >= 3
586 #define PyBaseString_Type PyUnicode_Type
587 #define PyStringObject PyUnicodeObject
588 #define PyString_Type PyUnicode_Type
589 #define PyString_Check PyUnicode_Check
590 #define PyString_CheckExact PyUnicode_CheckExact
591 #ifndef PyObject_Unicode
592 #define PyObject_Unicode PyObject_Str
595 #if PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
599 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
602 #ifndef PySet_CheckExact
603 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
605 #if PY_VERSION_HEX >= 0x030900A4
606 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
607 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
609 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
612 #if CYTHON_ASSUME_SAFE_MACROS
613 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
615 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
617 #if PY_MAJOR_VERSION >= 3
618 #define PyIntObject PyLongObject
619 #define PyInt_Type PyLong_Type
620 #define PyInt_Check(op) PyLong_Check(op)
621 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
622 #define PyInt_FromString PyLong_FromString
623 #define PyInt_FromUnicode PyLong_FromUnicode
624 #define PyInt_FromLong PyLong_FromLong
625 #define PyInt_FromSize_t PyLong_FromSize_t
626 #define PyInt_FromSsize_t PyLong_FromSsize_t
627 #define PyInt_AsLong PyLong_AsLong
628 #define PyInt_AS_LONG PyLong_AS_LONG
629 #define PyInt_AsSsize_t PyLong_AsSsize_t
630 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
631 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
632 #define PyNumber_Int PyNumber_Long
634 #if PY_MAJOR_VERSION >= 3
635 #define PyBoolObject PyLongObject
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638 #ifndef PyUnicode_InternFromString
639 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
642 #if PY_VERSION_HEX < 0x030200A4
643 typedef long Py_hash_t;
644 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
645 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
647 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
650 #if PY_MAJOR_VERSION >= 3
651 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
653 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
655 #if CYTHON_USE_ASYNC_SLOTS
656 #if PY_VERSION_HEX >= 0x030500B1
657 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
658 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
660 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
663 #define __Pyx_PyType_AsAsync(obj) NULL
665 #ifndef __Pyx_PyAsyncMethodsStruct
670 } __Pyx_PyAsyncMethodsStruct;
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674 #if !defined(_USE_MATH_DEFINES)
675 #define _USE_MATH_DEFINES
680 #define __PYX_NAN() ((float) NAN)
682 static CYTHON_INLINE
float __PYX_NAN() {
684 memset(&value, 0xFF,
sizeof(value));
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
691 #define __Pyx_truncl truncl
694 #define __PYX_MARK_ERR_POS(f_index, lineno) \
695 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
696 #define __PYX_ERR(f_index, lineno, Ln_error) \
697 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
699 #ifndef __PYX_EXTERN_C
701 #define __PYX_EXTERN_C extern "C"
703 #define __PYX_EXTERN_C extern
707 #define __PYX_HAVE__csparsity
708 #define __PYX_HAVE_API__csparsity
713 #include "numpy/arrayobject.h"
714 #include "numpy/ndarrayobject.h"
715 #include "numpy/ndarraytypes.h"
716 #include "numpy/arrayscalars.h"
717 #include "numpy/ufuncobject.h"
721 #include "pythread.h"
728 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
729 #define CYTHON_WITHOUT_ASSERTIONS
732 typedef struct {PyObject **p;
const char *
s;
const Py_ssize_t
n;
const char* encoding;
733 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
736 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
737 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
738 #define __PYX_DEFAULT_STRING_ENCODING ""
739 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
740 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
741 #define __Pyx_uchar_cast(c) ((unsigned char)c)
742 #define __Pyx_long_cast(x) ((long)x)
743 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
744 (sizeof(type) < sizeof(Py_ssize_t)) ||\
745 (sizeof(type) > sizeof(Py_ssize_t) &&\
746 likely(v < (type)PY_SSIZE_T_MAX ||\
747 v == (type)PY_SSIZE_T_MAX) &&\
748 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
749 v == (type)PY_SSIZE_T_MIN))) ||\
750 (sizeof(type) == sizeof(Py_ssize_t) &&\
751 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
752 v == (type)PY_SSIZE_T_MAX))) )
753 static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
754 return (
size_t) i < (size_t) limit;
756 #if defined (__cplusplus) && __cplusplus >= 201103L
758 #define __Pyx_sst_abs(value) std::abs(value)
759 #elif SIZEOF_INT >= SIZEOF_SIZE_T
760 #define __Pyx_sst_abs(value) abs(value)
761 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
762 #define __Pyx_sst_abs(value) labs(value)
763 #elif defined (_MSC_VER)
764 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
765 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
766 #define __Pyx_sst_abs(value) llabs(value)
767 #elif defined (__GNUC__)
768 #define __Pyx_sst_abs(value) __builtin_llabs(value)
770 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
772 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
773 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
774 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
775 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
776 #define __Pyx_PyBytes_FromString PyBytes_FromString
777 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
778 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
779 #if PY_MAJOR_VERSION < 3
780 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
781 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
783 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
784 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
786 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
792 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
797 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
798 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
799 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
800 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
801 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
802 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *
u) {
803 const Py_UNICODE *u_end =
u;
805 return (
size_t)(u_end -
u - 1);
807 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
808 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
809 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
810 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
811 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
812 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
813 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
814 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
815 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
816 #define __Pyx_PySequence_Tuple(obj)\
817 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
818 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
819 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
820 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
821 #if CYTHON_ASSUME_SAFE_MACROS
822 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
824 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
826 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
827 #if PY_MAJOR_VERSION >= 3
828 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
830 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
832 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
833 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
834 static int __Pyx_sys_getdefaultencoding_not_ascii;
835 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
837 PyObject* default_encoding = NULL;
838 PyObject* ascii_chars_u = NULL;
839 PyObject* ascii_chars_b = NULL;
840 const char* default_encoding_c;
841 sys = PyImport_ImportModule(
"sys");
843 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
845 if (!default_encoding)
goto bad;
846 default_encoding_c = PyBytes_AsString(default_encoding);
847 if (!default_encoding_c)
goto bad;
848 if (strcmp(default_encoding_c,
"ascii") == 0) {
849 __Pyx_sys_getdefaultencoding_not_ascii = 0;
851 char ascii_chars[128];
853 for (
c = 0;
c < 128;
c++) {
856 __Pyx_sys_getdefaultencoding_not_ascii = 1;
857 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
858 if (!ascii_chars_u)
goto bad;
859 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
860 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
863 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
867 Py_DECREF(ascii_chars_u);
868 Py_DECREF(ascii_chars_b);
870 Py_DECREF(default_encoding);
873 Py_XDECREF(default_encoding);
874 Py_XDECREF(ascii_chars_u);
875 Py_XDECREF(ascii_chars_b);
879 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
880 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
882 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
883 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
884 static char* __PYX_DEFAULT_STRING_ENCODING;
885 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
887 PyObject* default_encoding = NULL;
888 char* default_encoding_c;
889 sys = PyImport_ImportModule(
"sys");
891 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
893 if (!default_encoding)
goto bad;
894 default_encoding_c = PyBytes_AsString(default_encoding);
895 if (!default_encoding_c)
goto bad;
896 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c) + 1);
897 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
898 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
899 Py_DECREF(default_encoding);
902 Py_XDECREF(default_encoding);
910 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
911 #define likely(x) __builtin_expect(!!(x), 1)
912 #define unlikely(x) __builtin_expect(!!(x), 0)
914 #define likely(x) (x)
915 #define unlikely(x) (x)
917 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
919 static PyObject *__pyx_m = NULL;
920 static PyObject *__pyx_d;
921 static PyObject *__pyx_b;
922 static PyObject *__pyx_cython_runtime = NULL;
923 static PyObject *__pyx_empty_tuple;
924 static PyObject *__pyx_empty_bytes;
925 static PyObject *__pyx_empty_unicode;
926 static int __pyx_lineno;
927 static int __pyx_clineno = 0;
928 static const char * __pyx_cfilenm= __FILE__;
929 static const char *__pyx_filename;
932 #if !defined(CYTHON_CCOMPLEX)
933 #if defined(__cplusplus)
934 #define CYTHON_CCOMPLEX 1
935 #elif defined(_Complex_I)
936 #define CYTHON_CCOMPLEX 1
938 #define CYTHON_CCOMPLEX 0
948 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
950 #define _Complex_I 1.0fj
954 static const char *__pyx_f[] = {
956 "proteus/csparsity.pyx",
961 #ifndef __PYX_FORCE_INIT_THREADS
962 #define __PYX_FORCE_INIT_THREADS 0
966 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
967 #define __Pyx_PyGILState_Release PyGILState_Release
968 #define __Pyx_FastGIL_Remember()
969 #define __Pyx_FastGIL_Forget()
970 #define __Pyx_FastGilFuncInit()
973 #define IS_UNSIGNED(type) (((type) -1) > 0)
974 struct __Pyx_StructField_;
975 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
978 struct __Pyx_StructField_* fields;
986 typedef struct __Pyx_StructField_ {
987 __Pyx_TypeInfo* type;
992 __Pyx_StructField* field;
993 size_t parent_offset;
994 } __Pyx_BufFmt_StackElem;
996 __Pyx_StructField root;
997 __Pyx_BufFmt_StackElem* head;
999 size_t new_count, enc_count;
1000 size_t struct_alignment;
1005 char is_valid_array;
1006 } __Pyx_BufFmt_Context;
1009 #include <pythread.h>
1010 #ifndef CYTHON_ATOMICS
1011 #define CYTHON_ATOMICS 1
1013 #define __pyx_atomic_int_type int
1014 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
1015 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
1017 #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
1018 #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
1019 #ifdef __PYX_DEBUG_ATOMICS
1020 #warning "Using GNU atomics"
1022 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
1023 #include <Windows.h>
1024 #undef __pyx_atomic_int_type
1025 #define __pyx_atomic_int_type LONG
1026 #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
1027 #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
1028 #ifdef __PYX_DEBUG_ATOMICS
1029 #pragma message ("Using MSVC atomics")
1031 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
1032 #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
1033 #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
1034 #ifdef __PYX_DEBUG_ATOMICS
1035 #warning "Using Intel atomics"
1038 #undef CYTHON_ATOMICS
1039 #define CYTHON_ATOMICS 0
1040 #ifdef __PYX_DEBUG_ATOMICS
1041 #warning "Not using atomics"
1044 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1046 #define __pyx_add_acquisition_count(memview)\
1047 __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1048 #define __pyx_sub_acquisition_count(memview)\
1049 __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1051 #define __pyx_add_acquisition_count(memview)\
1052 __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1053 #define __pyx_sub_acquisition_count(memview)\
1054 __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1058 struct __pyx_memoryview_obj;
1060 struct __pyx_memoryview_obj *memview;
1062 Py_ssize_t shape[8];
1063 Py_ssize_t strides[8];
1064 Py_ssize_t suboffsets[8];
1065 } __Pyx_memviewslice;
1066 #define __Pyx_MemoryView_Len(m) (m.shape[0])
1076 typedef npy_int8 __pyx_t_5numpy_int8_t;
1085 typedef npy_int16 __pyx_t_5numpy_int16_t;
1094 typedef npy_int32 __pyx_t_5numpy_int32_t;
1103 typedef npy_int64 __pyx_t_5numpy_int64_t;
1112 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1121 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1130 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1139 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1148 typedef npy_float32 __pyx_t_5numpy_float32_t;
1157 typedef npy_float64 __pyx_t_5numpy_float64_t;
1166 typedef npy_long __pyx_t_5numpy_int_t;
1175 typedef npy_longlong __pyx_t_5numpy_long_t;
1184 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1193 typedef npy_ulong __pyx_t_5numpy_uint_t;
1202 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1211 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1220 typedef npy_intp __pyx_t_5numpy_intp_t;
1229 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1238 typedef npy_double __pyx_t_5numpy_float_t;
1247 typedef npy_double __pyx_t_5numpy_double_t;
1256 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1260 typedef ::std::complex< float > __pyx_t_float_complex;
1262 typedef float _Complex __pyx_t_float_complex;
1265 typedef struct {
float real, imag; } __pyx_t_float_complex;
1267 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1272 typedef ::std::complex< double > __pyx_t_double_complex;
1274 typedef double _Complex __pyx_t_double_complex;
1277 typedef struct {
double real, imag; } __pyx_t_double_complex;
1279 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1283 struct __pyx_obj_9csparsity_PySparsityInfo;
1284 struct __pyx_array_obj;
1285 struct __pyx_MemviewEnum_obj;
1286 struct __pyx_memoryview_obj;
1287 struct __pyx_memoryviewslice_obj;
1296 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1305 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1314 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1323 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1332 struct __pyx_obj_9csparsity_PySparsityInfo {
1345 struct __pyx_array_obj {
1347 struct __pyx_vtabstruct_array *__pyx_vtab;
1353 Py_ssize_t *_strides;
1354 Py_ssize_t itemsize;
1357 void (*callback_free_data)(
void *);
1359 int dtype_is_object;
1370 struct __pyx_MemviewEnum_obj {
1383 struct __pyx_memoryview_obj {
1385 struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1388 PyObject *_array_interface;
1389 PyThread_type_lock lock;
1390 __pyx_atomic_int acquisition_count[2];
1391 __pyx_atomic_int *acquisition_count_aligned_p;
1394 int dtype_is_object;
1395 __Pyx_TypeInfo *typeinfo;
1406 struct __pyx_memoryviewslice_obj {
1407 struct __pyx_memoryview_obj __pyx_base;
1408 __Pyx_memviewslice from_slice;
1409 PyObject *from_object;
1410 PyObject *(*to_object_func)(
char *);
1411 int (*to_dtype_func)(
char *, PyObject *);
1424 struct __pyx_vtabstruct_array {
1425 PyObject *(*get_memview)(
struct __pyx_array_obj *);
1427 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1438 struct __pyx_vtabstruct_memoryview {
1439 char *(*get_item_pointer)(
struct __pyx_memoryview_obj *, PyObject *);
1440 PyObject *(*is_slice)(
struct __pyx_memoryview_obj *, PyObject *);
1441 PyObject *(*setitem_slice_assignment)(
struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1442 PyObject *(*setitem_slice_assign_scalar)(
struct __pyx_memoryview_obj *,
struct __pyx_memoryview_obj *, PyObject *);
1443 PyObject *(*setitem_indexed)(
struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1444 PyObject *(*convert_item_to_object)(
struct __pyx_memoryview_obj *,
char *);
1445 PyObject *(*assign_item_from_object)(
struct __pyx_memoryview_obj *,
char *, PyObject *);
1447 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1458 struct __pyx_vtabstruct__memoryviewslice {
1459 struct __pyx_vtabstruct_memoryview __pyx_base;
1461 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1465 #ifndef CYTHON_REFNANNY
1466 #define CYTHON_REFNANNY 0
1470 void (*INCREF)(
void*, PyObject*, int);
1471 void (*DECREF)(
void*, PyObject*, int);
1472 void (*GOTREF)(
void*, PyObject*, int);
1473 void (*GIVEREF)(
void*, PyObject*, int);
1474 void* (*SetupContext)(
const char*, int,
const char*);
1475 void (*FinishContext)(
void**);
1476 } __Pyx_RefNannyAPIStruct;
1477 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1478 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
1479 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1481 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1483 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1484 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1485 PyGILState_Release(__pyx_gilstate_save);\
1487 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1490 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1491 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1493 #define __Pyx_RefNannyFinishContext()\
1494 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1495 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1496 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1497 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1498 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1499 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1500 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1501 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1502 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1504 #define __Pyx_RefNannyDeclarations
1505 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1506 #define __Pyx_RefNannyFinishContext()
1507 #define __Pyx_INCREF(r) Py_INCREF(r)
1508 #define __Pyx_DECREF(r) Py_DECREF(r)
1509 #define __Pyx_GOTREF(r)
1510 #define __Pyx_GIVEREF(r)
1511 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1512 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1513 #define __Pyx_XGOTREF(r)
1514 #define __Pyx_XGIVEREF(r)
1516 #define __Pyx_XDECREF_SET(r, v) do {\
1517 PyObject *tmp = (PyObject *) r;\
1518 r = v; __Pyx_XDECREF(tmp);\
1520 #define __Pyx_DECREF_SET(r, v) do {\
1521 PyObject *tmp = (PyObject *) r;\
1522 r = v; __Pyx_DECREF(tmp);\
1524 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1525 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1528 #if CYTHON_USE_TYPE_SLOTS
1529 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1531 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1535 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1538 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
1539 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1542 static int __Pyx_CheckKeywordStrings(PyObject *kwdict,
const char* function_name,
int kw_allowed);
1545 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
1548 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1549 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1550 const char* function_name);
1553 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1554 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1555 __Pyx__ArgTypeTest(obj, type, name, exact))
1556 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
1559 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1560 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1561 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1562 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1563 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1564 (cache_var) = (value);
1565 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1566 static PY_UINT64_T __pyx_dict_version = 0;\
1567 static PyObject *__pyx_dict_cached_value = NULL;\
1568 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1569 (VAR) = __pyx_dict_cached_value;\
1571 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1572 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1575 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1576 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1577 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1579 #define __PYX_GET_DICT_VERSION(dict) (0)
1580 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1581 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1585 #if CYTHON_USE_DICT_VERSIONS
1586 #define __Pyx_GetModuleGlobalName(var, name) {\
1587 static PY_UINT64_T __pyx_dict_version = 0;\
1588 static PyObject *__pyx_dict_cached_value = NULL;\
1589 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1590 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1591 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1593 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1594 PY_UINT64_T __pyx_dict_version;\
1595 PyObject *__pyx_dict_cached_value;\
1596 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1598 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1600 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1601 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1602 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1606 #if CYTHON_FAST_PYCCALL
1607 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1609 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1613 #if CYTHON_FAST_PYCALL
1614 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1615 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1616 #if 1 || PY_VERSION_HEX < 0x030600B1
1617 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1619 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1621 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1622 (sizeof(char [1 - 2*!(cond)]) - 1)
1623 #ifndef Py_MEMBER_SIZE
1624 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1626 #if CYTHON_FAST_PYCALL
1627 static size_t __pyx_pyframe_localsplus_offset = 0;
1628 #include "frameobject.h"
1629 #if PY_VERSION_HEX >= 0x030b00a6
1630 #ifndef Py_BUILD_CORE
1631 #define Py_BUILD_CORE 1
1633 #include "internal/pycore_frame.h"
1635 #define __Pxy_PyFrame_Initialize_Offsets()\
1636 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1637 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1638 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1639 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1640 #endif // CYTHON_FAST_PYCALL
1644 #if CYTHON_COMPILING_IN_CPYTHON
1645 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1647 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1651 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject*
function, PyObject* arg1, PyObject* arg2);
1654 #if CYTHON_COMPILING_IN_CPYTHON
1655 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1659 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1662 #if CYTHON_FAST_THREAD_STATE
1663 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1664 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1665 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1667 #define __Pyx_PyThreadState_declare
1668 #define __Pyx_PyThreadState_assign
1669 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1673 #if CYTHON_FAST_THREAD_STATE
1674 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1675 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1676 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1677 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1678 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1679 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1680 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1681 #if CYTHON_COMPILING_IN_CPYTHON
1682 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1684 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1687 #define __Pyx_PyErr_Clear() PyErr_Clear()
1688 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1689 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1690 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1691 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1692 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1693 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1694 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1698 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1701 #if CYTHON_USE_EXC_INFO_STACK
1702 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1706 #if CYTHON_FAST_THREAD_STATE
1707 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1708 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1709 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1710 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1712 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1713 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1717 #if CYTHON_FAST_THREAD_STATE
1718 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1719 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1721 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1725 #if CYTHON_FAST_THREAD_STATE
1726 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1727 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1729 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1736 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
1739 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
1742 #if PY_MAJOR_VERSION >= 3
1743 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1745 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1749 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1752 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1753 (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1755 static CYTHON_UNUSED
int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
1756 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *);
1758 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1761 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1762 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1763 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1764 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1765 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1766 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1767 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1768 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1769 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1770 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1771 int wraparound,
int boundscheck);
1772 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1773 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1774 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1775 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1776 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1777 int wraparound,
int boundscheck);
1778 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1779 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1780 int is_list,
int wraparound,
int boundscheck);
1783 #if CYTHON_USE_TYPE_SLOTS
1784 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1786 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1790 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(
const char *
s, Py_ssize_t size,
const char *errors) {
1792 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
1794 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(
const char *
s, Py_ssize_t size,
const char *errors) {
1796 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
1798 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(
const char *
s, Py_ssize_t size,
const char *errors) {
1800 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
1804 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1805 const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1806 const char* encoding,
const char* errors,
1807 PyObject* (*decode_func)(
const char *
s, Py_ssize_t size,
const char *errors));
1810 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1813 static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1816 static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1819 static CYTHON_INLINE
void __Pyx_RaiseNoneNotIterableError(
void);
1822 static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1825 #if CYTHON_FAST_THREAD_STATE
1826 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1827 static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1829 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1833 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
1836 #if CYTHON_COMPILING_IN_CPYTHON
1837 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1838 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1839 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1840 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1842 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1843 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1844 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1846 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1848 static CYTHON_UNUSED
int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
1850 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1851 static CYTHON_INLINE
int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1852 PyListObject*
L = (PyListObject*) list;
1853 Py_ssize_t len = Py_SIZE(list);
1854 if (likely(
L->allocated > len)) {
1856 PyList_SET_ITEM(list, len, x);
1857 __Pyx_SET_SIZE(list, len + 1);
1860 return PyList_Append(list, x);
1863 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1867 #if !CYTHON_COMPILING_IN_PYPY
1868 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
1870 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1871 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1875 static CYTHON_INLINE
int __Pyx_PyList_Extend(PyObject*
L, PyObject*
v) {
1876 #if CYTHON_COMPILING_IN_CPYTHON
1877 PyObject* none = _PyList_Extend((PyListObject*)
L,
v);
1878 if (unlikely(!none))
1883 return PyList_SetSlice(
L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX,
v);
1888 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1889 static CYTHON_INLINE
int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1890 PyListObject*
L = (PyListObject*) list;
1891 Py_ssize_t len = Py_SIZE(list);
1892 if (likely(
L->allocated > len) & likely(len > (
L->allocated >> 1))) {
1894 PyList_SET_ITEM(list, len, x);
1895 __Pyx_SET_SIZE(list, len + 1);
1898 return PyList_Append(list, x);
1901 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1905 static CYTHON_INLINE
void __Pyx_RaiseUnboundLocalError(
const char *varname);
1908 static CYTHON_INLINE
long __Pyx_div_long(
long,
long);
1911 static CYTHON_INLINE
int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq,
int eq) {
1912 int result = PySequence_Contains(seq, item);
1913 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1917 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1920 static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
1923 #if PY_MAJOR_VERSION < 3
1924 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
1925 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
1927 #define __Pyx_PyString_Join PyUnicode_Join
1928 #define __Pyx_PyBaseString_Join PyUnicode_Join
1930 #if CYTHON_COMPILING_IN_CPYTHON
1931 #if PY_MAJOR_VERSION < 3
1932 #define __Pyx_PyBytes_Join _PyString_Join
1934 #define __Pyx_PyBytes_Join _PyBytes_Join
1937 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1941 #if PY_MAJOR_VERSION >= 3
1942 #define __Pyx_PyObject_Unicode(obj)\
1943 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1945 #define __Pyx_PyObject_Unicode(obj)\
1946 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1950 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1951 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1953 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1957 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1958 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1960 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1964 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1967 static int __Pyx_setup_reduce(PyObject* type_obj);
1970 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
1973 #ifndef __PYX_HAVE_RT_ImportType_proto
1974 #define __PYX_HAVE_RT_ImportType_proto
1975 enum __Pyx_ImportType_CheckSize {
1976 __Pyx_ImportType_CheckSize_Error = 0,
1977 __Pyx_ImportType_CheckSize_Warn = 1,
1978 __Pyx_ImportType_CheckSize_Ignore = 2
1980 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
1984 #ifdef CYTHON_CLINE_IN_TRACEBACK
1985 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1987 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
1992 PyCodeObject* code_object;
1994 } __Pyx_CodeObjectCacheEntry;
1995 struct __Pyx_CodeObjectCache {
1998 __Pyx_CodeObjectCacheEntry* entries;
2000 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2001 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
2002 static PyCodeObject *__pyx_find_code_object(
int code_line);
2003 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
2006 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
2007 int py_line,
const char *filename);
2013 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2014 #define __Pyx_HAS_GCC_DIAGNOSTIC
2018 static CYTHON_INLINE PyObject *__pyx_memview_get_int(
const char *itemp);
2019 static CYTHON_INLINE
int __pyx_memview_set_int(
const char *itemp, PyObject *obj);
2022 static CYTHON_INLINE PyObject *__pyx_memview_get_double(
const char *itemp);
2023 static CYTHON_INLINE
int __pyx_memview_set_double(
const char *itemp, PyObject *obj);
2028 #define __Pyx_CREAL(z) ((z).real())
2029 #define __Pyx_CIMAG(z) ((z).imag())
2031 #define __Pyx_CREAL(z) (__real__(z))
2032 #define __Pyx_CIMAG(z) (__imag__(z))
2035 #define __Pyx_CREAL(z) ((z).real)
2036 #define __Pyx_CIMAG(z) ((z).imag)
2038 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2039 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2040 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2041 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2043 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2044 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2049 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2050 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2051 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2052 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2053 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2054 #define __Pyx_c_neg_float(a) (-(a))
2056 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2057 #define __Pyx_c_conj_float(z) (::std::conj(z))
2059 #define __Pyx_c_abs_float(z) (::std::abs(z))
2060 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2063 #define __Pyx_c_is_zero_float(z) ((z)==0)
2064 #define __Pyx_c_conj_float(z) (conjf(z))
2066 #define __Pyx_c_abs_float(z) (cabsf(z))
2067 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2071 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2072 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2073 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2074 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2075 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2076 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2077 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2078 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2080 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
2081 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2087 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2088 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2089 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2090 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2091 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2092 #define __Pyx_c_neg_double(a) (-(a))
2094 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2095 #define __Pyx_c_conj_double(z) (::std::conj(z))
2097 #define __Pyx_c_abs_double(z) (::std::abs(z))
2098 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2101 #define __Pyx_c_is_zero_double(z) ((z)==0)
2102 #define __Pyx_c_conj_double(z) (conj(z))
2104 #define __Pyx_c_abs_double(z) (cabs(z))
2105 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2109 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2110 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2111 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2112 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2113 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2114 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2115 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2116 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2118 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
2119 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2123 #if PY_MAJOR_VERSION < 3
2124 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view,
int flags);
2125 static void __Pyx_ReleaseBuffer(Py_buffer *view);
2127 #define __Pyx_GetBuffer PyObject_GetBuffer
2128 #define __Pyx_ReleaseBuffer PyBuffer_Release
2134 Py_ssize_t shape, strides, suboffsets;
2135 } __Pyx_Buf_DimInfo;
2141 __Pyx_Buffer *rcbuffer;
2143 __Pyx_Buf_DimInfo diminfo[8];
2144 } __Pyx_LocalBuf_ND;
2147 static int __pyx_memviewslice_is_contig(
const __Pyx_memviewslice mvs,
char order,
int ndim);
2150 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2151 __Pyx_memviewslice *slice2,
2152 int ndim,
size_t itemsize);
2155 static CYTHON_INLINE PyObject *__pyx_capsule_create(
void *p,
const char *sig);
2158 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
2161 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
2164 struct __pyx_typeinfo_string {
2167 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2170 static __Pyx_memviewslice
2171 __pyx_memoryview_copy_new_contig(
const __Pyx_memviewslice *from_mvs,
2172 const char *mode,
int ndim,
2173 size_t sizeof_dtype,
int contig_flag,
2174 int dtype_is_object);
2177 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2178 #define __Pyx_MEMVIEW_DIRECT 1
2179 #define __Pyx_MEMVIEW_PTR 2
2180 #define __Pyx_MEMVIEW_FULL 4
2181 #define __Pyx_MEMVIEW_CONTIG 8
2182 #define __Pyx_MEMVIEW_STRIDED 16
2183 #define __Pyx_MEMVIEW_FOLLOW 32
2184 #define __Pyx_IS_C_CONTIG 1
2185 #define __Pyx_IS_F_CONTIG 2
2186 static int __Pyx_init_memviewslice(
2187 struct __pyx_memoryview_obj *memview,
2189 __Pyx_memviewslice *memviewslice,
2190 int memview_is_new_reference);
2191 static CYTHON_INLINE
int __pyx_add_acquisition_count_locked(
2192 __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2193 static CYTHON_INLINE
int __pyx_sub_acquisition_count_locked(
2194 __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2195 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2196 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2197 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2198 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2199 static CYTHON_INLINE
void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *,
int,
int);
2200 static CYTHON_INLINE
void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *,
int,
int);
2203 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
2206 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
2209 static CYTHON_INLINE
char __Pyx_PyInt_As_char(PyObject *);
2212 static int __Pyx_check_binary_version(
void);
2215 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2217 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *__pyx_v_self);
2218 static char *__pyx_memoryview_get_item_pointer(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
2219 static PyObject *__pyx_memoryview_is_slice(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj);
2220 static PyObject *__pyx_memoryview_setitem_slice_assignment(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src);
2221 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(
struct __pyx_memoryview_obj *__pyx_v_self,
struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value);
2222 static PyObject *__pyx_memoryview_setitem_indexed(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
2223 static PyObject *__pyx_memoryview_convert_item_to_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp);
2224 static PyObject *__pyx_memoryview_assign_item_from_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
2225 static PyObject *__pyx_memoryviewslice_convert_item_to_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp);
2226 static PyObject *__pyx_memoryviewslice_assign_item_from_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
2237 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2250 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2251 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2252 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2253 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2254 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2255 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2256 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2257 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2258 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2259 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2260 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2261 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2262 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2263 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2264 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2267 static PyTypeObject *__pyx_ptype_9csparsity_PySparsityInfo = 0;
2268 static PyTypeObject *__pyx_array_type = 0;
2269 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2270 static PyTypeObject *__pyx_memoryview_type = 0;
2271 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2272 static PyObject *
generic = 0;
2273 static PyObject *strided = 0;
2274 static PyObject *indirect = 0;
2275 static PyObject *contiguous = 0;
2276 static PyObject *indirect_contiguous = 0;
2277 static int __pyx_memoryview_thread_locks_used;
2278 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2279 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t,
char *,
char *,
char *);
2280 static void *__pyx_align_pointer(
void *,
size_t);
2281 static PyObject *__pyx_memoryview_new(PyObject *,
int,
int, __Pyx_TypeInfo *);
2282 static CYTHON_INLINE
int __pyx_memoryview_check(PyObject *);
2283 static PyObject *_unellipsify(PyObject *,
int);
2284 static PyObject *assert_direct_dimensions(Py_ssize_t *,
int);
2285 static struct __pyx_memoryview_obj *__pyx_memview_slice(
struct __pyx_memoryview_obj *, PyObject *);
2286 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t,
int,
int,
int *, Py_ssize_t, Py_ssize_t, Py_ssize_t,
int,
int,
int,
int);
2287 static char *__pyx_pybuffer_index(Py_buffer *,
char *, Py_ssize_t, Py_ssize_t);
2288 static int __pyx_memslice_transpose(__Pyx_memviewslice *);
2289 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice,
int, PyObject *(*)(
char *),
int (*)(
char *, PyObject *),
int);
2290 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2291 static void __pyx_memoryview_slice_copy(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2292 static PyObject *__pyx_memoryview_copy_object(
struct __pyx_memoryview_obj *);
2293 static PyObject *__pyx_memoryview_copy_object_from_slice(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2294 static Py_ssize_t abs_py_ssize_t(Py_ssize_t);
2295 static char __pyx_get_best_slice_order(__Pyx_memviewslice *,
int);
2296 static void _copy_strided_to_strided(
char *, Py_ssize_t *,
char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *,
int,
size_t);
2297 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *,
int,
size_t);
2298 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *,
int);
2299 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t,
int,
char);
2300 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *,
char,
int);
2301 static int __pyx_memoryview_err_extents(
int, Py_ssize_t, Py_ssize_t);
2302 static int __pyx_memoryview_err_dim(PyObject *,
char *,
int);
2303 static int __pyx_memoryview_err(PyObject *,
char *);
2304 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice,
int,
int,
int);
2305 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *,
int,
int);
2306 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *,
int,
int,
int);
2307 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
2308 static void __pyx_memoryview_refcount_objects_in_slice(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
2309 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *,
int,
size_t,
void *,
int);
2310 static void __pyx_memoryview__slice_assign_scalar(
char *, Py_ssize_t *, Py_ssize_t *,
int,
size_t,
void *);
2311 static PyObject *__pyx_unpickle_Enum__set_state(
struct __pyx_MemviewEnum_obj *, PyObject *);
2312 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *);
2313 static __Pyx_TypeInfo __Pyx_TypeInfo_int = {
"int", NULL,
sizeof(int), { 0 }, 0, IS_UNSIGNED(
int) ?
'U' :
'I', IS_UNSIGNED(
int), 0 };
2314 static __Pyx_TypeInfo __Pyx_TypeInfo_double = {
"double", NULL,
sizeof(double), { 0 }, 0,
'R', 0, 0 };
2315 #define __Pyx_MODULE_NAME "csparsity"
2316 extern int __pyx_module_is_main_csparsity;
2317 int __pyx_module_is_main_csparsity = 0;
2320 static PyObject *__pyx_builtin_TypeError;
2321 static PyObject *__pyx_builtin_ImportError;
2322 static PyObject *__pyx_builtin_ValueError;
2323 static PyObject *__pyx_builtin_MemoryError;
2324 static PyObject *__pyx_builtin_enumerate;
2325 static PyObject *__pyx_builtin_range;
2326 static PyObject *__pyx_builtin_Ellipsis;
2327 static PyObject *__pyx_builtin_id;
2328 static PyObject *__pyx_builtin_IndexError;
2329 static const char __pyx_k_O[] =
"O";
2330 static const char __pyx_k_T[] =
"T{";
2331 static const char __pyx_k_c[] =
"c";
2332 static const char __pyx_k_s[] =
"(%s)";
2333 static const char __pyx_k_id[] =
"id";
2334 static const char __pyx_k_np[] =
"np";
2335 static const char __pyx_k__24[] =
"^";
2336 static const char __pyx_k__25[] =
"";
2337 static const char __pyx_k__26[] =
":";
2338 static const char __pyx_k__27[] =
"}";
2339 static const char __pyx_k__28[] =
",";
2340 static const char __pyx_k_new[] =
"__new__";
2341 static const char __pyx_k_obj[] =
"obj";
2342 static const char __pyx_k_base[] =
"base";
2343 static const char __pyx_k_dict[] =
"__dict__";
2344 static const char __pyx_k_join[] =
"join";
2345 static const char __pyx_k_main[] =
"__main__";
2346 static const char __pyx_k_mode[] =
"mode";
2347 static const char __pyx_k_name[] =
"name";
2348 static const char __pyx_k_ndim[] =
"ndim";
2349 static const char __pyx_k_pack[] =
"pack";
2350 static const char __pyx_k_size[] =
"size";
2351 static const char __pyx_k_step[] =
"step";
2352 static const char __pyx_k_stop[] =
"stop";
2353 static const char __pyx_k_test[] =
"__test__";
2354 static const char __pyx_k_ASCII[] =
"ASCII";
2355 static const char __pyx_k_class[] =
"__class__";
2356 static const char __pyx_k_error[] =
"error";
2357 static const char __pyx_k_flags[] =
"flags";
2358 static const char __pyx_k_numpy[] =
"numpy";
2359 static const char __pyx_k_range[] =
"range";
2360 static const char __pyx_k_shape[] =
"shape";
2361 static const char __pyx_k_start[] =
"start";
2362 static const char __pyx_k_encode[] =
"encode";
2363 static const char __pyx_k_format[] =
"format";
2364 static const char __pyx_k_import[] =
"__import__";
2365 static const char __pyx_k_name_2[] =
"__name__";
2366 static const char __pyx_k_pickle[] =
"pickle";
2367 static const char __pyx_k_reduce[] =
"__reduce__";
2368 static const char __pyx_k_rowptr[] =
"rowptr";
2369 static const char __pyx_k_struct[] =
"struct";
2370 static const char __pyx_k_unpack[] =
"unpack";
2371 static const char __pyx_k_update[] =
"update";
2372 static const char __pyx_k_asarray[] =
"asarray";
2373 static const char __pyx_k_fortran[] =
"fortran";
2374 static const char __pyx_k_memview[] =
"memview";
2375 static const char __pyx_k_Ellipsis[] =
"Ellipsis";
2376 static const char __pyx_k_getstate[] =
"__getstate__";
2377 static const char __pyx_k_itemsize[] =
"itemsize";
2378 static const char __pyx_k_pyx_type[] =
"__pyx_type";
2379 static const char __pyx_k_setstate[] =
"__setstate__";
2380 static const char __pyx_k_TypeError[] =
"TypeError";
2381 static const char __pyx_k_enumerate[] =
"enumerate";
2382 static const char __pyx_k_pyx_state[] =
"__pyx_state";
2383 static const char __pyx_k_reduce_ex[] =
"__reduce_ex__";
2384 static const char __pyx_k_IndexError[] =
"IndexError";
2385 static const char __pyx_k_ValueError[] =
"ValueError";
2386 static const char __pyx_k_pyx_result[] =
"__pyx_result";
2387 static const char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
2388 static const char __pyx_k_ImportError[] =
"ImportError";
2389 static const char __pyx_k_MemoryError[] =
"MemoryError";
2390 static const char __pyx_k_PickleError[] =
"PickleError";
2391 static const char __pyx_k_offset_test[] =
"offset_test";
2392 static const char __pyx_k_stride_test[] =
"stride_test";
2393 static const char __pyx_k_offset_trial[] =
"offset_trial";
2394 static const char __pyx_k_pyx_checksum[] =
"__pyx_checksum";
2395 static const char __pyx_k_stride_trial[] =
"stride_trial";
2396 static const char __pyx_k_stringsource[] =
"stringsource";
2397 static const char __pyx_k_csrRowIndeces[] =
"csrRowIndeces";
2398 static const char __pyx_k_nFreeDOF_test[] =
"nFreeDOF_test";
2399 static const char __pyx_k_pyx_getbuffer[] =
"__pyx_getbuffer";
2400 static const char __pyx_k_reduce_cython[] =
"__reduce_cython__";
2401 static const char __pyx_k_PySparsityInfo[] =
"PySparsityInfo";
2402 static const char __pyx_k_nFreeDOF_trial[] =
"nFreeDOF_trial";
2403 static const char __pyx_k_View_MemoryView[] =
"View.MemoryView";
2404 static const char __pyx_k_allocate_buffer[] =
"allocate_buffer";
2405 static const char __pyx_k_dtype_is_object[] =
"dtype_is_object";
2406 static const char __pyx_k_freeGlobal_test[] =
"freeGlobal_test";
2407 static const char __pyx_k_pyx_PickleError[] =
"__pyx_PickleError";
2408 static const char __pyx_k_setstate_cython[] =
"__setstate_cython__";
2409 static const char __pyx_k_csrColumnOffsets[] =
"csrColumnOffsets";
2410 static const char __pyx_k_freeGlobal_trial[] =
"freeGlobal_trial";
2411 static const char __pyx_k_hasNumericalFlux[] =
"hasNumericalFlux";
2412 static const char __pyx_k_nElements_global[] =
"nElements_global";
2413 static const char __pyx_k_nDOF_test_element[] =
"nDOF_test_element";
2414 static const char __pyx_k_pyx_unpickle_Enum[] =
"__pyx_unpickle_Enum";
2415 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
2416 static const char __pyx_k_hasOutflowBoundary[] =
"hasOutflowBoundary";
2417 static const char __pyx_k_nDOF_trial_element[] =
"nDOF_trial_element";
2418 static const char __pyx_k_strided_and_direct[] =
"<strided and direct>";
2419 static const char __pyx_k_csrColumnOffsets_eb[] =
"csrColumnOffsets_eb";
2420 static const char __pyx_k_needOutflowJacobian[] =
"needOutflowJacobian";
2421 static const char __pyx_k_strided_and_indirect[] =
"<strided and indirect>";
2422 static const char __pyx_k_contiguous_and_direct[] =
"<contiguous and direct>";
2423 static const char __pyx_k_elementNeighborsArray[] =
"elementNeighborsArray";
2424 static const char __pyx_k_MemoryView_of_r_object[] =
"<MemoryView of %r object>";
2425 static const char __pyx_k_csrColumnOffsets_eNebN[] =
"csrColumnOffsets_eNebN";
2426 static const char __pyx_k_MemoryView_of_r_at_0x_x[] =
"<MemoryView of %r at 0x%x>";
2427 static const char __pyx_k_contiguous_and_indirect[] =
"<contiguous and indirect>";
2428 static const char __pyx_k_hasDiffusionInMixedForm[] =
"hasDiffusionInMixedForm";
2429 static const char __pyx_k_Cannot_index_with_type_s[] =
"Cannot index with type '%s'";
2430 static const char __pyx_k_Invalid_shape_in_axis_d_d[] =
"Invalid shape in axis %d: %d.";
2431 static const char __pyx_k_csrColumnOffsets_eb_eNebN[] =
"csrColumnOffsets_eb_eNebN";
2432 static const char __pyx_k_hasFluxBoundaryConditions[] =
"hasFluxBoundaryConditions";
2433 static const char __pyx_k_needNumericalFluxJacobian[] =
"needNumericalFluxJacobian";
2434 static const char __pyx_k_nElementBoundaries_element[] =
"nElementBoundaries_element";
2435 static const char __pyx_k_itemsize_0_for_cython_array[] =
"itemsize <= 0 for cython.array";
2436 static const char __pyx_k_elementBoundaryElementsArray[] =
"elementBoundaryElementsArray";
2437 static const char __pyx_k_unable_to_allocate_array_data[] =
"unable to allocate array data.";
2438 static const char __pyx_k_exteriorElementBoundariesArray[] =
"exteriorElementBoundariesArray";
2439 static const char __pyx_k_interiorElementBoundariesArray[] =
"interiorElementBoundariesArray";
2440 static const char __pyx_k_strided_and_direct_or_indirect[] =
"<strided and direct or indirect>";
2441 static const char __pyx_k_numpy_core_multiarray_failed_to[] =
"numpy.core.multiarray failed to import";
2442 static const char __pyx_k_Buffer_view_does_not_expose_stri[] =
"Buffer view does not expose strides";
2443 static const char __pyx_k_Can_only_create_a_buffer_that_is[] =
"Can only create a buffer that is contiguous in memory.";
2444 static const char __pyx_k_Cannot_assign_to_read_only_memor[] =
"Cannot assign to read-only memoryview";
2445 static const char __pyx_k_Cannot_create_writable_memory_vi[] =
"Cannot create writable memory view from read-only memoryview";
2446 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] =
"Empty shape tuple for cython.array";
2447 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] =
"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2448 static const char __pyx_k_Indirect_dimensions_not_supporte[] =
"Indirect dimensions not supported";
2449 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] =
"Invalid mode, expected 'c' or 'fortran', got %s";
2450 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] =
"Out of bounds on buffer access (axis %d)";
2451 static const char __pyx_k_Unable_to_convert_item_to_object[] =
"Unable to convert item to object";
2452 static const char __pyx_k_elementBoundaryLocalElementBound[] =
"elementBoundaryLocalElementBoundariesArray";
2453 static const char __pyx_k_got_differing_extents_in_dimensi[] =
"got differing extents in dimension %d (got %d and %d)";
2454 static const char __pyx_k_nExteriorElementBoundaries_globa[] =
"nExteriorElementBoundaries_global";
2455 static const char __pyx_k_nInteriorElementBoundaries_globa[] =
"nInteriorElementBoundaries_global";
2456 static const char __pyx_k_no_default___reduce___due_to_non[] =
"no default __reduce__ due to non-trivial __cinit__";
2457 static const char __pyx_k_numpy_core_umath_failed_to_impor[] =
"numpy.core.umath failed to import";
2458 static const char __pyx_k_unable_to_allocate_shape_and_str[] =
"unable to allocate shape and strides.";
2459 static PyObject *__pyx_n_s_ASCII;
2460 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2461 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2462 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2463 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2464 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2465 static PyObject *__pyx_n_s_Ellipsis;
2466 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2467 static PyObject *__pyx_n_s_ImportError;
2468 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2469 static PyObject *__pyx_n_s_IndexError;
2470 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2471 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2472 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2473 static PyObject *__pyx_n_s_MemoryError;
2474 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2475 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2476 static PyObject *__pyx_n_b_O;
2477 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2478 static PyObject *__pyx_n_s_PickleError;
2479 static PyObject *__pyx_n_s_PySparsityInfo;
2480 static PyObject *__pyx_kp_b_T;
2481 static PyObject *__pyx_n_s_TypeError;
2482 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2483 static PyObject *__pyx_n_s_ValueError;
2484 static PyObject *__pyx_n_s_View_MemoryView;
2485 static PyObject *__pyx_kp_b__24;
2486 static PyObject *__pyx_kp_b__25;
2487 static PyObject *__pyx_kp_b__26;
2488 static PyObject *__pyx_kp_b__27;
2489 static PyObject *__pyx_kp_u__28;
2490 static PyObject *__pyx_n_s_allocate_buffer;
2491 static PyObject *__pyx_n_s_asarray;
2492 static PyObject *__pyx_n_s_base;
2493 static PyObject *__pyx_n_s_c;
2494 static PyObject *__pyx_n_u_c;
2495 static PyObject *__pyx_n_s_class;
2496 static PyObject *__pyx_n_s_cline_in_traceback;
2497 static PyObject *__pyx_kp_s_contiguous_and_direct;
2498 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2499 static PyObject *__pyx_n_s_csrColumnOffsets;
2500 static PyObject *__pyx_n_s_csrColumnOffsets_eNebN;
2501 static PyObject *__pyx_n_s_csrColumnOffsets_eb;
2502 static PyObject *__pyx_n_s_csrColumnOffsets_eb_eNebN;
2503 static PyObject *__pyx_n_s_csrRowIndeces;
2504 static PyObject *__pyx_n_s_dict;
2505 static PyObject *__pyx_n_s_dtype_is_object;
2506 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2507 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2508 static PyObject *__pyx_n_s_elementNeighborsArray;
2509 static PyObject *__pyx_n_s_encode;
2510 static PyObject *__pyx_n_s_enumerate;
2511 static PyObject *__pyx_n_s_error;
2512 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2513 static PyObject *__pyx_n_s_flags;
2514 static PyObject *__pyx_n_s_format;
2515 static PyObject *__pyx_n_s_fortran;
2516 static PyObject *__pyx_n_u_fortran;
2517 static PyObject *__pyx_n_s_freeGlobal_test;
2518 static PyObject *__pyx_n_s_freeGlobal_trial;
2519 static PyObject *__pyx_n_s_getstate;
2520 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2521 static PyObject *__pyx_n_s_hasDiffusionInMixedForm;
2522 static PyObject *__pyx_n_s_hasFluxBoundaryConditions;
2523 static PyObject *__pyx_n_s_hasNumericalFlux;
2524 static PyObject *__pyx_n_s_hasOutflowBoundary;
2525 static PyObject *__pyx_n_s_id;
2526 static PyObject *__pyx_n_s_import;
2527 static PyObject *__pyx_n_s_interiorElementBoundariesArray;
2528 static PyObject *__pyx_n_s_itemsize;
2529 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2530 static PyObject *__pyx_n_s_join;
2531 static PyObject *__pyx_n_s_main;
2532 static PyObject *__pyx_n_s_memview;
2533 static PyObject *__pyx_n_s_mode;
2534 static PyObject *__pyx_n_s_nDOF_test_element;
2535 static PyObject *__pyx_n_s_nDOF_trial_element;
2536 static PyObject *__pyx_n_s_nElementBoundaries_element;
2537 static PyObject *__pyx_n_s_nElements_global;
2538 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2539 static PyObject *__pyx_n_s_nFreeDOF_test;
2540 static PyObject *__pyx_n_s_nFreeDOF_trial;
2541 static PyObject *__pyx_n_s_nInteriorElementBoundaries_globa;
2542 static PyObject *__pyx_n_s_name;
2543 static PyObject *__pyx_n_s_name_2;
2544 static PyObject *__pyx_n_s_ndim;
2545 static PyObject *__pyx_n_s_needNumericalFluxJacobian;
2546 static PyObject *__pyx_n_s_needOutflowJacobian;
2547 static PyObject *__pyx_n_s_new;
2548 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2549 static PyObject *__pyx_n_s_np;
2550 static PyObject *__pyx_n_s_numpy;
2551 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2552 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2553 static PyObject *__pyx_n_s_obj;
2554 static PyObject *__pyx_n_s_offset_test;
2555 static PyObject *__pyx_n_s_offset_trial;
2556 static PyObject *__pyx_n_s_pack;
2557 static PyObject *__pyx_n_s_pickle;
2558 static PyObject *__pyx_n_s_pyx_PickleError;
2559 static PyObject *__pyx_n_s_pyx_checksum;
2560 static PyObject *__pyx_n_s_pyx_getbuffer;
2561 static PyObject *__pyx_n_s_pyx_result;
2562 static PyObject *__pyx_n_s_pyx_state;
2563 static PyObject *__pyx_n_s_pyx_type;
2564 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2565 static PyObject *__pyx_n_s_pyx_vtable;
2566 static PyObject *__pyx_n_s_range;
2567 static PyObject *__pyx_n_s_reduce;
2568 static PyObject *__pyx_n_s_reduce_cython;
2569 static PyObject *__pyx_n_s_reduce_ex;
2570 static PyObject *__pyx_n_s_rowptr;
2571 static PyObject *__pyx_kp_u_s;
2572 static PyObject *__pyx_n_s_setstate;
2573 static PyObject *__pyx_n_s_setstate_cython;
2574 static PyObject *__pyx_n_s_shape;
2575 static PyObject *__pyx_n_s_size;
2576 static PyObject *__pyx_n_s_start;
2577 static PyObject *__pyx_n_s_step;
2578 static PyObject *__pyx_n_s_stop;
2579 static PyObject *__pyx_n_s_stride_test;
2580 static PyObject *__pyx_n_s_stride_trial;
2581 static PyObject *__pyx_kp_s_strided_and_direct;
2582 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2583 static PyObject *__pyx_kp_s_strided_and_indirect;
2584 static PyObject *__pyx_kp_s_stringsource;
2585 static PyObject *__pyx_n_s_struct;
2586 static PyObject *__pyx_n_s_test;
2587 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2588 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2589 static PyObject *__pyx_n_s_unpack;
2590 static PyObject *__pyx_n_s_update;
2591 static int __pyx_pf_9csparsity_14PySparsityInfo___cinit__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self);
2592 static void __pyx_pf_9csparsity_14PySparsityInfo_2__dealloc__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self);
2593 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_4findNonzeros(
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self,
int __pyx_v_nElements_global,
int __pyx_v_nDOF_test_element,
int __pyx_v_nDOF_trial_element, PyArrayObject *__pyx_v_nFreeDOF_test, PyArrayObject *__pyx_v_freeGlobal_test, PyArrayObject *__pyx_v_nFreeDOF_trial, PyArrayObject *__pyx_v_freeGlobal_trial,
int __pyx_v_offset_test,
int __pyx_v_stride_test,
int __pyx_v_offset_trial,
int __pyx_v_stride_trial,
int __pyx_v_hasNumericalFlux,
int __pyx_v_hasDiffusionInMixedForm,
int __pyx_v_needNumericalFluxJacobian,
int __pyx_v_nElementBoundaries_element, PyArrayObject *__pyx_v_elementNeighborsArray,
int __pyx_v_nInteriorElementBoundaries_global, PyArrayObject *__pyx_v_interiorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray,
int __pyx_v_hasFluxBoundaryConditions,
int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray,
int __pyx_v_hasOutflowBoundary,
int __pyx_v_needOutflowJacobian);
2594 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_6getOffsets_CSR(
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self,
int __pyx_v_nElements_global,
int __pyx_v_nDOF_test_element,
int __pyx_v_nDOF_trial_element, PyArrayObject *__pyx_v_nFreeDOF_test, PyArrayObject *__pyx_v_freeGlobal_test, PyArrayObject *__pyx_v_nFreeDOF_trial, PyArrayObject *__pyx_v_freeGlobal_trial,
int __pyx_v_offset_test,
int __pyx_v_stride_test,
int __pyx_v_offset_trial,
int __pyx_v_stride_trial,
int __pyx_v_hasNumericalFlux,
int __pyx_v_hasDiffusionInMixedForm,
int __pyx_v_needNumericalFluxJacobian,
int __pyx_v_nElementBoundaries_element, PyArrayObject *__pyx_v_elementNeighborsArray,
int __pyx_v_nInteriorElementBoundaries_global, PyArrayObject *__pyx_v_interiorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray,
int __pyx_v_hasFluxBoundaryConditions,
int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray,
int __pyx_v_hasOutflowBoundary,
int __pyx_v_needOutflowJacobian, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_csrRowIndeces, PyArrayObject *__pyx_v_csrColumnOffsets, PyArrayObject *__pyx_v_csrColumnOffsets_eNebN, PyArrayObject *__pyx_v_csrColumnOffsets_eb, PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN);
2595 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_8getCSR(
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self);
2596 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_10__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self);
2597 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_12__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2598 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode,
int __pyx_v_allocate_buffer);
2599 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(
struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2600 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(
struct __pyx_array_obj *__pyx_v_self);
2601 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(
struct __pyx_array_obj *__pyx_v_self);
2602 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(
struct __pyx_array_obj *__pyx_v_self);
2603 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr);
2604 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item);
2605 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value);
2606 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self);
2607 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2608 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name);
2609 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
2610 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
2611 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state);
2612 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj,
int __pyx_v_flags,
int __pyx_v_dtype_is_object);
2613 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(
struct __pyx_memoryview_obj *__pyx_v_self);
2614 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
2615 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
2616 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(
struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2617 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2618 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2619 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2620 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2621 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2622 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2623 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2624 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2625 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2626 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(
struct __pyx_memoryview_obj *__pyx_v_self);
2627 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(
struct __pyx_memoryview_obj *__pyx_v_self);
2628 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(
struct __pyx_memoryview_obj *__pyx_v_self);
2629 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
2630 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
2631 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(
struct __pyx_memoryview_obj *__pyx_v_self);
2632 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(
struct __pyx_memoryview_obj *__pyx_v_self);
2633 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self);
2634 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2635 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
2636 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
2637 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self);
2638 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2639 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type,
long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state);
2640 static PyObject *__pyx_tp_new_9csparsity_PySparsityInfo(PyTypeObject *t, PyObject *a, PyObject *k);
2641 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k);
2642 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k);
2643 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k);
2644 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k);
2645 static PyObject *__pyx_int_0;
2646 static PyObject *__pyx_int_1;
2647 static PyObject *__pyx_int_112105877;
2648 static PyObject *__pyx_int_136983863;
2649 static PyObject *__pyx_int_184977713;
2650 static PyObject *__pyx_int_neg_1;
2651 static PyObject *__pyx_tuple_;
2652 static PyObject *__pyx_tuple__2;
2653 static PyObject *__pyx_tuple__3;
2654 static PyObject *__pyx_tuple__4;
2655 static PyObject *__pyx_tuple__5;
2656 static PyObject *__pyx_tuple__6;
2657 static PyObject *__pyx_tuple__7;
2658 static PyObject *__pyx_tuple__8;
2659 static PyObject *__pyx_tuple__9;
2660 static PyObject *__pyx_slice__19;
2661 static PyObject *__pyx_tuple__10;
2662 static PyObject *__pyx_tuple__11;
2663 static PyObject *__pyx_tuple__12;
2664 static PyObject *__pyx_tuple__13;
2665 static PyObject *__pyx_tuple__14;
2666 static PyObject *__pyx_tuple__15;
2667 static PyObject *__pyx_tuple__16;
2668 static PyObject *__pyx_tuple__17;
2669 static PyObject *__pyx_tuple__18;
2670 static PyObject *__pyx_tuple__20;
2671 static PyObject *__pyx_tuple__21;
2672 static PyObject *__pyx_tuple__22;
2673 static PyObject *__pyx_tuple__23;
2674 static PyObject *__pyx_tuple__29;
2675 static PyObject *__pyx_tuple__30;
2676 static PyObject *__pyx_tuple__31;
2677 static PyObject *__pyx_tuple__32;
2678 static PyObject *__pyx_tuple__33;
2679 static PyObject *__pyx_tuple__34;
2680 static PyObject *__pyx_codeobj__35;
2692 static int __pyx_pw_9csparsity_14PySparsityInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2693 static int __pyx_pw_9csparsity_14PySparsityInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2695 __Pyx_RefNannyDeclarations
2696 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
2697 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
2698 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args));
return -1;}
2699 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"__cinit__", 0)))
return -1;
2700 __pyx_r = __pyx_pf_9csparsity_14PySparsityInfo___cinit__(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self));
2703 __Pyx_RefNannyFinishContext();
2707 static int __pyx_pf_9csparsity_14PySparsityInfo___cinit__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self) {
2709 __Pyx_RefNannyDeclarations
2710 __Pyx_RefNannySetupContext(
"__cinit__", 0);
2714 __Pyx_RefNannyFinishContext();
2727 static void __pyx_pw_9csparsity_14PySparsityInfo_3__dealloc__(PyObject *__pyx_v_self);
2728 static void __pyx_pw_9csparsity_14PySparsityInfo_3__dealloc__(PyObject *__pyx_v_self) {
2729 __Pyx_RefNannyDeclarations
2730 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
2731 __pyx_pf_9csparsity_14PySparsityInfo_2__dealloc__(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self));
2734 __Pyx_RefNannyFinishContext();
2737 static void __pyx_pf_9csparsity_14PySparsityInfo_2__dealloc__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self) {
2738 __Pyx_RefNannyDeclarations
2739 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
2742 __Pyx_RefNannyFinishContext();
2754 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_5findNonzeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2755 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_5findNonzeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2756 int __pyx_v_nElements_global;
2757 int __pyx_v_nDOF_test_element;
2758 int __pyx_v_nDOF_trial_element;
2759 PyArrayObject *__pyx_v_nFreeDOF_test = 0;
2760 PyArrayObject *__pyx_v_freeGlobal_test = 0;
2761 PyArrayObject *__pyx_v_nFreeDOF_trial = 0;
2762 PyArrayObject *__pyx_v_freeGlobal_trial = 0;
2763 int __pyx_v_offset_test;
2764 int __pyx_v_stride_test;
2765 int __pyx_v_offset_trial;
2766 int __pyx_v_stride_trial;
2767 int __pyx_v_hasNumericalFlux;
2768 int __pyx_v_hasDiffusionInMixedForm;
2769 int __pyx_v_needNumericalFluxJacobian;
2770 int __pyx_v_nElementBoundaries_element;
2771 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
2772 int __pyx_v_nInteriorElementBoundaries_global;
2773 PyArrayObject *__pyx_v_interiorElementBoundariesArray = 0;
2774 PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
2775 PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
2776 int __pyx_v_hasFluxBoundaryConditions;
2777 int __pyx_v_nExteriorElementBoundaries_global;
2778 PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
2779 int __pyx_v_hasOutflowBoundary;
2780 int __pyx_v_needOutflowJacobian;
2781 int __pyx_lineno = 0;
2782 const char *__pyx_filename = NULL;
2783 int __pyx_clineno = 0;
2784 PyObject *__pyx_r = 0;
2785 __Pyx_RefNannyDeclarations
2786 __Pyx_RefNannySetupContext(
"findNonzeros (wrapper)", 0);
2788 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nDOF_test_element,&__pyx_n_s_nDOF_trial_element,&__pyx_n_s_nFreeDOF_test,&__pyx_n_s_freeGlobal_test,&__pyx_n_s_nFreeDOF_trial,&__pyx_n_s_freeGlobal_trial,&__pyx_n_s_offset_test,&__pyx_n_s_stride_test,&__pyx_n_s_offset_trial,&__pyx_n_s_stride_trial,&__pyx_n_s_hasNumericalFlux,&__pyx_n_s_hasDiffusionInMixedForm,&__pyx_n_s_needNumericalFluxJacobian,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_nInteriorElementBoundaries_globa,&__pyx_n_s_interiorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_hasFluxBoundaryConditions,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_hasOutflowBoundary,&__pyx_n_s_needOutflowJacobian,0};
2789 PyObject* values[25] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
2790 if (unlikely(__pyx_kwds)) {
2792 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2794 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
2796 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
2798 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
2800 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
2802 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
2804 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
2806 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
2808 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
2810 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
2812 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
2814 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
2816 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2818 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2820 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2822 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2824 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2826 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2828 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2830 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2832 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2834 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2836 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2838 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2840 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2842 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2845 default:
goto __pyx_L5_argtuple_error;
2847 kw_args = PyDict_Size(__pyx_kwds);
2850 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
2851 else goto __pyx_L5_argtuple_error;
2854 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_test_element)) != 0)) kw_args--;
2856 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 1); __PYX_ERR(1, 14, __pyx_L3_error)
2860 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_trial_element)) != 0)) kw_args--;
2862 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 2); __PYX_ERR(1, 14, __pyx_L3_error)
2866 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_test)) != 0)) kw_args--;
2868 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 3); __PYX_ERR(1, 14, __pyx_L3_error)
2872 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_test)) != 0)) kw_args--;
2874 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 4); __PYX_ERR(1, 14, __pyx_L3_error)
2878 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_trial)) != 0)) kw_args--;
2880 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 5); __PYX_ERR(1, 14, __pyx_L3_error)
2884 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_trial)) != 0)) kw_args--;
2886 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 6); __PYX_ERR(1, 14, __pyx_L3_error)
2890 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_test)) != 0)) kw_args--;
2892 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 7); __PYX_ERR(1, 14, __pyx_L3_error)
2896 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_test)) != 0)) kw_args--;
2898 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 8); __PYX_ERR(1, 14, __pyx_L3_error)
2902 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_trial)) != 0)) kw_args--;
2904 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 9); __PYX_ERR(1, 14, __pyx_L3_error)
2908 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_trial)) != 0)) kw_args--;
2910 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 10); __PYX_ERR(1, 14, __pyx_L3_error)
2914 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasNumericalFlux)) != 0)) kw_args--;
2916 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 11); __PYX_ERR(1, 14, __pyx_L3_error)
2920 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasDiffusionInMixedForm)) != 0)) kw_args--;
2922 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 12); __PYX_ERR(1, 14, __pyx_L3_error)
2926 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needNumericalFluxJacobian)) != 0)) kw_args--;
2928 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 13); __PYX_ERR(1, 14, __pyx_L3_error)
2932 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
2934 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 14); __PYX_ERR(1, 14, __pyx_L3_error)
2938 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2940 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 15); __PYX_ERR(1, 14, __pyx_L3_error)
2944 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
2946 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 16); __PYX_ERR(1, 14, __pyx_L3_error)
2950 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundariesArray)) != 0)) kw_args--;
2952 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 17); __PYX_ERR(1, 14, __pyx_L3_error)
2956 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
2958 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 18); __PYX_ERR(1, 14, __pyx_L3_error)
2962 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
2964 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 19); __PYX_ERR(1, 14, __pyx_L3_error)
2968 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasFluxBoundaryConditions)) != 0)) kw_args--;
2970 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 20); __PYX_ERR(1, 14, __pyx_L3_error)
2974 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
2976 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 21); __PYX_ERR(1, 14, __pyx_L3_error)
2980 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
2982 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 22); __PYX_ERR(1, 14, __pyx_L3_error)
2986 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasOutflowBoundary)) != 0)) kw_args--;
2988 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 23); __PYX_ERR(1, 14, __pyx_L3_error)
2992 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needOutflowJacobian)) != 0)) kw_args--;
2994 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, 24); __PYX_ERR(1, 14, __pyx_L3_error)
2997 if (unlikely(kw_args > 0)) {
2998 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"findNonzeros") < 0)) __PYX_ERR(1, 14, __pyx_L3_error)
3000 }
else if (PyTuple_GET_SIZE(__pyx_args) != 25) {
3001 goto __pyx_L5_argtuple_error;
3003 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3004 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3005 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3006 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3007 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3008 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3009 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3010 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3011 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3012 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3013 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3014 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3015 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3016 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3017 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3018 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3019 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3020 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3021 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3022 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3023 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3024 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3025 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3026 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3027 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3029 __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 15, __pyx_L3_error)
3030 __pyx_v_nDOF_test_element = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_nDOF_test_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
3031 __pyx_v_nDOF_trial_element = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_nDOF_trial_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L3_error)
3032 __pyx_v_nFreeDOF_test = ((PyArrayObject *)values[3]);
3033 __pyx_v_freeGlobal_test = ((PyArrayObject *)values[4]);
3034 __pyx_v_nFreeDOF_trial = ((PyArrayObject *)values[5]);
3035 __pyx_v_freeGlobal_trial = ((PyArrayObject *)values[6]);
3036 __pyx_v_offset_test = __Pyx_PyInt_As_int(values[7]);
if (unlikely((__pyx_v_offset_test == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 22, __pyx_L3_error)
3037 __pyx_v_stride_test = __Pyx_PyInt_As_int(values[8]);
if (unlikely((__pyx_v_stride_test == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error)
3038 __pyx_v_offset_trial = __Pyx_PyInt_As_int(values[9]);
if (unlikely((__pyx_v_offset_trial == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 24, __pyx_L3_error)
3039 __pyx_v_stride_trial = __Pyx_PyInt_As_int(values[10]);
if (unlikely((__pyx_v_stride_trial == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L3_error)
3040 __pyx_v_hasNumericalFlux = __Pyx_PyInt_As_int(values[11]);
if (unlikely((__pyx_v_hasNumericalFlux == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L3_error)
3041 __pyx_v_hasDiffusionInMixedForm = __Pyx_PyInt_As_int(values[12]);
if (unlikely((__pyx_v_hasDiffusionInMixedForm == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 27, __pyx_L3_error)
3042 __pyx_v_needNumericalFluxJacobian = __Pyx_PyInt_As_int(values[13]);
if (unlikely((__pyx_v_needNumericalFluxJacobian == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 28, __pyx_L3_error)
3043 __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[14]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 29, __pyx_L3_error)
3044 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[15]);
3045 __pyx_v_nInteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[16]);
if (unlikely((__pyx_v_nInteriorElementBoundaries_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 31, __pyx_L3_error)
3046 __pyx_v_interiorElementBoundariesArray = ((PyArrayObject *)values[17]);
3047 __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[18]);
3048 __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[19]);
3049 __pyx_v_hasFluxBoundaryConditions = __Pyx_PyInt_As_int(values[20]);
if (unlikely((__pyx_v_hasFluxBoundaryConditions == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 35, __pyx_L3_error)
3050 __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[21]);
if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 36, __pyx_L3_error)
3051 __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[22]);
3052 __pyx_v_hasOutflowBoundary = __Pyx_PyInt_As_int(values[23]);
if (unlikely((__pyx_v_hasOutflowBoundary == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 38, __pyx_L3_error)
3053 __pyx_v_needOutflowJacobian = __Pyx_PyInt_As_int(values[24]);
if (unlikely((__pyx_v_needOutflowJacobian == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 39, __pyx_L3_error)
3055 goto __pyx_L4_argument_unpacking_done;
3056 __pyx_L5_argtuple_error:;
3057 __Pyx_RaiseArgtupleInvalid(
"findNonzeros", 1, 25, 25, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 14, __pyx_L3_error)
3059 __Pyx_AddTraceback(
"csparsity.PySparsityInfo.findNonzeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
3060 __Pyx_RefNannyFinishContext();
3062 __pyx_L4_argument_unpacking_done:;
3063 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_test), __pyx_ptype_5numpy_ndarray, 1,
"nFreeDOF_test", 0))) __PYX_ERR(1, 18, __pyx_L1_error)
3064 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_test), __pyx_ptype_5numpy_ndarray, 1,
"freeGlobal_test", 0))) __PYX_ERR(1, 19, __pyx_L1_error)
3065 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_trial), __pyx_ptype_5numpy_ndarray, 1,
"nFreeDOF_trial", 0))) __PYX_ERR(1, 20, __pyx_L1_error)
3066 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_trial), __pyx_ptype_5numpy_ndarray, 1,
"freeGlobal_trial", 0))) __PYX_ERR(1, 21, __pyx_L1_error)
3067 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(1, 30, __pyx_L1_error)
3068 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1,
"interiorElementBoundariesArray", 0))) __PYX_ERR(1, 32, __pyx_L1_error)
3069 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryElementsArray", 0))) __PYX_ERR(1, 33, __pyx_L1_error)
3070 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(1, 34, __pyx_L1_error)
3071 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1,
"exteriorElementBoundariesArray", 0))) __PYX_ERR(1, 37, __pyx_L1_error)
3072 __pyx_r = __pyx_pf_9csparsity_14PySparsityInfo_4findNonzeros(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self), __pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nFreeDOF_test, __pyx_v_freeGlobal_test, __pyx_v_nFreeDOF_trial, __pyx_v_freeGlobal_trial, __pyx_v_offset_test, __pyx_v_stride_test, __pyx_v_offset_trial, __pyx_v_stride_trial, __pyx_v_hasNumericalFlux, __pyx_v_hasDiffusionInMixedForm, __pyx_v_needNumericalFluxJacobian, __pyx_v_nElementBoundaries_element, __pyx_v_elementNeighborsArray, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_interiorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_hasFluxBoundaryConditions, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_hasOutflowBoundary, __pyx_v_needOutflowJacobian);
3079 __Pyx_RefNannyFinishContext();
3083 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_4findNonzeros(
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self,
int __pyx_v_nElements_global,
int __pyx_v_nDOF_test_element,
int __pyx_v_nDOF_trial_element, PyArrayObject *__pyx_v_nFreeDOF_test, PyArrayObject *__pyx_v_freeGlobal_test, PyArrayObject *__pyx_v_nFreeDOF_trial, PyArrayObject *__pyx_v_freeGlobal_trial,
int __pyx_v_offset_test,
int __pyx_v_stride_test,
int __pyx_v_offset_trial,
int __pyx_v_stride_trial,
int __pyx_v_hasNumericalFlux,
int __pyx_v_hasDiffusionInMixedForm,
int __pyx_v_needNumericalFluxJacobian,
int __pyx_v_nElementBoundaries_element, PyArrayObject *__pyx_v_elementNeighborsArray,
int __pyx_v_nInteriorElementBoundaries_global, PyArrayObject *__pyx_v_interiorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray,
int __pyx_v_hasFluxBoundaryConditions,
int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray,
int __pyx_v_hasOutflowBoundary,
int __pyx_v_needOutflowJacobian) {
3084 PyObject *__pyx_r = NULL;
3085 __Pyx_RefNannyDeclarations
3086 __Pyx_RefNannySetupContext(
"findNonzeros", 0);
3095 __pyx_v_self->cpp.findNonzeros(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((
int *)__pyx_v_nFreeDOF_test->data), ((
int *)__pyx_v_freeGlobal_test->data), ((
int *)__pyx_v_nFreeDOF_trial->data), ((
int *)__pyx_v_freeGlobal_trial->data), __pyx_v_offset_test, __pyx_v_stride_test, __pyx_v_offset_trial, __pyx_v_stride_trial, __pyx_v_hasNumericalFlux, __pyx_v_hasDiffusionInMixedForm, __pyx_v_needNumericalFluxJacobian, __pyx_v_nElementBoundaries_element, ((
int *)__pyx_v_elementNeighborsArray->data), __pyx_v_nInteriorElementBoundaries_global, ((
int *)__pyx_v_interiorElementBoundariesArray->data), ((
int *)__pyx_v_elementBoundaryElementsArray->data), ((
int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), __pyx_v_hasFluxBoundaryConditions, __pyx_v_nExteriorElementBoundaries_global, ((
int *)__pyx_v_exteriorElementBoundariesArray->data), __pyx_v_hasOutflowBoundary, __pyx_v_needOutflowJacobian);
3106 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3107 __Pyx_XGIVEREF(__pyx_r);
3108 __Pyx_RefNannyFinishContext();
3121 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_7getOffsets_CSR(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3122 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_7getOffsets_CSR(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3123 int __pyx_v_nElements_global;
3124 int __pyx_v_nDOF_test_element;
3125 int __pyx_v_nDOF_trial_element;
3126 PyArrayObject *__pyx_v_nFreeDOF_test = 0;
3127 PyArrayObject *__pyx_v_freeGlobal_test = 0;
3128 PyArrayObject *__pyx_v_nFreeDOF_trial = 0;
3129 PyArrayObject *__pyx_v_freeGlobal_trial = 0;
3130 int __pyx_v_offset_test;
3131 int __pyx_v_stride_test;
3132 int __pyx_v_offset_trial;
3133 int __pyx_v_stride_trial;
3134 int __pyx_v_hasNumericalFlux;
3135 int __pyx_v_hasDiffusionInMixedForm;
3136 int __pyx_v_needNumericalFluxJacobian;
3137 int __pyx_v_nElementBoundaries_element;
3138 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
3139 int __pyx_v_nInteriorElementBoundaries_global;
3140 PyArrayObject *__pyx_v_interiorElementBoundariesArray = 0;
3141 PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
3142 PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
3143 int __pyx_v_hasFluxBoundaryConditions;
3144 int __pyx_v_nExteriorElementBoundaries_global;
3145 PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
3146 int __pyx_v_hasOutflowBoundary;
3147 int __pyx_v_needOutflowJacobian;
3148 PyArrayObject *__pyx_v_rowptr = 0;
3149 PyArrayObject *__pyx_v_csrRowIndeces = 0;
3150 PyArrayObject *__pyx_v_csrColumnOffsets = 0;
3151 PyArrayObject *__pyx_v_csrColumnOffsets_eNebN = 0;
3152 PyArrayObject *__pyx_v_csrColumnOffsets_eb = 0;
3153 PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN = 0;
3154 int __pyx_lineno = 0;
3155 const char *__pyx_filename = NULL;
3156 int __pyx_clineno = 0;
3157 PyObject *__pyx_r = 0;
3158 __Pyx_RefNannyDeclarations
3159 __Pyx_RefNannySetupContext(
"getOffsets_CSR (wrapper)", 0);
3161 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nElements_global,&__pyx_n_s_nDOF_test_element,&__pyx_n_s_nDOF_trial_element,&__pyx_n_s_nFreeDOF_test,&__pyx_n_s_freeGlobal_test,&__pyx_n_s_nFreeDOF_trial,&__pyx_n_s_freeGlobal_trial,&__pyx_n_s_offset_test,&__pyx_n_s_stride_test,&__pyx_n_s_offset_trial,&__pyx_n_s_stride_trial,&__pyx_n_s_hasNumericalFlux,&__pyx_n_s_hasDiffusionInMixedForm,&__pyx_n_s_needNumericalFluxJacobian,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_nInteriorElementBoundaries_globa,&__pyx_n_s_interiorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_hasFluxBoundaryConditions,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_hasOutflowBoundary,&__pyx_n_s_needOutflowJacobian,&__pyx_n_s_rowptr,&__pyx_n_s_csrRowIndeces,&__pyx_n_s_csrColumnOffsets,&__pyx_n_s_csrColumnOffsets_eNebN,&__pyx_n_s_csrColumnOffsets_eb,&__pyx_n_s_csrColumnOffsets_eb_eNebN,0};
3162 PyObject* values[31] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3163 if (unlikely(__pyx_kwds)) {
3165 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3167 case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3169 case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3171 case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3173 case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3175 case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3177 case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3179 case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3181 case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3183 case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3185 case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3187 case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3189 case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3191 case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3193 case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3195 case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3197 case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3199 case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3201 case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3203 case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3205 case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3207 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3209 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3211 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3213 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3215 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3217 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3219 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3221 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3223 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3225 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3227 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3230 default:
goto __pyx_L5_argtuple_error;
3232 kw_args = PyDict_Size(__pyx_kwds);
3235 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3236 else goto __pyx_L5_argtuple_error;
3239 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_test_element)) != 0)) kw_args--;
3241 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 1); __PYX_ERR(1, 65, __pyx_L3_error)
3245 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_trial_element)) != 0)) kw_args--;
3247 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 2); __PYX_ERR(1, 65, __pyx_L3_error)
3251 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_test)) != 0)) kw_args--;
3253 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 3); __PYX_ERR(1, 65, __pyx_L3_error)
3257 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_test)) != 0)) kw_args--;
3259 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 4); __PYX_ERR(1, 65, __pyx_L3_error)
3263 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_trial)) != 0)) kw_args--;
3265 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 5); __PYX_ERR(1, 65, __pyx_L3_error)
3269 if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_trial)) != 0)) kw_args--;
3271 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 6); __PYX_ERR(1, 65, __pyx_L3_error)
3275 if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_test)) != 0)) kw_args--;
3277 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 7); __PYX_ERR(1, 65, __pyx_L3_error)
3281 if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_test)) != 0)) kw_args--;
3283 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 8); __PYX_ERR(1, 65, __pyx_L3_error)
3287 if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_trial)) != 0)) kw_args--;
3289 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 9); __PYX_ERR(1, 65, __pyx_L3_error)
3293 if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_trial)) != 0)) kw_args--;
3295 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 10); __PYX_ERR(1, 65, __pyx_L3_error)
3299 if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasNumericalFlux)) != 0)) kw_args--;
3301 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 11); __PYX_ERR(1, 65, __pyx_L3_error)
3305 if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasDiffusionInMixedForm)) != 0)) kw_args--;
3307 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 12); __PYX_ERR(1, 65, __pyx_L3_error)
3311 if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needNumericalFluxJacobian)) != 0)) kw_args--;
3313 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 13); __PYX_ERR(1, 65, __pyx_L3_error)
3317 if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
3319 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 14); __PYX_ERR(1, 65, __pyx_L3_error)
3323 if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
3325 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 15); __PYX_ERR(1, 65, __pyx_L3_error)
3329 if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
3331 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 16); __PYX_ERR(1, 65, __pyx_L3_error)
3335 if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundariesArray)) != 0)) kw_args--;
3337 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 17); __PYX_ERR(1, 65, __pyx_L3_error)
3341 if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3343 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 18); __PYX_ERR(1, 65, __pyx_L3_error)
3347 if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3349 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 19); __PYX_ERR(1, 65, __pyx_L3_error)
3353 if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasFluxBoundaryConditions)) != 0)) kw_args--;
3355 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 20); __PYX_ERR(1, 65, __pyx_L3_error)
3359 if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3361 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 21); __PYX_ERR(1, 65, __pyx_L3_error)
3365 if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3367 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 22); __PYX_ERR(1, 65, __pyx_L3_error)
3371 if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasOutflowBoundary)) != 0)) kw_args--;
3373 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 23); __PYX_ERR(1, 65, __pyx_L3_error)
3377 if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needOutflowJacobian)) != 0)) kw_args--;
3379 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 24); __PYX_ERR(1, 65, __pyx_L3_error)
3383 if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
3385 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 25); __PYX_ERR(1, 65, __pyx_L3_error)
3389 if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces)) != 0)) kw_args--;
3391 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 26); __PYX_ERR(1, 65, __pyx_L3_error)
3395 if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets)) != 0)) kw_args--;
3397 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 27); __PYX_ERR(1, 65, __pyx_L3_error)
3401 if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eNebN)) != 0)) kw_args--;
3403 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 28); __PYX_ERR(1, 65, __pyx_L3_error)
3407 if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb)) != 0)) kw_args--;
3409 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 29); __PYX_ERR(1, 65, __pyx_L3_error)
3413 if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_eNebN)) != 0)) kw_args--;
3415 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, 30); __PYX_ERR(1, 65, __pyx_L3_error)
3418 if (unlikely(kw_args > 0)) {
3419 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"getOffsets_CSR") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
3421 }
else if (PyTuple_GET_SIZE(__pyx_args) != 31) {
3422 goto __pyx_L5_argtuple_error;
3424 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3425 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3426 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3427 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3428 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3429 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3430 values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3431 values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3432 values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3433 values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3434 values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3435 values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3436 values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3437 values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3438 values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3439 values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3440 values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3441 values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3442 values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3443 values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3444 values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3445 values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3446 values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3447 values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3448 values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3449 values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3450 values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3451 values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3452 values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3453 values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3454 values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3456 __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[0]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 66, __pyx_L3_error)
3457 __pyx_v_nDOF_test_element = __Pyx_PyInt_As_int(values[1]);
if (unlikely((__pyx_v_nDOF_test_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error)
3458 __pyx_v_nDOF_trial_element = __Pyx_PyInt_As_int(values[2]);
if (unlikely((__pyx_v_nDOF_trial_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 68, __pyx_L3_error)
3459 __pyx_v_nFreeDOF_test = ((PyArrayObject *)values[3]);
3460 __pyx_v_freeGlobal_test = ((PyArrayObject *)values[4]);
3461 __pyx_v_nFreeDOF_trial = ((PyArrayObject *)values[5]);
3462 __pyx_v_freeGlobal_trial = ((PyArrayObject *)values[6]);
3463 __pyx_v_offset_test = __Pyx_PyInt_As_int(values[7]);
if (unlikely((__pyx_v_offset_test == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 73, __pyx_L3_error)
3464 __pyx_v_stride_test = __Pyx_PyInt_As_int(values[8]);
if (unlikely((__pyx_v_stride_test == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 74, __pyx_L3_error)
3465 __pyx_v_offset_trial = __Pyx_PyInt_As_int(values[9]);
if (unlikely((__pyx_v_offset_trial == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 75, __pyx_L3_error)
3466 __pyx_v_stride_trial = __Pyx_PyInt_As_int(values[10]);
if (unlikely((__pyx_v_stride_trial == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L3_error)
3467 __pyx_v_hasNumericalFlux = __Pyx_PyInt_As_int(values[11]);
if (unlikely((__pyx_v_hasNumericalFlux == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 77, __pyx_L3_error)
3468 __pyx_v_hasDiffusionInMixedForm = __Pyx_PyInt_As_int(values[12]);
if (unlikely((__pyx_v_hasDiffusionInMixedForm == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 78, __pyx_L3_error)
3469 __pyx_v_needNumericalFluxJacobian = __Pyx_PyInt_As_int(values[13]);
if (unlikely((__pyx_v_needNumericalFluxJacobian == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 79, __pyx_L3_error)
3470 __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[14]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 80, __pyx_L3_error)
3471 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[15]);
3472 __pyx_v_nInteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[16]);
if (unlikely((__pyx_v_nInteriorElementBoundaries_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 82, __pyx_L3_error)
3473 __pyx_v_interiorElementBoundariesArray = ((PyArrayObject *)values[17]);
3474 __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[18]);
3475 __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[19]);
3476 __pyx_v_hasFluxBoundaryConditions = __Pyx_PyInt_As_int(values[20]);
if (unlikely((__pyx_v_hasFluxBoundaryConditions == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 86, __pyx_L3_error)
3477 __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[21]);
if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L3_error)
3478 __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[22]);
3479 __pyx_v_hasOutflowBoundary = __Pyx_PyInt_As_int(values[23]);
if (unlikely((__pyx_v_hasOutflowBoundary == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 89, __pyx_L3_error)
3480 __pyx_v_needOutflowJacobian = __Pyx_PyInt_As_int(values[24]);
if (unlikely((__pyx_v_needOutflowJacobian == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 90, __pyx_L3_error)
3481 __pyx_v_rowptr = ((PyArrayObject *)values[25]);
3482 __pyx_v_csrRowIndeces = ((PyArrayObject *)values[26]);
3483 __pyx_v_csrColumnOffsets = ((PyArrayObject *)values[27]);
3484 __pyx_v_csrColumnOffsets_eNebN = ((PyArrayObject *)values[28]);
3485 __pyx_v_csrColumnOffsets_eb = ((PyArrayObject *)values[29]);
3486 __pyx_v_csrColumnOffsets_eb_eNebN = ((PyArrayObject *)values[30]);
3488 goto __pyx_L4_argument_unpacking_done;
3489 __pyx_L5_argtuple_error:;
3490 __Pyx_RaiseArgtupleInvalid(
"getOffsets_CSR", 1, 31, 31, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
3492 __Pyx_AddTraceback(
"csparsity.PySparsityInfo.getOffsets_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
3493 __Pyx_RefNannyFinishContext();
3495 __pyx_L4_argument_unpacking_done:;
3496 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_test), __pyx_ptype_5numpy_ndarray, 1,
"nFreeDOF_test", 0))) __PYX_ERR(1, 69, __pyx_L1_error)
3497 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_test), __pyx_ptype_5numpy_ndarray, 1,
"freeGlobal_test", 0))) __PYX_ERR(1, 70, __pyx_L1_error)
3498 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nFreeDOF_trial), __pyx_ptype_5numpy_ndarray, 1,
"nFreeDOF_trial", 0))) __PYX_ERR(1, 71, __pyx_L1_error)
3499 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_freeGlobal_trial), __pyx_ptype_5numpy_ndarray, 1,
"freeGlobal_trial", 0))) __PYX_ERR(1, 72, __pyx_L1_error)
3500 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(1, 81, __pyx_L1_error)
3501 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_interiorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1,
"interiorElementBoundariesArray", 0))) __PYX_ERR(1, 83, __pyx_L1_error)
3502 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryElementsArray", 0))) __PYX_ERR(1, 84, __pyx_L1_error)
3503 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(1, 85, __pyx_L1_error)
3504 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1,
"exteriorElementBoundariesArray", 0))) __PYX_ERR(1, 88, __pyx_L1_error)
3505 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rowptr), __pyx_ptype_5numpy_ndarray, 1,
"rowptr", 0))) __PYX_ERR(1, 91, __pyx_L1_error)
3506 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces), __pyx_ptype_5numpy_ndarray, 1,
"csrRowIndeces", 0))) __PYX_ERR(1, 92, __pyx_L1_error)
3507 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets), __pyx_ptype_5numpy_ndarray, 1,
"csrColumnOffsets", 0))) __PYX_ERR(1, 93, __pyx_L1_error)
3508 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eNebN), __pyx_ptype_5numpy_ndarray, 1,
"csrColumnOffsets_eNebN", 0))) __PYX_ERR(1, 94, __pyx_L1_error)
3509 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb), __pyx_ptype_5numpy_ndarray, 1,
"csrColumnOffsets_eb", 0))) __PYX_ERR(1, 95, __pyx_L1_error)
3510 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_eNebN), __pyx_ptype_5numpy_ndarray, 1,
"csrColumnOffsets_eb_eNebN", 0))) __PYX_ERR(1, 96, __pyx_L1_error)
3511 __pyx_r = __pyx_pf_9csparsity_14PySparsityInfo_6getOffsets_CSR(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self), __pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, __pyx_v_nFreeDOF_test, __pyx_v_freeGlobal_test, __pyx_v_nFreeDOF_trial, __pyx_v_freeGlobal_trial, __pyx_v_offset_test, __pyx_v_stride_test, __pyx_v_offset_trial, __pyx_v_stride_trial, __pyx_v_hasNumericalFlux, __pyx_v_hasDiffusionInMixedForm, __pyx_v_needNumericalFluxJacobian, __pyx_v_nElementBoundaries_element, __pyx_v_elementNeighborsArray, __pyx_v_nInteriorElementBoundaries_global, __pyx_v_interiorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_hasFluxBoundaryConditions, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_hasOutflowBoundary, __pyx_v_needOutflowJacobian, __pyx_v_rowptr, __pyx_v_csrRowIndeces, __pyx_v_csrColumnOffsets, __pyx_v_csrColumnOffsets_eNebN, __pyx_v_csrColumnOffsets_eb, __pyx_v_csrColumnOffsets_eb_eNebN);
3518 __Pyx_RefNannyFinishContext();
3522 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_6getOffsets_CSR(
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self,
int __pyx_v_nElements_global,
int __pyx_v_nDOF_test_element,
int __pyx_v_nDOF_trial_element, PyArrayObject *__pyx_v_nFreeDOF_test, PyArrayObject *__pyx_v_freeGlobal_test, PyArrayObject *__pyx_v_nFreeDOF_trial, PyArrayObject *__pyx_v_freeGlobal_trial,
int __pyx_v_offset_test,
int __pyx_v_stride_test,
int __pyx_v_offset_trial,
int __pyx_v_stride_trial,
int __pyx_v_hasNumericalFlux,
int __pyx_v_hasDiffusionInMixedForm,
int __pyx_v_needNumericalFluxJacobian,
int __pyx_v_nElementBoundaries_element, PyArrayObject *__pyx_v_elementNeighborsArray,
int __pyx_v_nInteriorElementBoundaries_global, PyArrayObject *__pyx_v_interiorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray,
int __pyx_v_hasFluxBoundaryConditions,
int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray,
int __pyx_v_hasOutflowBoundary,
int __pyx_v_needOutflowJacobian, PyArrayObject *__pyx_v_rowptr, PyArrayObject *__pyx_v_csrRowIndeces, PyArrayObject *__pyx_v_csrColumnOffsets, PyArrayObject *__pyx_v_csrColumnOffsets_eNebN, PyArrayObject *__pyx_v_csrColumnOffsets_eb, PyArrayObject *__pyx_v_csrColumnOffsets_eb_eNebN) {
3523 PyObject *__pyx_r = NULL;
3524 __Pyx_RefNannyDeclarations
3525 __Pyx_RefNannySetupContext(
"getOffsets_CSR", 0);
3534 __pyx_v_self->cpp.getOffsets_CSR(__pyx_v_nElements_global, __pyx_v_nDOF_test_element, __pyx_v_nDOF_trial_element, ((
int *)__pyx_v_nFreeDOF_test->data), ((
int *)__pyx_v_freeGlobal_test->data), ((
int *)__pyx_v_nFreeDOF_trial->data), ((
int *)__pyx_v_freeGlobal_trial->data), __pyx_v_offset_test, __pyx_v_stride_test, __pyx_v_offset_trial, __pyx_v_stride_trial, __pyx_v_hasNumericalFlux, __pyx_v_hasDiffusionInMixedForm, __pyx_v_needNumericalFluxJacobian, __pyx_v_nElementBoundaries_element, ((
int *)__pyx_v_elementNeighborsArray->data), __pyx_v_nInteriorElementBoundaries_global, ((
int *)__pyx_v_interiorElementBoundariesArray->data), ((
int *)__pyx_v_elementBoundaryElementsArray->data), ((
int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), __pyx_v_hasFluxBoundaryConditions, __pyx_v_nExteriorElementBoundaries_global, ((
int *)__pyx_v_exteriorElementBoundariesArray->data), __pyx_v_hasOutflowBoundary, __pyx_v_needOutflowJacobian, ((
int *)__pyx_v_rowptr->data), ((
int *)__pyx_v_csrRowIndeces->data), ((
int *)__pyx_v_csrColumnOffsets->data), ((
int *)__pyx_v_csrColumnOffsets_eNebN->data), ((
int *)__pyx_v_csrColumnOffsets_eb->data), ((
int *)__pyx_v_csrColumnOffsets_eb_eNebN->data));
3545 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3546 __Pyx_XGIVEREF(__pyx_r);
3547 __Pyx_RefNannyFinishContext();
3560 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_9getCSR(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
3561 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_9getCSR(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3562 PyObject *__pyx_r = 0;
3563 __Pyx_RefNannyDeclarations
3564 __Pyx_RefNannySetupContext(
"getCSR (wrapper)", 0);
3565 __pyx_r = __pyx_pf_9csparsity_14PySparsityInfo_8getCSR(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self));
3568 __Pyx_RefNannyFinishContext();
3572 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_8getCSR(
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self) {
3573 PyObject *__pyx_r = NULL;
3574 __Pyx_RefNannyDeclarations
3575 PyObject *__pyx_t_1 = NULL;
3576 PyObject *__pyx_t_2 = NULL;
3577 PyObject *__pyx_t_3 = NULL;
3579 struct __pyx_array_obj *__pyx_t_5 = NULL;
3580 PyObject *__pyx_t_6 = NULL;
3581 PyObject *__pyx_t_7 = NULL;
3582 PyObject *__pyx_t_8 = NULL;
3584 PyObject *__pyx_t_10 = NULL;
3585 int __pyx_lineno = 0;
3586 const char *__pyx_filename = NULL;
3587 int __pyx_clineno = 0;
3588 __Pyx_RefNannySetupContext(
"getCSR", 0);
3597 __pyx_v_self->cpp.getCSR();
3606 __Pyx_XDECREF(__pyx_r);
3607 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error)
3608 __Pyx_GOTREF(__pyx_t_2);
3609 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 130, __pyx_L1_error)
3610 __Pyx_GOTREF(__pyx_t_3);
3611 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3612 __pyx_t_4 = __pyx_v_self->cpp.rowptr;
3614 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3615 __PYX_ERR(1, 130, __pyx_L1_error)
3617 __pyx_t_6 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 130, __pyx_L1_error)
3618 __Pyx_GOTREF(__pyx_t_6);
3619 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->cpp.nrows));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error)
3620 __Pyx_GOTREF(__pyx_t_2);
3621 __pyx_t_5 = __pyx_array_new(__pyx_t_2,
sizeof(
int), PyBytes_AS_STRING(__pyx_t_6), (
char *)
"c", (
char *) __pyx_t_4);
3622 if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 130, __pyx_L1_error)
3623 __Pyx_GOTREF(__pyx_t_5);
3624 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3625 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3627 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3628 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
3629 if (likely(__pyx_t_6)) {
3630 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3631 __Pyx_INCREF(__pyx_t_6);
3632 __Pyx_INCREF(
function);
3633 __Pyx_DECREF_SET(__pyx_t_3,
function);
3636 __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_5)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_5));
3637 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3638 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3639 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
3640 __Pyx_GOTREF(__pyx_t_1);
3641 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3650 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np);
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 131, __pyx_L1_error)
3651 __Pyx_GOTREF(__pyx_t_6);
3652 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 131, __pyx_L1_error)
3653 __Pyx_GOTREF(__pyx_t_2);
3654 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3655 __pyx_t_4 = __pyx_v_self->cpp.colind;
3657 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3658 __PYX_ERR(1, 131, __pyx_L1_error)
3660 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 131, __pyx_L1_error)
3661 __Pyx_GOTREF(__pyx_t_7);
3662 __pyx_t_6 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->cpp.nnz));
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 131, __pyx_L1_error)
3663 __Pyx_GOTREF(__pyx_t_6);
3664 __pyx_t_5 = __pyx_array_new(__pyx_t_6,
sizeof(
int), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_4);
3665 if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 131, __pyx_L1_error)
3666 __Pyx_GOTREF(__pyx_t_5);
3667 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3668 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3670 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3671 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
3672 if (likely(__pyx_t_7)) {
3673 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3674 __Pyx_INCREF(__pyx_t_7);
3675 __Pyx_INCREF(
function);
3676 __Pyx_DECREF_SET(__pyx_t_2,
function);
3679 __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, ((PyObject *)__pyx_t_5)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_5));
3680 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3681 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3682 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 131, __pyx_L1_error)
3683 __Pyx_GOTREF(__pyx_t_3);
3684 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3692 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->cpp.nnz);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 132, __pyx_L1_error)
3693 __Pyx_GOTREF(__pyx_t_2);
3700 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np);
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 133, __pyx_L1_error)
3701 __Pyx_GOTREF(__pyx_t_6);
3702 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 133, __pyx_L1_error)
3703 __Pyx_GOTREF(__pyx_t_8);
3704 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3705 __pyx_t_9 = __pyx_v_self->cpp.nzval;
3707 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3708 __PYX_ERR(1, 133, __pyx_L1_error)
3710 __pyx_t_10 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 133, __pyx_L1_error)
3711 __Pyx_GOTREF(__pyx_t_10);
3712 __pyx_t_6 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->cpp.nnz));
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 133, __pyx_L1_error)
3713 __Pyx_GOTREF(__pyx_t_6);
3714 __pyx_t_5 = __pyx_array_new(__pyx_t_6,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_10), (
char *)
"c", (
char *) __pyx_t_9);
3715 if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 133, __pyx_L1_error)
3716 __Pyx_GOTREF(__pyx_t_5);
3717 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3718 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3720 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
3721 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
3722 if (likely(__pyx_t_10)) {
3723 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_8);
3724 __Pyx_INCREF(__pyx_t_10);
3725 __Pyx_INCREF(
function);
3726 __Pyx_DECREF_SET(__pyx_t_8,
function);
3729 __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, ((PyObject *)__pyx_t_5)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_t_5));
3730 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3731 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3732 if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 133, __pyx_L1_error)
3733 __Pyx_GOTREF(__pyx_t_7);
3734 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3743 __pyx_t_8 = PyTuple_New(4);
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 130, __pyx_L1_error)
3744 __Pyx_GOTREF(__pyx_t_8);
3745 __Pyx_GIVEREF(__pyx_t_1);
3746 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
3747 __Pyx_GIVEREF(__pyx_t_3);
3748 PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
3749 __Pyx_GIVEREF(__pyx_t_2);
3750 PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_2);
3751 __Pyx_GIVEREF(__pyx_t_7);
3752 PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7);
3757 __pyx_r = __pyx_t_8;
3771 __Pyx_XDECREF(__pyx_t_1);
3772 __Pyx_XDECREF(__pyx_t_2);
3773 __Pyx_XDECREF(__pyx_t_3);
3774 __Pyx_XDECREF(((PyObject *)__pyx_t_5));
3775 __Pyx_XDECREF(__pyx_t_6);
3776 __Pyx_XDECREF(__pyx_t_7);
3777 __Pyx_XDECREF(__pyx_t_8);
3778 __Pyx_XDECREF(__pyx_t_10);
3779 __Pyx_AddTraceback(
"csparsity.PySparsityInfo.getCSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
3782 __Pyx_XGIVEREF(__pyx_r);
3783 __Pyx_RefNannyFinishContext();
3794 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
3795 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3796 PyObject *__pyx_r = 0;
3797 __Pyx_RefNannyDeclarations
3798 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
3799 __pyx_r = __pyx_pf_9csparsity_14PySparsityInfo_10__reduce_cython__(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self));
3802 __Pyx_RefNannyFinishContext();
3806 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_10__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self) {
3807 PyObject *__pyx_r = NULL;
3808 __Pyx_RefNannyDeclarations
3809 PyObject *__pyx_t_1 = NULL;
3810 int __pyx_lineno = 0;
3811 const char *__pyx_filename = NULL;
3812 int __pyx_clineno = 0;
3813 __Pyx_RefNannySetupContext(
"__reduce_cython__", 0);
3821 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
3822 __Pyx_GOTREF(__pyx_t_1);
3823 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
3824 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3825 __PYX_ERR(0, 2, __pyx_L1_error)
3835 __Pyx_XDECREF(__pyx_t_1);
3836 __Pyx_AddTraceback(
"csparsity.PySparsityInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3838 __Pyx_XGIVEREF(__pyx_r);
3839 __Pyx_RefNannyFinishContext();
3851 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state);
3852 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
3853 PyObject *__pyx_r = 0;
3854 __Pyx_RefNannyDeclarations
3855 __Pyx_RefNannySetupContext(
"__setstate_cython__ (wrapper)", 0);
3856 __pyx_r = __pyx_pf_9csparsity_14PySparsityInfo_12__setstate_cython__(((
struct __pyx_obj_9csparsity_PySparsityInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
3859 __Pyx_RefNannyFinishContext();
3863 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_12__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
3864 PyObject *__pyx_r = NULL;
3865 __Pyx_RefNannyDeclarations
3866 PyObject *__pyx_t_1 = NULL;
3867 int __pyx_lineno = 0;
3868 const char *__pyx_filename = NULL;
3869 int __pyx_clineno = 0;
3870 __Pyx_RefNannySetupContext(
"__setstate_cython__", 0);
3877 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
3878 __Pyx_GOTREF(__pyx_t_1);
3879 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
3880 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3881 __PYX_ERR(0, 4, __pyx_L1_error)
3892 __Pyx_XDECREF(__pyx_t_1);
3893 __Pyx_AddTraceback(
"csparsity.PySparsityInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3895 __Pyx_XGIVEREF(__pyx_r);
3896 __Pyx_RefNannyFinishContext();
3908 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
3909 PyObject *__pyx_r = NULL;
3910 __Pyx_RefNannyDeclarations
3911 PyObject *__pyx_t_1 = NULL;
3912 int __pyx_lineno = 0;
3913 const char *__pyx_filename = NULL;
3914 int __pyx_clineno = 0;
3915 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
3924 __Pyx_XDECREF(__pyx_r);
3925 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)
3926 __Pyx_GOTREF(__pyx_t_1);
3927 __pyx_r = __pyx_t_1;
3941 __Pyx_XDECREF(__pyx_t_1);
3942 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
3945 __Pyx_XGIVEREF(__pyx_r);
3946 __Pyx_RefNannyFinishContext();
3958 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
3959 PyObject *__pyx_r = NULL;
3960 __Pyx_RefNannyDeclarations
3961 PyObject *__pyx_t_1 = NULL;
3962 int __pyx_lineno = 0;
3963 const char *__pyx_filename = NULL;
3964 int __pyx_clineno = 0;
3965 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
3974 __Pyx_XDECREF(__pyx_r);
3975 __pyx_t_1 = PyArray_MultiIterNew(2, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error)
3976 __Pyx_GOTREF(__pyx_t_1);
3977 __pyx_r = __pyx_t_1;
3991 __Pyx_XDECREF(__pyx_t_1);
3992 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
3995 __Pyx_XGIVEREF(__pyx_r);
3996 __Pyx_RefNannyFinishContext();
4008 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4009 PyObject *__pyx_r = NULL;
4010 __Pyx_RefNannyDeclarations
4011 PyObject *__pyx_t_1 = NULL;
4012 int __pyx_lineno = 0;
4013 const char *__pyx_filename = NULL;
4014 int __pyx_clineno = 0;
4015 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
4024 __Pyx_XDECREF(__pyx_r);
4025 __pyx_t_1 = PyArray_MultiIterNew(3, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b), ((
void *)__pyx_v_c));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error)
4026 __Pyx_GOTREF(__pyx_t_1);
4027 __pyx_r = __pyx_t_1;
4041 __Pyx_XDECREF(__pyx_t_1);
4042 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4045 __Pyx_XGIVEREF(__pyx_r);
4046 __Pyx_RefNannyFinishContext();
4058 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
4059 PyObject *__pyx_r = NULL;
4060 __Pyx_RefNannyDeclarations
4061 PyObject *__pyx_t_1 = NULL;
4062 int __pyx_lineno = 0;
4063 const char *__pyx_filename = NULL;
4064 int __pyx_clineno = 0;
4065 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
4074 __Pyx_XDECREF(__pyx_r);
4075 __pyx_t_1 = PyArray_MultiIterNew(4, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b), ((
void *)__pyx_v_c), ((
void *)__pyx_v_d));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error)
4076 __Pyx_GOTREF(__pyx_t_1);
4077 __pyx_r = __pyx_t_1;
4091 __Pyx_XDECREF(__pyx_t_1);
4092 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4095 __Pyx_XGIVEREF(__pyx_r);
4096 __Pyx_RefNannyFinishContext();
4108 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
4109 PyObject *__pyx_r = NULL;
4110 __Pyx_RefNannyDeclarations
4111 PyObject *__pyx_t_1 = NULL;
4112 int __pyx_lineno = 0;
4113 const char *__pyx_filename = NULL;
4114 int __pyx_clineno = 0;
4115 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
4124 __Pyx_XDECREF(__pyx_r);
4125 __pyx_t_1 = PyArray_MultiIterNew(5, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b), ((
void *)__pyx_v_c), ((
void *)__pyx_v_d), ((
void *)__pyx_v_e));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error)
4126 __Pyx_GOTREF(__pyx_t_1);
4127 __pyx_r = __pyx_t_1;
4141 __Pyx_XDECREF(__pyx_t_1);
4142 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4145 __Pyx_XGIVEREF(__pyx_r);
4146 __Pyx_RefNannyFinishContext();
4158 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4159 PyObject *__pyx_r = NULL;
4160 __Pyx_RefNannyDeclarations
4162 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
4171 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
4181 __Pyx_XDECREF(__pyx_r);
4182 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
4183 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
4203 __Pyx_XDECREF(__pyx_r);
4204 __Pyx_INCREF(__pyx_empty_tuple);
4205 __pyx_r = __pyx_empty_tuple;
4219 __Pyx_XGIVEREF(__pyx_r);
4220 __Pyx_RefNannyFinishContext();
4232 static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
4233 __Pyx_RefNannyDeclarations
4234 __Pyx_RefNannySetupContext(
"set_array_base", 0);
4243 Py_INCREF(__pyx_v_base);
4252 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
4263 __Pyx_RefNannyFinishContext();
4274 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
4275 PyObject *__pyx_v_base;
4276 PyObject *__pyx_r = NULL;
4277 __Pyx_RefNannyDeclarations
4279 __Pyx_RefNannySetupContext(
"get_array_base", 0);
4288 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
4297 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
4307 __Pyx_XDECREF(__pyx_r);
4308 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4327 __Pyx_XDECREF(__pyx_r);
4328 __Pyx_INCREF(((PyObject *)__pyx_v_base));
4329 __pyx_r = ((PyObject *)__pyx_v_base);
4342 __Pyx_XGIVEREF(__pyx_r);
4343 __Pyx_RefNannyFinishContext();
4355 static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
4357 __Pyx_RefNannyDeclarations
4358 PyObject *__pyx_t_1 = NULL;
4359 PyObject *__pyx_t_2 = NULL;
4360 PyObject *__pyx_t_3 = NULL;
4362 PyObject *__pyx_t_5 = NULL;
4363 PyObject *__pyx_t_6 = NULL;
4364 PyObject *__pyx_t_7 = NULL;
4365 PyObject *__pyx_t_8 = NULL;
4366 int __pyx_lineno = 0;
4367 const char *__pyx_filename = NULL;
4368 int __pyx_clineno = 0;
4369 __Pyx_RefNannySetupContext(
"import_array", 0);
4379 __Pyx_PyThreadState_declare
4380 __Pyx_PyThreadState_assign
4381 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
4382 __Pyx_XGOTREF(__pyx_t_1);
4383 __Pyx_XGOTREF(__pyx_t_2);
4384 __Pyx_XGOTREF(__pyx_t_3);
4394 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)
4404 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4405 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4406 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4407 goto __pyx_L8_try_end;
4417 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4419 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
4420 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error)
4421 __Pyx_GOTREF(__pyx_t_5);
4422 __Pyx_GOTREF(__pyx_t_6);
4423 __Pyx_GOTREF(__pyx_t_7);
4432 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error)
4433 __Pyx_GOTREF(__pyx_t_8);
4434 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
4435 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4436 __PYX_ERR(2, 945, __pyx_L5_except_error)
4438 goto __pyx_L5_except_error;
4439 __pyx_L5_except_error:;
4448 __Pyx_XGIVEREF(__pyx_t_1);
4449 __Pyx_XGIVEREF(__pyx_t_2);
4450 __Pyx_XGIVEREF(__pyx_t_3);
4451 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
4452 goto __pyx_L1_error;
4468 __Pyx_XDECREF(__pyx_t_5);
4469 __Pyx_XDECREF(__pyx_t_6);
4470 __Pyx_XDECREF(__pyx_t_7);
4471 __Pyx_XDECREF(__pyx_t_8);
4472 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
4475 __Pyx_RefNannyFinishContext();
4487 static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
4489 __Pyx_RefNannyDeclarations
4490 PyObject *__pyx_t_1 = NULL;
4491 PyObject *__pyx_t_2 = NULL;
4492 PyObject *__pyx_t_3 = NULL;
4494 PyObject *__pyx_t_5 = NULL;
4495 PyObject *__pyx_t_6 = NULL;
4496 PyObject *__pyx_t_7 = NULL;
4497 PyObject *__pyx_t_8 = NULL;
4498 int __pyx_lineno = 0;
4499 const char *__pyx_filename = NULL;
4500 int __pyx_clineno = 0;
4501 __Pyx_RefNannySetupContext(
"import_umath", 0);
4511 __Pyx_PyThreadState_declare
4512 __Pyx_PyThreadState_assign
4513 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
4514 __Pyx_XGOTREF(__pyx_t_1);
4515 __Pyx_XGOTREF(__pyx_t_2);
4516 __Pyx_XGOTREF(__pyx_t_3);
4526 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)
4536 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4537 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4538 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4539 goto __pyx_L8_try_end;
4549 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4551 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
4552 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error)
4553 __Pyx_GOTREF(__pyx_t_5);
4554 __Pyx_GOTREF(__pyx_t_6);
4555 __Pyx_GOTREF(__pyx_t_7);
4564 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error)
4565 __Pyx_GOTREF(__pyx_t_8);
4566 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
4567 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4568 __PYX_ERR(2, 951, __pyx_L5_except_error)
4570 goto __pyx_L5_except_error;
4571 __pyx_L5_except_error:;
4580 __Pyx_XGIVEREF(__pyx_t_1);
4581 __Pyx_XGIVEREF(__pyx_t_2);
4582 __Pyx_XGIVEREF(__pyx_t_3);
4583 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
4584 goto __pyx_L1_error;
4600 __Pyx_XDECREF(__pyx_t_5);
4601 __Pyx_XDECREF(__pyx_t_6);
4602 __Pyx_XDECREF(__pyx_t_7);
4603 __Pyx_XDECREF(__pyx_t_8);
4604 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
4607 __Pyx_RefNannyFinishContext();
4619 static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
4621 __Pyx_RefNannyDeclarations
4622 PyObject *__pyx_t_1 = NULL;
4623 PyObject *__pyx_t_2 = NULL;
4624 PyObject *__pyx_t_3 = NULL;
4626 PyObject *__pyx_t_5 = NULL;
4627 PyObject *__pyx_t_6 = NULL;
4628 PyObject *__pyx_t_7 = NULL;
4629 PyObject *__pyx_t_8 = NULL;
4630 int __pyx_lineno = 0;
4631 const char *__pyx_filename = NULL;
4632 int __pyx_clineno = 0;
4633 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
4643 __Pyx_PyThreadState_declare
4644 __Pyx_PyThreadState_assign
4645 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
4646 __Pyx_XGOTREF(__pyx_t_1);
4647 __Pyx_XGOTREF(__pyx_t_2);
4648 __Pyx_XGOTREF(__pyx_t_3);
4658 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)
4668 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4669 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4670 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4671 goto __pyx_L8_try_end;
4681 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4683 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
4684 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error)
4685 __Pyx_GOTREF(__pyx_t_5);
4686 __Pyx_GOTREF(__pyx_t_6);
4687 __Pyx_GOTREF(__pyx_t_7);
4696 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error)
4697 __Pyx_GOTREF(__pyx_t_8);
4698 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
4699 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4700 __PYX_ERR(2, 957, __pyx_L5_except_error)
4702 goto __pyx_L5_except_error;
4703 __pyx_L5_except_error:;
4712 __Pyx_XGIVEREF(__pyx_t_1);
4713 __Pyx_XGIVEREF(__pyx_t_2);
4714 __Pyx_XGIVEREF(__pyx_t_3);
4715 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
4716 goto __pyx_L1_error;
4732 __Pyx_XDECREF(__pyx_t_5);
4733 __Pyx_XDECREF(__pyx_t_6);
4734 __Pyx_XDECREF(__pyx_t_7);
4735 __Pyx_XDECREF(__pyx_t_8);
4736 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
4739 __Pyx_RefNannyFinishContext();
4751 static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
4753 __Pyx_RefNannyDeclarations
4754 __Pyx_RefNannySetupContext(
"is_timedelta64_object", 0);
4763 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
4776 __Pyx_RefNannyFinishContext();
4788 static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
4790 __Pyx_RefNannyDeclarations
4791 __Pyx_RefNannySetupContext(
"is_datetime64_object", 0);
4800 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
4813 __Pyx_RefNannyFinishContext();
4825 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
4826 npy_datetime __pyx_r;
4835 __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
4859 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
4860 npy_timedelta __pyx_r;
4869 __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
4893 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
4894 NPY_DATETIMEUNIT __pyx_r;
4901 __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
4926 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4927 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4928 PyObject *__pyx_v_shape = 0;
4929 Py_ssize_t __pyx_v_itemsize;
4930 PyObject *__pyx_v_format = 0;
4931 PyObject *__pyx_v_mode = 0;
4932 int __pyx_v_allocate_buffer;
4933 int __pyx_lineno = 0;
4934 const char *__pyx_filename = NULL;
4935 int __pyx_clineno = 0;
4937 __Pyx_RefNannyDeclarations
4938 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
4940 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
4941 PyObject* values[5] = {0,0,0,0,0};
4942 values[3] = ((PyObject *)__pyx_n_s_c);
4943 if (unlikely(__pyx_kwds)) {
4945 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4947 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4949 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4951 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4953 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4955 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4958 default:
goto __pyx_L5_argtuple_error;
4960 kw_args = PyDict_Size(__pyx_kwds);
4963 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
4964 else goto __pyx_L5_argtuple_error;
4967 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
4969 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
4973 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
4975 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
4980 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
4981 if (value) { values[3] = value; kw_args--; }
4986 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
4987 if (value) { values[4] = value; kw_args--; }
4990 if (unlikely(kw_args > 0)) {
4991 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__cinit__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
4994 switch (PyTuple_GET_SIZE(__pyx_args)) {
4995 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4997 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4999 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5000 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5001 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5003 default:
goto __pyx_L5_argtuple_error;
5006 __pyx_v_shape = ((PyObject*)values[0]);
5007 __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]);
if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
5008 __pyx_v_format = values[2];
5009 __pyx_v_mode = values[3];
5011 __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]);
if (unlikely((__pyx_v_allocate_buffer == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
5021 __pyx_v_allocate_buffer = ((int)1);
5024 goto __pyx_L4_argument_unpacking_done;
5025 __pyx_L5_argtuple_error:;
5026 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
5028 __Pyx_AddTraceback(
"View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5029 __Pyx_RefNannyFinishContext();
5031 __pyx_L4_argument_unpacking_done:;
5032 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1,
"shape", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
5033 if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
5034 PyErr_Format(PyExc_TypeError,
"Argument '%.200s' must not be None",
"format"); __PYX_ERR(0, 122, __pyx_L1_error)
5036 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((
struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
5051 __Pyx_RefNannyFinishContext();
5055 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode,
int __pyx_v_allocate_buffer) {
5057 Py_ssize_t __pyx_v_i;
5058 Py_ssize_t __pyx_v_dim;
5059 PyObject **__pyx_v_p;
5062 __Pyx_RefNannyDeclarations
5063 Py_ssize_t __pyx_t_1;
5065 PyObject *__pyx_t_3 = NULL;
5067 PyObject *__pyx_t_5 = NULL;
5068 PyObject *__pyx_t_6 = NULL;
5071 Py_ssize_t __pyx_t_9;
5072 PyObject *__pyx_t_10 = NULL;
5073 Py_ssize_t __pyx_t_11;
5074 int __pyx_lineno = 0;
5075 const char *__pyx_filename = NULL;
5076 int __pyx_clineno = 0;
5077 __Pyx_RefNannySetupContext(
"__cinit__", 0);
5078 __Pyx_INCREF(__pyx_v_format);
5087 if (unlikely(__pyx_v_shape == Py_None)) {
5088 PyErr_SetString(PyExc_TypeError,
"object of type 'NoneType' has no len()");
5089 __PYX_ERR(0, 129, __pyx_L1_error)
5091 __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape);
if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
5092 __pyx_v_self->ndim = ((int)__pyx_t_1);
5101 __pyx_v_self->itemsize = __pyx_v_itemsize;
5110 __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
5111 if (unlikely(__pyx_t_2)) {
5120 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
5121 __Pyx_GOTREF(__pyx_t_3);
5122 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5123 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5124 __PYX_ERR(0, 133, __pyx_L1_error)
5142 __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
5143 if (unlikely(__pyx_t_2)) {
5152 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
5153 __Pyx_GOTREF(__pyx_t_3);
5154 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5155 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5156 __PYX_ERR(0, 136, __pyx_L1_error)
5174 __pyx_t_2 = PyBytes_Check(__pyx_v_format);
5175 __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
5185 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
5186 __Pyx_GOTREF(__pyx_t_5);
5188 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
5189 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
5190 if (likely(__pyx_t_6)) {
5191 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_5);
5192 __Pyx_INCREF(__pyx_t_6);
5193 __Pyx_INCREF(
function);
5194 __Pyx_DECREF_SET(__pyx_t_5,
function);
5197 __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
5198 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5199 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
5200 __Pyx_GOTREF(__pyx_t_3);
5201 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5202 __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
5221 if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(0, 140, __pyx_L1_error)
5222 __pyx_t_3 = __pyx_v_format;
5223 __Pyx_INCREF(__pyx_t_3);
5224 __Pyx_GIVEREF(__pyx_t_3);
5225 __Pyx_GOTREF(__pyx_v_self->_format);
5226 __Pyx_DECREF(__pyx_v_self->_format);
5227 __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
5237 if (unlikely(__pyx_v_self->_format == Py_None)) {
5238 PyErr_SetString(PyExc_TypeError,
"expected bytes, NoneType found");
5239 __PYX_ERR(0, 141, __pyx_L1_error)
5241 __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format);
if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
5242 __pyx_v_self->format = __pyx_t_7;
5251 __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((
sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
5260 __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
5269 __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
5270 if (unlikely(__pyx_t_4)) {
5279 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__7, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
5280 __Pyx_GOTREF(__pyx_t_3);
5281 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5282 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5283 __PYX_ERR(0, 148, __pyx_L1_error)
5302 __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
5304 if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3))
break;
5305 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5306 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++;
if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
5308 __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++;
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
5309 __Pyx_GOTREF(__pyx_t_5);
5311 __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5);
if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
5312 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5313 __pyx_v_dim = __pyx_t_9;
5314 __pyx_v_idx = __pyx_t_8;
5315 __pyx_t_8 = (__pyx_t_8 + 1);
5324 __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
5325 if (unlikely(__pyx_t_4)) {
5334 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
5335 __Pyx_GOTREF(__pyx_t_5);
5336 __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
5337 __Pyx_GOTREF(__pyx_t_6);
5338 __pyx_t_10 = PyTuple_New(2);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
5339 __Pyx_GOTREF(__pyx_t_10);
5340 __Pyx_GIVEREF(__pyx_t_5);
5341 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
5342 __Pyx_GIVEREF(__pyx_t_6);
5343 PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
5346 __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
5347 __Pyx_GOTREF(__pyx_t_6);
5348 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5349 __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
5350 __Pyx_GOTREF(__pyx_t_10);
5351 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5352 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
5353 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5354 __PYX_ERR(0, 153, __pyx_L1_error)
5372 (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
5382 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5391 __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ));
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
5401 __pyx_v_order =
'F';
5410 __Pyx_INCREF(__pyx_n_u_fortran);
5411 __Pyx_GIVEREF(__pyx_n_u_fortran);
5412 __Pyx_GOTREF(__pyx_v_self->mode);
5413 __Pyx_DECREF(__pyx_v_self->mode);
5414 __pyx_v_self->mode = __pyx_n_u_fortran;
5433 __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ));
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
5434 if (likely(__pyx_t_4)) {
5443 __pyx_v_order =
'C';
5452 __Pyx_INCREF(__pyx_n_u_c);
5453 __Pyx_GIVEREF(__pyx_n_u_c);
5454 __Pyx_GOTREF(__pyx_v_self->mode);
5455 __Pyx_DECREF(__pyx_v_self->mode);
5456 __pyx_v_self->mode = __pyx_n_u_c;
5476 __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
5477 __Pyx_GOTREF(__pyx_t_3);
5478 __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 164, __pyx_L1_error)
5479 __Pyx_GOTREF(__pyx_t_10);
5480 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5481 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
5482 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5483 __PYX_ERR(0, 164, __pyx_L1_error)
5494 __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
5503 __pyx_v_self->free_data = __pyx_v_allocate_buffer;
5512 __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error)
5513 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error)
5514 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5515 __pyx_v_self->dtype_is_object = __pyx_t_4;
5524 __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
5534 __pyx_v_self->data = ((
char *)malloc(__pyx_v_self->len));
5543 __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
5544 if (unlikely(__pyx_t_4)) {
5553 __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__8, NULL);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error)
5554 __Pyx_GOTREF(__pyx_t_10);
5555 __Pyx_Raise(__pyx_t_10, 0, 0, 0);
5556 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5557 __PYX_ERR(0, 176, __pyx_L1_error)
5575 __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
5585 __pyx_v_p = ((PyObject **)__pyx_v_self->data);
5594 if (unlikely(__pyx_v_itemsize == 0)) {
5595 PyErr_SetString(PyExc_ZeroDivisionError,
"integer division or modulo by zero");
5596 __PYX_ERR(0, 180, __pyx_L1_error)
5598 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_self->len))) {
5599 PyErr_SetString(PyExc_OverflowError,
"value too large to perform division");
5600 __PYX_ERR(0, 180, __pyx_L1_error)
5602 __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
5603 __pyx_t_9 = __pyx_t_1;
5604 for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
5605 __pyx_v_i = __pyx_t_11;
5614 (__pyx_v_p[__pyx_v_i]) = Py_None;
5656 __Pyx_XDECREF(__pyx_t_3);
5657 __Pyx_XDECREF(__pyx_t_5);
5658 __Pyx_XDECREF(__pyx_t_6);
5659 __Pyx_XDECREF(__pyx_t_10);
5660 __Pyx_AddTraceback(
"View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5663 __Pyx_XDECREF(__pyx_v_format);
5664 __Pyx_RefNannyFinishContext();
5677 static CYTHON_UNUSED
int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
5678 static CYTHON_UNUSED
int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags) {
5680 __Pyx_RefNannyDeclarations
5681 __Pyx_RefNannySetupContext(
"__getbuffer__ (wrapper)", 0);
5682 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((
struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((
int)__pyx_v_flags));
5685 __Pyx_RefNannyFinishContext();
5689 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(
struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags) {
5690 int __pyx_v_bufmode;
5692 __Pyx_RefNannyDeclarations
5695 PyObject *__pyx_t_3 = NULL;
5697 Py_ssize_t __pyx_t_5;
5699 Py_ssize_t *__pyx_t_7;
5700 int __pyx_lineno = 0;
5701 const char *__pyx_filename = NULL;
5702 int __pyx_clineno = 0;
5703 if (__pyx_v_info == NULL) {
5704 PyErr_SetString(PyExc_BufferError,
"PyObject_GetBuffer: view==NULL argument is obsolete");
5707 __Pyx_RefNannySetupContext(
"__getbuffer__", 0);
5708 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
5709 __Pyx_GIVEREF(__pyx_v_info->obj);
5718 __pyx_v_bufmode = -1;
5727 __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ));
if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
5728 __pyx_t_2 = (__pyx_t_1 != 0);
5738 __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5757 __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ));
if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
5758 __pyx_t_1 = (__pyx_t_2 != 0);
5768 __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5787 __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
5788 if (unlikely(__pyx_t_1)) {
5797 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
5798 __Pyx_GOTREF(__pyx_t_3);
5799 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5800 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5801 __PYX_ERR(0, 192, __pyx_L1_error)
5819 __pyx_t_4 = __pyx_v_self->data;
5820 __pyx_v_info->buf = __pyx_t_4;
5829 __pyx_t_5 = __pyx_v_self->len;
5830 __pyx_v_info->len = __pyx_t_5;
5839 __pyx_t_6 = __pyx_v_self->ndim;
5840 __pyx_v_info->ndim = __pyx_t_6;
5849 __pyx_t_7 = __pyx_v_self->_shape;
5850 __pyx_v_info->shape = __pyx_t_7;
5859 __pyx_t_7 = __pyx_v_self->_strides;
5860 __pyx_v_info->strides = __pyx_t_7;
5869 __pyx_v_info->suboffsets = NULL;
5878 __pyx_t_5 = __pyx_v_self->itemsize;
5879 __pyx_v_info->itemsize = __pyx_t_5;
5888 __pyx_v_info->readonly = 0;
5897 __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
5907 __pyx_t_4 = __pyx_v_self->format;
5908 __pyx_v_info->format = __pyx_t_4;
5928 __pyx_v_info->format = NULL;
5939 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5940 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5941 __Pyx_GOTREF(__pyx_v_info->obj);
5942 __Pyx_DECREF(__pyx_v_info->obj);
5943 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
5957 __Pyx_XDECREF(__pyx_t_3);
5958 __Pyx_AddTraceback(
"View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5960 if (__pyx_v_info->obj != NULL) {
5961 __Pyx_GOTREF(__pyx_v_info->obj);
5962 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
5966 if (__pyx_v_info->obj == Py_None) {
5967 __Pyx_GOTREF(__pyx_v_info->obj);
5968 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
5971 __Pyx_RefNannyFinishContext();
5984 static void __pyx_array___dealloc__(PyObject *__pyx_v_self);
5985 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
5986 __Pyx_RefNannyDeclarations
5987 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
5988 __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((
struct __pyx_array_obj *)__pyx_v_self));
5991 __Pyx_RefNannyFinishContext();
5994 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(
struct __pyx_array_obj *__pyx_v_self) {
5995 __Pyx_RefNannyDeclarations
5997 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
6006 __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
6016 __pyx_v_self->callback_free_data(__pyx_v_self->data);
6035 __pyx_t_1 = (__pyx_v_self->free_data != 0);
6045 __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
6055 __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
6073 free(__pyx_v_self->data);
6092 PyObject_Free(__pyx_v_self->_shape);
6103 __Pyx_RefNannyFinishContext();
6115 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self);
6116 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
6117 PyObject *__pyx_r = 0;
6118 __Pyx_RefNannyDeclarations
6119 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
6120 __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((
struct __pyx_array_obj *)__pyx_v_self));
6123 __Pyx_RefNannyFinishContext();
6127 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(
struct __pyx_array_obj *__pyx_v_self) {
6128 PyObject *__pyx_r = NULL;
6129 __Pyx_RefNannyDeclarations
6130 PyObject *__pyx_t_1 = NULL;
6131 int __pyx_lineno = 0;
6132 const char *__pyx_filename = NULL;
6133 int __pyx_clineno = 0;
6134 __Pyx_RefNannySetupContext(
"__get__", 0);
6143 __Pyx_XDECREF(__pyx_r);
6144 __pyx_t_1 = ((
struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
6145 __Pyx_GOTREF(__pyx_t_1);
6146 __pyx_r = __pyx_t_1;
6160 __Pyx_XDECREF(__pyx_t_1);
6161 __Pyx_AddTraceback(
"View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6164 __Pyx_XGIVEREF(__pyx_r);
6165 __Pyx_RefNannyFinishContext();
6177 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *__pyx_v_self) {
6179 PyObject *__pyx_r = NULL;
6180 __Pyx_RefNannyDeclarations
6181 PyObject *__pyx_t_1 = NULL;
6182 PyObject *__pyx_t_2 = NULL;
6183 PyObject *__pyx_t_3 = NULL;
6184 int __pyx_lineno = 0;
6185 const char *__pyx_filename = NULL;
6186 int __pyx_clineno = 0;
6187 __Pyx_RefNannySetupContext(
"get_memview", 0);
6196 __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
6205 __Pyx_XDECREF(__pyx_r);
6206 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
6207 __Pyx_GOTREF(__pyx_t_1);
6208 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
6209 __Pyx_GOTREF(__pyx_t_2);
6210 __pyx_t_3 = PyTuple_New(3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
6211 __Pyx_GOTREF(__pyx_t_3);
6212 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6213 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6214 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
6215 __Pyx_GIVEREF(__pyx_t_1);
6216 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
6217 __Pyx_GIVEREF(__pyx_t_2);
6218 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
6221 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
6222 __Pyx_GOTREF(__pyx_t_2);
6223 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6224 __pyx_r = __pyx_t_2;
6238 __Pyx_XDECREF(__pyx_t_1);
6239 __Pyx_XDECREF(__pyx_t_2);
6240 __Pyx_XDECREF(__pyx_t_3);
6241 __Pyx_AddTraceback(
"View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
6244 __Pyx_XGIVEREF(__pyx_r);
6245 __Pyx_RefNannyFinishContext();
6258 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self);
6259 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
6261 __Pyx_RefNannyDeclarations
6262 __Pyx_RefNannySetupContext(
"__len__ (wrapper)", 0);
6263 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((
struct __pyx_array_obj *)__pyx_v_self));
6266 __Pyx_RefNannyFinishContext();
6270 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(
struct __pyx_array_obj *__pyx_v_self) {
6272 __Pyx_RefNannyDeclarations
6273 __Pyx_RefNannySetupContext(
"__len__", 0);
6282 __pyx_r = (__pyx_v_self->_shape[0]);
6295 __Pyx_RefNannyFinishContext();
6308 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr);
6309 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
6310 PyObject *__pyx_r = 0;
6311 __Pyx_RefNannyDeclarations
6312 __Pyx_RefNannySetupContext(
"__getattr__ (wrapper)", 0);
6313 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((
struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
6316 __Pyx_RefNannyFinishContext();
6320 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
6321 PyObject *__pyx_r = NULL;
6322 __Pyx_RefNannyDeclarations
6323 PyObject *__pyx_t_1 = NULL;
6324 PyObject *__pyx_t_2 = NULL;
6325 int __pyx_lineno = 0;
6326 const char *__pyx_filename = NULL;
6327 int __pyx_clineno = 0;
6328 __Pyx_RefNannySetupContext(
"__getattr__", 0);
6337 __Pyx_XDECREF(__pyx_r);
6338 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
6339 __Pyx_GOTREF(__pyx_t_1);
6340 __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
6341 __Pyx_GOTREF(__pyx_t_2);
6342 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6343 __pyx_r = __pyx_t_2;
6357 __Pyx_XDECREF(__pyx_t_1);
6358 __Pyx_XDECREF(__pyx_t_2);
6359 __Pyx_AddTraceback(
"View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6362 __Pyx_XGIVEREF(__pyx_r);
6363 __Pyx_RefNannyFinishContext();
6376 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item);
6377 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
6378 PyObject *__pyx_r = 0;
6379 __Pyx_RefNannyDeclarations
6380 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
6381 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((
struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
6384 __Pyx_RefNannyFinishContext();
6388 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
6389 PyObject *__pyx_r = NULL;
6390 __Pyx_RefNannyDeclarations
6391 PyObject *__pyx_t_1 = NULL;
6392 PyObject *__pyx_t_2 = NULL;
6393 int __pyx_lineno = 0;
6394 const char *__pyx_filename = NULL;
6395 int __pyx_clineno = 0;
6396 __Pyx_RefNannySetupContext(
"__getitem__", 0);
6405 __Pyx_XDECREF(__pyx_r);
6406 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
6407 __Pyx_GOTREF(__pyx_t_1);
6408 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
6409 __Pyx_GOTREF(__pyx_t_2);
6410 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6411 __pyx_r = __pyx_t_2;
6425 __Pyx_XDECREF(__pyx_t_1);
6426 __Pyx_XDECREF(__pyx_t_2);
6427 __Pyx_AddTraceback(
"View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6430 __Pyx_XGIVEREF(__pyx_r);
6431 __Pyx_RefNannyFinishContext();
6444 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value);
6445 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6447 __Pyx_RefNannyDeclarations
6448 __Pyx_RefNannySetupContext(
"__setitem__ (wrapper)", 0);
6449 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((
struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
6452 __Pyx_RefNannyFinishContext();
6456 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6458 __Pyx_RefNannyDeclarations
6459 PyObject *__pyx_t_1 = NULL;
6460 int __pyx_lineno = 0;
6461 const char *__pyx_filename = NULL;
6462 int __pyx_clineno = 0;
6463 __Pyx_RefNannySetupContext(
"__setitem__", 0);
6472 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
6473 __Pyx_GOTREF(__pyx_t_1);
6474 if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
6475 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6489 __Pyx_XDECREF(__pyx_t_1);
6490 __Pyx_AddTraceback(
"View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6493 __Pyx_RefNannyFinishContext();
6504 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
6505 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6506 PyObject *__pyx_r = 0;
6507 __Pyx_RefNannyDeclarations
6508 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
6509 __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((
struct __pyx_array_obj *)__pyx_v_self));
6512 __Pyx_RefNannyFinishContext();
6516 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self) {
6517 PyObject *__pyx_r = NULL;
6518 __Pyx_RefNannyDeclarations
6519 PyObject *__pyx_t_1 = NULL;
6520 int __pyx_lineno = 0;
6521 const char *__pyx_filename = NULL;
6522 int __pyx_clineno = 0;
6523 __Pyx_RefNannySetupContext(
"__reduce_cython__", 0);
6531 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
6532 __Pyx_GOTREF(__pyx_t_1);
6533 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6534 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;