proteus  1.8.1
C/C++/Fortran libraries
csparsity.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.30 */
2 
3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
5 #endif /* PY_SSIZE_T_CLEAN */
6 #include "Python.h"
7 #ifndef Py_PYTHON_H
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+.
11 #else
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
15 #include <stddef.h>
16 #ifndef offsetof
17  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
18 #endif
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
20  #ifndef __stdcall
21  #define __stdcall
22  #endif
23  #ifndef __cdecl
24  #define __cdecl
25  #endif
26  #ifndef __fastcall
27  #define __fastcall
28  #endif
29 #endif
30 #ifndef DL_IMPORT
31  #define DL_IMPORT(t) t
32 #endif
33 #ifndef DL_EXPORT
34  #define DL_EXPORT(t) t
35 #endif
36 #define __PYX_COMMA ,
37 #ifndef HAVE_LONG_LONG
38  #if PY_VERSION_HEX >= 0x02070000
39  #define HAVE_LONG_LONG
40  #endif
41 #endif
42 #ifndef PY_LONG_LONG
43  #define PY_LONG_LONG LONG_LONG
44 #endif
45 #ifndef Py_HUGE_VAL
46  #define Py_HUGE_VAL HUGE_VAL
47 #endif
48 #ifdef PYPY_VERSION
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
61  #endif
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)
90  #endif
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
97  #endif
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
106  #endif
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
113  #endif
114  #ifndef CYTHON_ASSUME_SAFE_MACROS
115  #define CYTHON_ASSUME_SAFE_MACROS 1
116  #endif
117  #ifndef CYTHON_UNPACK_METHODS
118  #define CYTHON_UNPACK_METHODS 1
119  #endif
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
134  #endif
135 #else
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
141  #endif
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
147  #endif
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
153  #endif
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
159  #endif
160  #ifndef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 1
162  #endif
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
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
171  #endif
172  #ifndef CYTHON_AVOID_BORROWED_REFS
173  #define CYTHON_AVOID_BORROWED_REFS 0
174  #endif
175  #ifndef CYTHON_ASSUME_SAFE_MACROS
176  #define CYTHON_ASSUME_SAFE_MACROS 1
177  #endif
178  #ifndef CYTHON_UNPACK_METHODS
179  #define CYTHON_UNPACK_METHODS 1
180  #endif
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
186  #endif
187  #ifndef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
189  #endif
190  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
192  #endif
193  #ifndef CYTHON_USE_TP_FINALIZE
194  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
195  #endif
196  #ifndef CYTHON_USE_DICT_VERSIONS
197  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
198  #endif
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)
204  #endif
205  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
207  #endif
208 #endif
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
211 #endif
212 #if CYTHON_USE_PYLONG_INTERNALS
213  #if PY_MAJOR_VERSION < 3
214  #include "longintrepr.h"
215  #endif
216  #undef SHIFT
217  #undef BASE
218  #undef MASK
219  #ifdef SIZEOF_VOID_P
220  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
221  #endif
222 #endif
223 #ifndef __has_attribute
224  #define __has_attribute(x) 0
225 #endif
226 #ifndef __has_cpp_attribute
227  #define __has_cpp_attribute(x) 0
228 #endif
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
236  #else
237  #define CYTHON_RESTRICT
238  #endif
239 #endif
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__))
244 # else
245 # define CYTHON_UNUSED
246 # endif
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
249 # else
250 # define CYTHON_UNUSED
251 # endif
252 #endif
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
256 # else
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
258 # endif
259 #endif
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
263 # else
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
265 # endif
266 #endif
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
268 #ifdef _MSC_VER
269  #ifndef _MSC_STDINT_H_
270  #if _MSC_VER < 1300
271  typedef unsigned char uint8_t;
272  typedef unsigned int uint32_t;
273  #else
274  typedef unsigned __int8 uint8_t;
275  typedef unsigned __int32 uint32_t;
276  #endif
277  #endif
278 #else
279  #include <stdint.h>
280 #endif
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]]
289  #endif
290  #endif
291  #ifndef CYTHON_FALLTHROUGH
292  #if __has_attribute(fallthrough)
293  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
294  #else
295  #define CYTHON_FALLTHROUGH
296  #endif
297  #endif
298  #if defined(__clang__ ) && defined(__apple_build_version__)
299  #if __apple_build_version__ < 7000000
300  #undef CYTHON_FALLTHROUGH
301  #define CYTHON_FALLTHROUGH
302  #endif
303  #endif
304 #endif
305 
306 #ifndef __cplusplus
307  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
308 #endif
309 #ifndef CYTHON_INLINE
310  #if defined(__clang__)
311  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
312  #else
313  #define CYTHON_INLINE inline
314  #endif
315 #endif
316 template<typename T>
317 void __Pyx_call_destructor(T& x) {
318  x.~T();
319 }
320 template<typename T>
321 class __Pyx_FakeReference {
322  public:
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; }
330  private:
331  T *ptr;
332 };
333 
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335  #define Py_OptimizeFlag 0
336 #endif
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
344 #else
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; // unfortunately __pyx_empty_tuple isn't available here
384  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
385  Py_XDECREF((PyObject*)co);
386  co = (PyCodeObject*)call_result;
387  call_result = NULL;
388  if (0) {
389  cleanup_code_too:
390  Py_XDECREF((PyObject*)co);
391  co = NULL;
392  }
393  end:
394  Py_XDECREF(kwds);
395  Py_XDECREF(argcount);
396  Py_XDECREF(posonlyargcount);
397  Py_XDECREF(kwonlyargcount);
398  Py_XDECREF(nlocals);
399  Py_XDECREF(stacksize);
400  Py_XDECREF(replace);
401  Py_XDECREF(call_result);
402  Py_XDECREF(empty);
403  if (type) {
404  PyErr_Restore(type, value, traceback);
405  }
406  return co;
407  }
408 #else
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)
411 #endif
412  #define __Pyx_DefaultClassType PyType_Type
413 #endif
414 #ifndef Py_TPFLAGS_CHECKTYPES
415  #define Py_TPFLAGS_CHECKTYPES 0
416 #endif
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418  #define Py_TPFLAGS_HAVE_INDEX 0
419 #endif
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
422 #endif
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424  #define Py_TPFLAGS_HAVE_FINALIZE 0
425 #endif
426 #ifndef METH_STACKLESS
427  #define METH_STACKLESS 0
428 #endif
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430  #ifndef METH_FASTCALL
431  #define METH_FASTCALL 0x80
432  #endif
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);
436 #else
437  #define __Pyx_PyCFunctionFast _PyCFunctionFast
438  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
439 #endif
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)))))
443 #else
444 #define __Pyx_PyFastCFunction_Check(func) 0
445 #endif
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)
450 #endif
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)
455 #endif
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)
459 #else
460  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
462 #endif
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()
469 #else
470  #define __Pyx_PyThreadState_Current _PyThreadState_Current
471 #endif
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();
478  return 0;
479 }
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;
483  return key;
484 }
485 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
486  PyObject_Free(key);
487 }
488 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
489  return *key != Py_tss_NEEDS_INIT;
490 }
491 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
492  PyThread_delete_key(*key);
493  *key = Py_tss_NEEDS_INIT;
494 }
495 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
496  return PyThread_set_key_value(*key, value);
497 }
498 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
499  return PyThread_get_key_value(*key);
500 }
501 #endif
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
504 #else
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
506 #endif
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)
510 #else
511  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
513 #endif
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)
516 #else
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
518 #endif
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)))
524  #else
525  #define __Pyx_PyUnicode_READY(op) (0)
526  #endif
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))
537  #else
538  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
539  #endif
540  #else
541  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
542  #endif
543 #else
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))
557 #endif
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)
561 #else
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))
565 #endif
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
568 #endif
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
571 #endif
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
574 #endif
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)
579 #else
580  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
581 #endif
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583  #define PyObject_ASCII(o) PyObject_Repr(o)
584 #endif
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
593 #endif
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
598 #else
599  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
601 #endif
602 #ifndef PySet_CheckExact
603  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
604 #endif
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)
608 #else
609  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
611 #endif
612 #if CYTHON_ASSUME_SAFE_MACROS
613  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
614 #else
615  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
616 #endif
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
633 #endif
634 #if PY_MAJOR_VERSION >= 3
635  #define PyBoolObject PyLongObject
636 #endif
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638  #ifndef PyUnicode_InternFromString
639  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
640  #endif
641 #endif
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
646 #else
647  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
649 #endif
650 #if PY_MAJOR_VERSION >= 3
651  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
652 #else
653  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
654 #endif
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)
659  #else
660  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
661  #endif
662 #else
663  #define __Pyx_PyType_AsAsync(obj) NULL
664 #endif
665 #ifndef __Pyx_PyAsyncMethodsStruct
666  typedef struct {
667  unaryfunc am_await;
668  unaryfunc am_aiter;
669  unaryfunc am_anext;
670  } __Pyx_PyAsyncMethodsStruct;
671 #endif
672 
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674  #if !defined(_USE_MATH_DEFINES)
675  #define _USE_MATH_DEFINES
676  #endif
677 #endif
678 #include <math.h>
679 #ifdef NAN
680 #define __PYX_NAN() ((float) NAN)
681 #else
682 static CYTHON_INLINE float __PYX_NAN() {
683  float value;
684  memset(&value, 0xFF, sizeof(value));
685  return value;
686 }
687 #endif
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
690 #else
691 #define __Pyx_truncl truncl
692 #endif
693 
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; }
698 
699 #ifndef __PYX_EXTERN_C
700  #ifdef __cplusplus
701  #define __PYX_EXTERN_C extern "C"
702  #else
703  #define __PYX_EXTERN_C extern
704  #endif
705 #endif
706 
707 #define __PYX_HAVE__csparsity
708 #define __PYX_HAVE_API__csparsity
709 /* Early includes */
710 #include "sparsity.h"
711 #include <string.h>
712 #include <stdio.h>
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"
718 
719  /* NumPy API declarations from "numpy/__init__.pxd" */
720 
721 #include "pythread.h"
722 #include <stdlib.h>
723 #include "pystate.h"
724 #ifdef _OPENMP
725 #include <omp.h>
726 #endif /* _OPENMP */
727 
728 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
729 #define CYTHON_WITHOUT_ASSERTIONS
730 #endif
731 
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;
734 
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;
755 }
756 #if defined (__cplusplus) && __cplusplus >= 201103L
757  #include <cstdlib>
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)
769 #else
770  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
771 #endif
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
782 #else
783  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
784  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
785 #endif
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;
804  while (*u_end++) ;
805  return (size_t)(u_end - u - 1);
806 }
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))
823 #else
824 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
825 #endif
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))
829 #else
830 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
831 #endif
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) {
836  PyObject* sys;
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");
842  if (!sys) goto bad;
843  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
844  Py_DECREF(sys);
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;
850  } else {
851  char ascii_chars[128];
852  int c;
853  for (c = 0; c < 128; c++) {
854  ascii_chars[c] = c;
855  }
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) {
861  PyErr_Format(
862  PyExc_ValueError,
863  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
864  default_encoding_c);
865  goto bad;
866  }
867  Py_DECREF(ascii_chars_u);
868  Py_DECREF(ascii_chars_b);
869  }
870  Py_DECREF(default_encoding);
871  return 0;
872 bad:
873  Py_XDECREF(default_encoding);
874  Py_XDECREF(ascii_chars_u);
875  Py_XDECREF(ascii_chars_b);
876  return -1;
877 }
878 #endif
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)
881 #else
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) {
886  PyObject* sys;
887  PyObject* default_encoding = NULL;
888  char* default_encoding_c;
889  sys = PyImport_ImportModule("sys");
890  if (!sys) goto bad;
891  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
892  Py_DECREF(sys);
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);
900  return 0;
901 bad:
902  Py_XDECREF(default_encoding);
903  return -1;
904 }
905 #endif
906 #endif
907 
908 
909 /* Test for GCC > 2.95 */
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)
913 #else /* !__GNUC__ or GCC < 2.95 */
914  #define likely(x) (x)
915  #define unlikely(x) (x)
916 #endif /* __GNUC__ */
917 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
918 
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;
930 
931 /* Header.proto */
932 #if !defined(CYTHON_CCOMPLEX)
933  #if defined(__cplusplus)
934  #define CYTHON_CCOMPLEX 1
935  #elif defined(_Complex_I)
936  #define CYTHON_CCOMPLEX 1
937  #else
938  #define CYTHON_CCOMPLEX 0
939  #endif
940 #endif
941 #if CYTHON_CCOMPLEX
942  #ifdef __cplusplus
943  #include <complex>
944  #else
945  #include <complex.h>
946  #endif
947 #endif
948 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
949  #undef _Complex_I
950  #define _Complex_I 1.0fj
951 #endif
952 
953 
954 static const char *__pyx_f[] = {
955  "stringsource",
956  "proteus/csparsity.pyx",
957  "__init__.pxd",
958  "type.pxd",
959 };
960 /* ForceInitThreads.proto */
961 #ifndef __PYX_FORCE_INIT_THREADS
962  #define __PYX_FORCE_INIT_THREADS 0
963 #endif
964 
965 /* NoFastGil.proto */
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()
971 
972 /* BufferFormatStructs.proto */
973 #define IS_UNSIGNED(type) (((type) -1) > 0)
974 struct __Pyx_StructField_;
975 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
976 typedef struct {
977  const char* name;
978  struct __Pyx_StructField_* fields;
979  size_t size;
980  size_t arraysize[8];
981  int ndim;
982  char typegroup;
983  char is_unsigned;
984  int flags;
985 } __Pyx_TypeInfo;
986 typedef struct __Pyx_StructField_ {
987  __Pyx_TypeInfo* type;
988  const char* name;
989  size_t offset;
990 } __Pyx_StructField;
991 typedef struct {
992  __Pyx_StructField* field;
993  size_t parent_offset;
994 } __Pyx_BufFmt_StackElem;
995 typedef struct {
996  __Pyx_StructField root;
997  __Pyx_BufFmt_StackElem* head;
998  size_t fmt_offset;
999  size_t new_count, enc_count;
1000  size_t struct_alignment;
1001  int is_complex;
1002  char enc_type;
1003  char new_packmode;
1004  char enc_packmode;
1005  char is_valid_array;
1006 } __Pyx_BufFmt_Context;
1007 
1008 /* Atomics.proto */
1009 #include <pythread.h>
1010 #ifndef CYTHON_ATOMICS
1011  #define CYTHON_ATOMICS 1
1012 #endif
1013 #define __pyx_atomic_int_type int
1014 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
1015  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
1016  !defined(__i386__)
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"
1021  #endif
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")
1030  #endif
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"
1036  #endif
1037 #else
1038  #undef CYTHON_ATOMICS
1039  #define CYTHON_ATOMICS 0
1040  #ifdef __PYX_DEBUG_ATOMICS
1041  #warning "Not using atomics"
1042  #endif
1043 #endif
1044 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1045 #if CYTHON_ATOMICS
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)
1050 #else
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)
1055 #endif
1056 
1057 /* MemviewSliceStruct.proto */
1058 struct __pyx_memoryview_obj;
1059 typedef struct {
1060  struct __pyx_memoryview_obj *memview;
1061  char *data;
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])
1067 
1068 
1069 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1070  * # in Cython to enable them only on the right systems.
1071  *
1072  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1073  * ctypedef npy_int16 int16_t
1074  * ctypedef npy_int32 int32_t
1075  */
1076 typedef npy_int8 __pyx_t_5numpy_int8_t;
1077 
1078 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1079  *
1080  * ctypedef npy_int8 int8_t
1081  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1082  * ctypedef npy_int32 int32_t
1083  * ctypedef npy_int64 int64_t
1084  */
1085 typedef npy_int16 __pyx_t_5numpy_int16_t;
1086 
1087 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1088  * ctypedef npy_int8 int8_t
1089  * ctypedef npy_int16 int16_t
1090  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1091  * ctypedef npy_int64 int64_t
1092  * #ctypedef npy_int96 int96_t
1093  */
1094 typedef npy_int32 __pyx_t_5numpy_int32_t;
1095 
1096 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1097  * ctypedef npy_int16 int16_t
1098  * ctypedef npy_int32 int32_t
1099  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1100  * #ctypedef npy_int96 int96_t
1101  * #ctypedef npy_int128 int128_t
1102  */
1103 typedef npy_int64 __pyx_t_5numpy_int64_t;
1104 
1105 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1106  * #ctypedef npy_int128 int128_t
1107  *
1108  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1109  * ctypedef npy_uint16 uint16_t
1110  * ctypedef npy_uint32 uint32_t
1111  */
1112 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1113 
1114 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1115  *
1116  * ctypedef npy_uint8 uint8_t
1117  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1118  * ctypedef npy_uint32 uint32_t
1119  * ctypedef npy_uint64 uint64_t
1120  */
1121 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1122 
1123 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1124  * ctypedef npy_uint8 uint8_t
1125  * ctypedef npy_uint16 uint16_t
1126  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1127  * ctypedef npy_uint64 uint64_t
1128  * #ctypedef npy_uint96 uint96_t
1129  */
1130 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1131 
1132 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1133  * ctypedef npy_uint16 uint16_t
1134  * ctypedef npy_uint32 uint32_t
1135  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1136  * #ctypedef npy_uint96 uint96_t
1137  * #ctypedef npy_uint128 uint128_t
1138  */
1139 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1140 
1141 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1142  * #ctypedef npy_uint128 uint128_t
1143  *
1144  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1145  * ctypedef npy_float64 float64_t
1146  * #ctypedef npy_float80 float80_t
1147  */
1148 typedef npy_float32 __pyx_t_5numpy_float32_t;
1149 
1150 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1151  *
1152  * ctypedef npy_float32 float32_t
1153  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1154  * #ctypedef npy_float80 float80_t
1155  * #ctypedef npy_float128 float128_t
1156  */
1157 typedef npy_float64 __pyx_t_5numpy_float64_t;
1158 
1159 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1160  * # The int types are mapped a bit surprising --
1161  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1162  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1163  * ctypedef npy_longlong long_t
1164  * ctypedef npy_longlong longlong_t
1165  */
1166 typedef npy_long __pyx_t_5numpy_int_t;
1167 
1168 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1169  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1170  * ctypedef npy_long int_t
1171  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1172  * ctypedef npy_longlong longlong_t
1173  *
1174  */
1175 typedef npy_longlong __pyx_t_5numpy_long_t;
1176 
1177 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1178  * ctypedef npy_long int_t
1179  * ctypedef npy_longlong long_t
1180  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1181  *
1182  * ctypedef npy_ulong uint_t
1183  */
1184 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1185 
1186 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1187  * ctypedef npy_longlong longlong_t
1188  *
1189  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1190  * ctypedef npy_ulonglong ulong_t
1191  * ctypedef npy_ulonglong ulonglong_t
1192  */
1193 typedef npy_ulong __pyx_t_5numpy_uint_t;
1194 
1195 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1196  *
1197  * ctypedef npy_ulong uint_t
1198  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1199  * ctypedef npy_ulonglong ulonglong_t
1200  *
1201  */
1202 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1203 
1204 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1205  * ctypedef npy_ulong uint_t
1206  * ctypedef npy_ulonglong ulong_t
1207  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1208  *
1209  * ctypedef npy_intp intp_t
1210  */
1211 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1212 
1213 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1214  * ctypedef npy_ulonglong ulonglong_t
1215  *
1216  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1217  * ctypedef npy_uintp uintp_t
1218  *
1219  */
1220 typedef npy_intp __pyx_t_5numpy_intp_t;
1221 
1222 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1223  *
1224  * ctypedef npy_intp intp_t
1225  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1226  *
1227  * ctypedef npy_double float_t
1228  */
1229 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1230 
1231 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1232  * ctypedef npy_uintp uintp_t
1233  *
1234  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1235  * ctypedef npy_double double_t
1236  * ctypedef npy_longdouble longdouble_t
1237  */
1238 typedef npy_double __pyx_t_5numpy_float_t;
1239 
1240 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1241  *
1242  * ctypedef npy_double float_t
1243  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1244  * ctypedef npy_longdouble longdouble_t
1245  *
1246  */
1247 typedef npy_double __pyx_t_5numpy_double_t;
1248 
1249 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1250  * ctypedef npy_double float_t
1251  * ctypedef npy_double double_t
1252  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1253  *
1254  * ctypedef npy_cfloat cfloat_t
1255  */
1256 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1257 /* Declarations.proto */
1258 #if CYTHON_CCOMPLEX
1259  #ifdef __cplusplus
1260  typedef ::std::complex< float > __pyx_t_float_complex;
1261  #else
1262  typedef float _Complex __pyx_t_float_complex;
1263  #endif
1264 #else
1265  typedef struct { float real, imag; } __pyx_t_float_complex;
1266 #endif
1267 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1268 
1269 /* Declarations.proto */
1270 #if CYTHON_CCOMPLEX
1271  #ifdef __cplusplus
1272  typedef ::std::complex< double > __pyx_t_double_complex;
1273  #else
1274  typedef double _Complex __pyx_t_double_complex;
1275  #endif
1276 #else
1277  typedef struct { double real, imag; } __pyx_t_double_complex;
1278 #endif
1279 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1280 
1281 
1282 /*--- Type declarations ---*/
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;
1288 
1289 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1290  * ctypedef npy_longdouble longdouble_t
1291  *
1292  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1293  * ctypedef npy_cdouble cdouble_t
1294  * ctypedef npy_clongdouble clongdouble_t
1295  */
1296 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1297 
1298 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1299  *
1300  * ctypedef npy_cfloat cfloat_t
1301  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1302  * ctypedef npy_clongdouble clongdouble_t
1303  *
1304  */
1305 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1306 
1307 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1308  * ctypedef npy_cfloat cfloat_t
1309  * ctypedef npy_cdouble cdouble_t
1310  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1311  *
1312  * ctypedef npy_cdouble complex_t
1313  */
1314 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1315 
1316 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1317  * ctypedef npy_clongdouble clongdouble_t
1318  *
1319  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1320  *
1321  * cdef inline object PyArray_MultiIterNew1(a):
1322  */
1323 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1324 
1325 /* "csparsity.pyx":6
1326  * from csparsity cimport SparsityInfo
1327  *
1328  * cdef class PySparsityInfo: # <<<<<<<<<<<<<<
1329  * cdef SparsityInfo cpp
1330  * def __cinit__(self):
1331  */
1332 struct __pyx_obj_9csparsity_PySparsityInfo {
1333  PyObject_HEAD
1335 };
1336 
1337 
1338 /* "View.MemoryView":105
1339  *
1340  * @cname("__pyx_array")
1341  * cdef class array: # <<<<<<<<<<<<<<
1342  *
1343  * cdef:
1344  */
1345 struct __pyx_array_obj {
1346  PyObject_HEAD
1347  struct __pyx_vtabstruct_array *__pyx_vtab;
1348  char *data;
1349  Py_ssize_t len;
1350  char *format;
1351  int ndim;
1352  Py_ssize_t *_shape;
1353  Py_ssize_t *_strides;
1354  Py_ssize_t itemsize;
1355  PyObject *mode;
1356  PyObject *_format;
1357  void (*callback_free_data)(void *);
1358  int free_data;
1359  int dtype_is_object;
1360 };
1361 
1362 
1363 /* "View.MemoryView":279
1364  *
1365  * @cname('__pyx_MemviewEnum')
1366  * cdef class Enum(object): # <<<<<<<<<<<<<<
1367  * cdef object name
1368  * def __init__(self, name):
1369  */
1370 struct __pyx_MemviewEnum_obj {
1371  PyObject_HEAD
1372  PyObject *name;
1373 };
1374 
1375 
1376 /* "View.MemoryView":330
1377  *
1378  * @cname('__pyx_memoryview')
1379  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1380  *
1381  * cdef object obj
1382  */
1383 struct __pyx_memoryview_obj {
1384  PyObject_HEAD
1385  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1386  PyObject *obj;
1387  PyObject *_size;
1388  PyObject *_array_interface;
1389  PyThread_type_lock lock;
1390  __pyx_atomic_int acquisition_count[2];
1391  __pyx_atomic_int *acquisition_count_aligned_p;
1392  Py_buffer view;
1393  int flags;
1394  int dtype_is_object;
1395  __Pyx_TypeInfo *typeinfo;
1396 };
1397 
1398 
1399 /* "View.MemoryView":965
1400  *
1401  * @cname('__pyx_memoryviewslice')
1402  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1403  * "Internal class for passing memoryview slices to Python"
1404  *
1405  */
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 *);
1412 };
1413 
1414 
1415 
1416 /* "View.MemoryView":105
1417  *
1418  * @cname("__pyx_array")
1419  * cdef class array: # <<<<<<<<<<<<<<
1420  *
1421  * cdef:
1422  */
1423 
1424 struct __pyx_vtabstruct_array {
1425  PyObject *(*get_memview)(struct __pyx_array_obj *);
1426 };
1427 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1428 
1429 
1430 /* "View.MemoryView":330
1431  *
1432  * @cname('__pyx_memoryview')
1433  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1434  *
1435  * cdef object obj
1436  */
1437 
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 *);
1446 };
1447 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1448 
1449 
1450 /* "View.MemoryView":965
1451  *
1452  * @cname('__pyx_memoryviewslice')
1453  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1454  * "Internal class for passing memoryview slices to Python"
1455  *
1456  */
1457 
1458 struct __pyx_vtabstruct__memoryviewslice {
1459  struct __pyx_vtabstruct_memoryview __pyx_base;
1460 };
1461 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1462 
1463 /* --- Runtime support code (head) --- */
1464 /* Refnanny.proto */
1465 #ifndef CYTHON_REFNANNY
1466  #define CYTHON_REFNANNY 0
1467 #endif
1468 #if CYTHON_REFNANNY
1469  typedef struct {
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;
1480 #ifdef WITH_THREAD
1481  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1482  if (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);\
1486  } else {\
1487  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1488  }
1489 #else
1490  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1491  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1492 #endif
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)
1503 #else
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)
1515 #endif
1516 #define __Pyx_XDECREF_SET(r, v) do {\
1517  PyObject *tmp = (PyObject *) r;\
1518  r = v; __Pyx_XDECREF(tmp);\
1519  } while (0)
1520 #define __Pyx_DECREF_SET(r, v) do {\
1521  PyObject *tmp = (PyObject *) r;\
1522  r = v; __Pyx_DECREF(tmp);\
1523  } while (0)
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)
1526 
1527 /* PyObjectGetAttrStr.proto */
1528 #if CYTHON_USE_TYPE_SLOTS
1529 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1530 #else
1531 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1532 #endif
1533 
1534 /* GetBuiltinName.proto */
1535 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1536 
1537 /* RaiseArgTupleInvalid.proto */
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);
1540 
1541 /* KeywordStringCheck.proto */
1542 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1543 
1544 /* RaiseDoubleKeywords.proto */
1545 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1546 
1547 /* ParseKeywords.proto */
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);
1551 
1552 /* ArgTypeTest.proto */
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);
1557 
1558 /* PyDictVersioning.proto */
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;\
1570  } else {\
1571  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1572  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1573  }\
1574 }
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);
1578 #else
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);
1582 #endif
1583 
1584 /* GetModuleGlobalName.proto */
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);\
1592 }
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);\
1597 }
1598 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1599 #else
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);
1603 #endif
1604 
1605 /* PyCFunctionFastCall.proto */
1606 #if CYTHON_FAST_PYCCALL
1607 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1608 #else
1609 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1610 #endif
1611 
1612 /* PyFunctionFastCall.proto */
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);
1618 #else
1619 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1620 #endif
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)
1625 #endif
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
1632  #endif
1633  #include "internal/pycore_frame.h"
1634 #endif
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
1641 #endif
1642 
1643 /* PyObjectCall.proto */
1644 #if CYTHON_COMPILING_IN_CPYTHON
1645 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1646 #else
1647 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1648 #endif
1649 
1650 /* PyObjectCall2Args.proto */
1651 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1652 
1653 /* PyObjectCallMethO.proto */
1654 #if CYTHON_COMPILING_IN_CPYTHON
1655 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1656 #endif
1657 
1658 /* PyObjectCallOneArg.proto */
1659 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1660 
1661 /* PyThreadStateGet.proto */
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
1666 #else
1667 #define __Pyx_PyThreadState_declare
1668 #define __Pyx_PyThreadState_assign
1669 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1670 #endif
1671 
1672 /* PyErrFetchRestore.proto */
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))
1683 #else
1684 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1685 #endif
1686 #else
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)
1695 #endif
1696 
1697 /* RaiseException.proto */
1698 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1699 
1700 /* GetTopmostException.proto */
1701 #if CYTHON_USE_EXC_INFO_STACK
1702 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1703 #endif
1704 
1705 /* SaveResetException.proto */
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);
1711 #else
1712 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1713 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1714 #endif
1715 
1716 /* PyErrExceptionMatches.proto */
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);
1720 #else
1721 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1722 #endif
1723 
1724 /* GetException.proto */
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);
1728 #else
1729 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1730 #endif
1731 
1732 /* IncludeStringH.proto */
1733 #include <string.h>
1734 
1735 /* BytesEquals.proto */
1736 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1737 
1738 /* UnicodeEquals.proto */
1739 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1740 
1741 /* StrEquals.proto */
1742 #if PY_MAJOR_VERSION >= 3
1743 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1744 #else
1745 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1746 #endif
1747 
1748 /* DivInt[Py_ssize_t].proto */
1749 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1750 
1751 /* UnaryNegOverflows.proto */
1752 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1753  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1754 
1755 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1756 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1757 /* GetAttr.proto */
1758 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1759 
1760 /* GetItemInt.proto */
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);
1781 
1782 /* ObjectGetItem.proto */
1783 #if CYTHON_USE_TYPE_SLOTS
1784 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1785 #else
1786 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1787 #endif
1788 
1789 /* decode_c_string_utf16.proto */
1790 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1791  int byteorder = 0;
1792  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1793 }
1794 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1795  int byteorder = -1;
1796  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1797 }
1798 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1799  int byteorder = 1;
1800  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1801 }
1802 
1803 /* decode_c_string.proto */
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));
1808 
1809 /* GetAttr3.proto */
1810 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1811 
1812 /* RaiseTooManyValuesToUnpack.proto */
1813 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1814 
1815 /* RaiseNeedMoreValuesToUnpack.proto */
1816 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1817 
1818 /* RaiseNoneIterError.proto */
1819 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1820 
1821 /* ExtTypeTest.proto */
1822 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1823 
1824 /* SwapException.proto */
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);
1828 #else
1829 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1830 #endif
1831 
1832 /* Import.proto */
1833 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1834 
1835 /* FastTypeChecks.proto */
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);
1841 #else
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))
1845 #endif
1846 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1847 
1848 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1849 /* ListCompAppend.proto */
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)) {
1855  Py_INCREF(x);
1856  PyList_SET_ITEM(list, len, x);
1857  __Pyx_SET_SIZE(list, len + 1);
1858  return 0;
1859  }
1860  return PyList_Append(list, x);
1861 }
1862 #else
1863 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1864 #endif
1865 
1866 /* PyIntBinop.proto */
1867 #if !CYTHON_COMPILING_IN_PYPY
1868 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1869 #else
1870 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1871  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1872 #endif
1873 
1874 /* ListExtend.proto */
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))
1879  return -1;
1880  Py_DECREF(none);
1881  return 0;
1882 #else
1883  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
1884 #endif
1885 }
1886 
1887 /* ListAppend.proto */
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))) {
1893  Py_INCREF(x);
1894  PyList_SET_ITEM(list, len, x);
1895  __Pyx_SET_SIZE(list, len + 1);
1896  return 0;
1897  }
1898  return PyList_Append(list, x);
1899 }
1900 #else
1901 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1902 #endif
1903 
1904 /* None.proto */
1905 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1906 
1907 /* DivInt[long].proto */
1908 static CYTHON_INLINE long __Pyx_div_long(long, long);
1909 
1910 /* PySequenceContains.proto */
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));
1914 }
1915 
1916 /* ImportFrom.proto */
1917 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1918 
1919 /* HasAttr.proto */
1920 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1921 
1922 /* StringJoin.proto */
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))
1926 #else
1927 #define __Pyx_PyString_Join PyUnicode_Join
1928 #define __Pyx_PyBaseString_Join PyUnicode_Join
1929 #endif
1930 #if CYTHON_COMPILING_IN_CPYTHON
1931  #if PY_MAJOR_VERSION < 3
1932  #define __Pyx_PyBytes_Join _PyString_Join
1933  #else
1934  #define __Pyx_PyBytes_Join _PyBytes_Join
1935  #endif
1936 #else
1937 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1938 #endif
1939 
1940 /* PyObject_Unicode.proto */
1941 #if PY_MAJOR_VERSION >= 3
1942 #define __Pyx_PyObject_Unicode(obj)\
1943  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1944 #else
1945 #define __Pyx_PyObject_Unicode(obj)\
1946  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1947 #endif
1948 
1949 /* PyObject_GenericGetAttrNoDict.proto */
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);
1952 #else
1953 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1954 #endif
1955 
1956 /* PyObject_GenericGetAttr.proto */
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);
1959 #else
1960 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1961 #endif
1962 
1963 /* PyObjectGetAttrStrNoError.proto */
1964 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1965 
1966 /* SetupReduce.proto */
1967 static int __Pyx_setup_reduce(PyObject* type_obj);
1968 
1969 /* SetVTable.proto */
1970 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1971 
1972 /* TypeImport.proto */
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
1979 };
1980 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1981 #endif
1982 
1983 /* CLineInTraceback.proto */
1984 #ifdef CYTHON_CLINE_IN_TRACEBACK
1985 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1986 #else
1987 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1988 #endif
1989 
1990 /* CodeObjectCache.proto */
1991 typedef struct {
1992  PyCodeObject* code_object;
1993  int code_line;
1994 } __Pyx_CodeObjectCacheEntry;
1995 struct __Pyx_CodeObjectCache {
1996  int count;
1997  int max_count;
1998  __Pyx_CodeObjectCacheEntry* entries;
1999 };
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);
2004 
2005 /* AddTraceback.proto */
2006 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2007  int py_line, const char *filename);
2008 
2009 /* None.proto */
2010 #include <new>
2011 
2012 /* GCCDiagnostics.proto */
2013 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2014 #define __Pyx_HAS_GCC_DIAGNOSTIC
2015 #endif
2016 
2017 /* MemviewDtypeToObject.proto */
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);
2020 
2021 /* MemviewDtypeToObject.proto */
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);
2024 
2025 /* RealImag.proto */
2026 #if CYTHON_CCOMPLEX
2027  #ifdef __cplusplus
2028  #define __Pyx_CREAL(z) ((z).real())
2029  #define __Pyx_CIMAG(z) ((z).imag())
2030  #else
2031  #define __Pyx_CREAL(z) (__real__(z))
2032  #define __Pyx_CIMAG(z) (__imag__(z))
2033  #endif
2034 #else
2035  #define __Pyx_CREAL(z) ((z).real)
2036  #define __Pyx_CIMAG(z) ((z).imag)
2037 #endif
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))
2042 #else
2043  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2044  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2045 #endif
2046 
2047 /* Arithmetic.proto */
2048 #if CYTHON_CCOMPLEX
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))
2055  #ifdef __cplusplus
2056  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2057  #define __Pyx_c_conj_float(z) (::std::conj(z))
2058  #if 1
2059  #define __Pyx_c_abs_float(z) (::std::abs(z))
2060  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2061  #endif
2062  #else
2063  #define __Pyx_c_is_zero_float(z) ((z)==0)
2064  #define __Pyx_c_conj_float(z) (conjf(z))
2065  #if 1
2066  #define __Pyx_c_abs_float(z) (cabsf(z))
2067  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2068  #endif
2069  #endif
2070 #else
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);
2079  #if 1
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);
2082  #endif
2083 #endif
2084 
2085 /* Arithmetic.proto */
2086 #if CYTHON_CCOMPLEX
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))
2093  #ifdef __cplusplus
2094  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2095  #define __Pyx_c_conj_double(z) (::std::conj(z))
2096  #if 1
2097  #define __Pyx_c_abs_double(z) (::std::abs(z))
2098  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2099  #endif
2100  #else
2101  #define __Pyx_c_is_zero_double(z) ((z)==0)
2102  #define __Pyx_c_conj_double(z) (conj(z))
2103  #if 1
2104  #define __Pyx_c_abs_double(z) (cabs(z))
2105  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2106  #endif
2107  #endif
2108 #else
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);
2117  #if 1
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);
2120  #endif
2121 #endif
2122 
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);
2126 #else
2127  #define __Pyx_GetBuffer PyObject_GetBuffer
2128  #define __Pyx_ReleaseBuffer PyBuffer_Release
2129 #endif
2130 
2131 
2132 /* BufferStructDeclare.proto */
2133 typedef struct {
2134  Py_ssize_t shape, strides, suboffsets;
2135 } __Pyx_Buf_DimInfo;
2136 typedef struct {
2137  size_t refcount;
2138  Py_buffer pybuffer;
2139 } __Pyx_Buffer;
2140 typedef struct {
2141  __Pyx_Buffer *rcbuffer;
2142  char *data;
2143  __Pyx_Buf_DimInfo diminfo[8];
2144 } __Pyx_LocalBuf_ND;
2145 
2146 /* MemviewSliceIsContig.proto */
2147 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2148 
2149 /* OverlappingSlices.proto */
2150 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2151  __Pyx_memviewslice *slice2,
2152  int ndim, size_t itemsize);
2153 
2154 /* Capsule.proto */
2155 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2156 
2157 /* CIntFromPy.proto */
2158 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2159 
2160 /* CIntToPy.proto */
2161 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2162 
2163 /* TypeInfoToFormat.proto */
2164 struct __pyx_typeinfo_string {
2165  char string[3];
2166 };
2167 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2168 
2169 /* MemviewSliceCopyTemplate.proto */
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);
2175 
2176 /* MemviewSliceInit.proto */
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,
2188  int ndim,
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);
2201 
2202 /* CIntFromPy.proto */
2203 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2204 
2205 /* CIntToPy.proto */
2206 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2207 
2208 /* CIntFromPy.proto */
2209 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2210 
2211 /* CheckBinaryVersion.proto */
2212 static int __Pyx_check_binary_version(void);
2213 
2214 /* InitStrings.proto */
2215 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2216 
2217 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2218 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2219 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2220 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
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); /* proto*/
2222 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2223 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2224 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2225 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2226 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2227 
2228 /* Module declarations from 'cpython.buffer' */
2229 
2230 /* Module declarations from 'libc.string' */
2231 
2232 /* Module declarations from 'libc.stdio' */
2233 
2234 /* Module declarations from '__builtin__' */
2235 
2236 /* Module declarations from 'cpython.type' */
2237 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2238 
2239 /* Module declarations from 'cpython' */
2240 
2241 /* Module declarations from 'cpython.object' */
2242 
2243 /* Module declarations from 'cpython.ref' */
2244 
2245 /* Module declarations from 'cpython.mem' */
2246 
2247 /* Module declarations from 'numpy' */
2248 
2249 /* Module declarations from 'numpy' */
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;
2265 
2266 /* Module declarations from 'csparsity' */
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 *); /*proto*/
2280 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2281 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2282 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2283 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2284 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2285 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
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); /*proto*/
2287 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2288 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2289 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2290 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2291 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2292 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2293 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2294 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2295 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2296 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2297 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2298 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2299 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2300 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2301 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2302 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2303 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2304 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2305 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2306 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2307 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2308 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2309 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2310 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2311 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2312 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
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;
2318 
2319 /* Implementation of 'csparsity' */
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); /* proto */
2592 static void __pyx_pf_9csparsity_14PySparsityInfo_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
2595 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_8getCSR(struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self); /* proto */
2596 static PyObject *__pyx_pf_9csparsity_14PySparsityInfo_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
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); /* proto */
2600 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2601 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2602 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2603 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2604 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
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); /* proto */
2606 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
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); /* proto */
2608 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2609 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2610 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2611 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
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); /* proto */
2613 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2614 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
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); /* proto */
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); /* proto */
2617 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2618 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2619 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2620 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2621 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2622 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2623 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2624 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2625 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2626 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2627 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2628 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2629 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2630 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2631 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2632 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2633 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
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); /* proto */
2635 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2636 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2637 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
2640 static PyObject *__pyx_tp_new_9csparsity_PySparsityInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2641 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2642 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2643 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2644 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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;
2681 /* Late includes */
2682 
2683 /* "csparsity.pyx":8
2684  * cdef class PySparsityInfo:
2685  * cdef SparsityInfo cpp
2686  * def __cinit__(self): # <<<<<<<<<<<<<<
2687  * pass
2688  * def __dealloc__(self):
2689  */
2690 
2691 /* Python wrapper */
2692 static int __pyx_pw_9csparsity_14PySparsityInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2693 static int __pyx_pw_9csparsity_14PySparsityInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2694  int __pyx_r;
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));
2701 
2702  /* function exit code */
2703  __Pyx_RefNannyFinishContext();
2704  return __pyx_r;
2705 }
2706 
2707 static int __pyx_pf_9csparsity_14PySparsityInfo___cinit__(CYTHON_UNUSED struct __pyx_obj_9csparsity_PySparsityInfo *__pyx_v_self) {
2708  int __pyx_r;
2709  __Pyx_RefNannyDeclarations
2710  __Pyx_RefNannySetupContext("__cinit__", 0);
2711 
2712  /* function exit code */
2713  __pyx_r = 0;
2714  __Pyx_RefNannyFinishContext();
2715  return __pyx_r;
2716 }
2717 
2718 /* "csparsity.pyx":10
2719  * def __cinit__(self):
2720  * pass
2721  * def __dealloc__(self): # <<<<<<<<<<<<<<
2722  * pass
2723  * #self.cpp.columnIndecesMap.clear()
2724  */
2725 
2726 /* Python wrapper */
2727 static void __pyx_pw_9csparsity_14PySparsityInfo_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
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));
2732 
2733  /* function exit code */
2734  __Pyx_RefNannyFinishContext();
2735 }
2736 
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);
2740 
2741  /* function exit code */
2742  __Pyx_RefNannyFinishContext();
2743 }
2744 
2745 /* "csparsity.pyx":14
2746  * #self.cpp.columnIndecesMap.clear()
2747  * #self.cpp.columnOffsetsMap.clear()
2748  * def findNonzeros(self, # <<<<<<<<<<<<<<
2749  * int nElements_global,
2750  * int nDOF_test_element,
2751  */
2752 
2753 /* Python wrapper */
2754 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_5findNonzeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
2787  {
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)) {
2791  Py_ssize_t kw_args;
2792  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2793  switch (pos_args) {
2794  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
2795  CYTHON_FALLTHROUGH;
2796  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
2797  CYTHON_FALLTHROUGH;
2798  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
2799  CYTHON_FALLTHROUGH;
2800  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
2801  CYTHON_FALLTHROUGH;
2802  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
2803  CYTHON_FALLTHROUGH;
2804  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
2805  CYTHON_FALLTHROUGH;
2806  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
2807  CYTHON_FALLTHROUGH;
2808  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
2809  CYTHON_FALLTHROUGH;
2810  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
2811  CYTHON_FALLTHROUGH;
2812  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
2813  CYTHON_FALLTHROUGH;
2814  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
2815  CYTHON_FALLTHROUGH;
2816  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2817  CYTHON_FALLTHROUGH;
2818  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2819  CYTHON_FALLTHROUGH;
2820  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2821  CYTHON_FALLTHROUGH;
2822  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2823  CYTHON_FALLTHROUGH;
2824  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2825  CYTHON_FALLTHROUGH;
2826  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2827  CYTHON_FALLTHROUGH;
2828  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2829  CYTHON_FALLTHROUGH;
2830  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2831  CYTHON_FALLTHROUGH;
2832  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2833  CYTHON_FALLTHROUGH;
2834  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2835  CYTHON_FALLTHROUGH;
2836  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2837  CYTHON_FALLTHROUGH;
2838  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2839  CYTHON_FALLTHROUGH;
2840  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2841  CYTHON_FALLTHROUGH;
2842  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2843  CYTHON_FALLTHROUGH;
2844  case 0: break;
2845  default: goto __pyx_L5_argtuple_error;
2846  }
2847  kw_args = PyDict_Size(__pyx_kwds);
2848  switch (pos_args) {
2849  case 0:
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;
2852  CYTHON_FALLTHROUGH;
2853  case 1:
2854  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_test_element)) != 0)) kw_args--;
2855  else {
2856  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 1); __PYX_ERR(1, 14, __pyx_L3_error)
2857  }
2858  CYTHON_FALLTHROUGH;
2859  case 2:
2860  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_trial_element)) != 0)) kw_args--;
2861  else {
2862  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 2); __PYX_ERR(1, 14, __pyx_L3_error)
2863  }
2864  CYTHON_FALLTHROUGH;
2865  case 3:
2866  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_test)) != 0)) kw_args--;
2867  else {
2868  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 3); __PYX_ERR(1, 14, __pyx_L3_error)
2869  }
2870  CYTHON_FALLTHROUGH;
2871  case 4:
2872  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_test)) != 0)) kw_args--;
2873  else {
2874  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 4); __PYX_ERR(1, 14, __pyx_L3_error)
2875  }
2876  CYTHON_FALLTHROUGH;
2877  case 5:
2878  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_trial)) != 0)) kw_args--;
2879  else {
2880  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 5); __PYX_ERR(1, 14, __pyx_L3_error)
2881  }
2882  CYTHON_FALLTHROUGH;
2883  case 6:
2884  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_trial)) != 0)) kw_args--;
2885  else {
2886  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 6); __PYX_ERR(1, 14, __pyx_L3_error)
2887  }
2888  CYTHON_FALLTHROUGH;
2889  case 7:
2890  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_test)) != 0)) kw_args--;
2891  else {
2892  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 7); __PYX_ERR(1, 14, __pyx_L3_error)
2893  }
2894  CYTHON_FALLTHROUGH;
2895  case 8:
2896  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_test)) != 0)) kw_args--;
2897  else {
2898  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 8); __PYX_ERR(1, 14, __pyx_L3_error)
2899  }
2900  CYTHON_FALLTHROUGH;
2901  case 9:
2902  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_trial)) != 0)) kw_args--;
2903  else {
2904  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 9); __PYX_ERR(1, 14, __pyx_L3_error)
2905  }
2906  CYTHON_FALLTHROUGH;
2907  case 10:
2908  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_trial)) != 0)) kw_args--;
2909  else {
2910  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 10); __PYX_ERR(1, 14, __pyx_L3_error)
2911  }
2912  CYTHON_FALLTHROUGH;
2913  case 11:
2914  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasNumericalFlux)) != 0)) kw_args--;
2915  else {
2916  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 11); __PYX_ERR(1, 14, __pyx_L3_error)
2917  }
2918  CYTHON_FALLTHROUGH;
2919  case 12:
2920  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasDiffusionInMixedForm)) != 0)) kw_args--;
2921  else {
2922  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 12); __PYX_ERR(1, 14, __pyx_L3_error)
2923  }
2924  CYTHON_FALLTHROUGH;
2925  case 13:
2926  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needNumericalFluxJacobian)) != 0)) kw_args--;
2927  else {
2928  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 13); __PYX_ERR(1, 14, __pyx_L3_error)
2929  }
2930  CYTHON_FALLTHROUGH;
2931  case 14:
2932  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
2933  else {
2934  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 14); __PYX_ERR(1, 14, __pyx_L3_error)
2935  }
2936  CYTHON_FALLTHROUGH;
2937  case 15:
2938  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2939  else {
2940  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 15); __PYX_ERR(1, 14, __pyx_L3_error)
2941  }
2942  CYTHON_FALLTHROUGH;
2943  case 16:
2944  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
2945  else {
2946  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 16); __PYX_ERR(1, 14, __pyx_L3_error)
2947  }
2948  CYTHON_FALLTHROUGH;
2949  case 17:
2950  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundariesArray)) != 0)) kw_args--;
2951  else {
2952  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 17); __PYX_ERR(1, 14, __pyx_L3_error)
2953  }
2954  CYTHON_FALLTHROUGH;
2955  case 18:
2956  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
2957  else {
2958  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 18); __PYX_ERR(1, 14, __pyx_L3_error)
2959  }
2960  CYTHON_FALLTHROUGH;
2961  case 19:
2962  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
2963  else {
2964  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 19); __PYX_ERR(1, 14, __pyx_L3_error)
2965  }
2966  CYTHON_FALLTHROUGH;
2967  case 20:
2968  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasFluxBoundaryConditions)) != 0)) kw_args--;
2969  else {
2970  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 20); __PYX_ERR(1, 14, __pyx_L3_error)
2971  }
2972  CYTHON_FALLTHROUGH;
2973  case 21:
2974  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
2975  else {
2976  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 21); __PYX_ERR(1, 14, __pyx_L3_error)
2977  }
2978  CYTHON_FALLTHROUGH;
2979  case 22:
2980  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
2981  else {
2982  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 22); __PYX_ERR(1, 14, __pyx_L3_error)
2983  }
2984  CYTHON_FALLTHROUGH;
2985  case 23:
2986  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasOutflowBoundary)) != 0)) kw_args--;
2987  else {
2988  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 23); __PYX_ERR(1, 14, __pyx_L3_error)
2989  }
2990  CYTHON_FALLTHROUGH;
2991  case 24:
2992  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needOutflowJacobian)) != 0)) kw_args--;
2993  else {
2994  __Pyx_RaiseArgtupleInvalid("findNonzeros", 1, 25, 25, 24); __PYX_ERR(1, 14, __pyx_L3_error)
2995  }
2996  }
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)
2999  }
3000  } else if (PyTuple_GET_SIZE(__pyx_args) != 25) {
3001  goto __pyx_L5_argtuple_error;
3002  } else {
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);
3028  }
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)
3054  }
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)
3058  __pyx_L3_error:;
3059  __Pyx_AddTraceback("csparsity.PySparsityInfo.findNonzeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
3060  __Pyx_RefNannyFinishContext();
3061  return NULL;
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);
3073 
3074  /* function exit code */
3075  goto __pyx_L0;
3076  __pyx_L1_error:;
3077  __pyx_r = NULL;
3078  __pyx_L0:;
3079  __Pyx_RefNannyFinishContext();
3080  return __pyx_r;
3081 }
3082 
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);
3087 
3088  /* "csparsity.pyx":40
3089  * int hasOutflowBoundary,
3090  * int needOutflowJacobian):
3091  * self.cpp.findNonzeros(nElements_global, # <<<<<<<<<<<<<<
3092  * nDOF_test_element,
3093  * nDOF_trial_element,
3094  */
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);
3096 
3097  /* "csparsity.pyx":14
3098  * #self.cpp.columnIndecesMap.clear()
3099  * #self.cpp.columnOffsetsMap.clear()
3100  * def findNonzeros(self, # <<<<<<<<<<<<<<
3101  * int nElements_global,
3102  * int nDOF_test_element,
3103  */
3104 
3105  /* function exit code */
3106  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3107  __Pyx_XGIVEREF(__pyx_r);
3108  __Pyx_RefNannyFinishContext();
3109  return __pyx_r;
3110 }
3111 
3112 /* "csparsity.pyx":65
3113  * hasOutflowBoundary,
3114  * needOutflowJacobian)
3115  * def getOffsets_CSR(self, # <<<<<<<<<<<<<<
3116  * int nElements_global,
3117  * int nDOF_test_element,
3118  */
3119 
3120 /* Python wrapper */
3121 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_7getOffsets_CSR(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
3160  {
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)) {
3164  Py_ssize_t kw_args;
3165  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3166  switch (pos_args) {
3167  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3168  CYTHON_FALLTHROUGH;
3169  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3170  CYTHON_FALLTHROUGH;
3171  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3172  CYTHON_FALLTHROUGH;
3173  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3174  CYTHON_FALLTHROUGH;
3175  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3176  CYTHON_FALLTHROUGH;
3177  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3178  CYTHON_FALLTHROUGH;
3179  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3180  CYTHON_FALLTHROUGH;
3181  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3182  CYTHON_FALLTHROUGH;
3183  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3184  CYTHON_FALLTHROUGH;
3185  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3186  CYTHON_FALLTHROUGH;
3187  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3188  CYTHON_FALLTHROUGH;
3189  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3190  CYTHON_FALLTHROUGH;
3191  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3192  CYTHON_FALLTHROUGH;
3193  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3194  CYTHON_FALLTHROUGH;
3195  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3196  CYTHON_FALLTHROUGH;
3197  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3198  CYTHON_FALLTHROUGH;
3199  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3200  CYTHON_FALLTHROUGH;
3201  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3202  CYTHON_FALLTHROUGH;
3203  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3204  CYTHON_FALLTHROUGH;
3205  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3206  CYTHON_FALLTHROUGH;
3207  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3208  CYTHON_FALLTHROUGH;
3209  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3210  CYTHON_FALLTHROUGH;
3211  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3212  CYTHON_FALLTHROUGH;
3213  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3214  CYTHON_FALLTHROUGH;
3215  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3216  CYTHON_FALLTHROUGH;
3217  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3218  CYTHON_FALLTHROUGH;
3219  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3220  CYTHON_FALLTHROUGH;
3221  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3222  CYTHON_FALLTHROUGH;
3223  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3224  CYTHON_FALLTHROUGH;
3225  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3226  CYTHON_FALLTHROUGH;
3227  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3228  CYTHON_FALLTHROUGH;
3229  case 0: break;
3230  default: goto __pyx_L5_argtuple_error;
3231  }
3232  kw_args = PyDict_Size(__pyx_kwds);
3233  switch (pos_args) {
3234  case 0:
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;
3237  CYTHON_FALLTHROUGH;
3238  case 1:
3239  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_test_element)) != 0)) kw_args--;
3240  else {
3241  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 1); __PYX_ERR(1, 65, __pyx_L3_error)
3242  }
3243  CYTHON_FALLTHROUGH;
3244  case 2:
3245  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_trial_element)) != 0)) kw_args--;
3246  else {
3247  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 2); __PYX_ERR(1, 65, __pyx_L3_error)
3248  }
3249  CYTHON_FALLTHROUGH;
3250  case 3:
3251  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_test)) != 0)) kw_args--;
3252  else {
3253  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 3); __PYX_ERR(1, 65, __pyx_L3_error)
3254  }
3255  CYTHON_FALLTHROUGH;
3256  case 4:
3257  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_test)) != 0)) kw_args--;
3258  else {
3259  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 4); __PYX_ERR(1, 65, __pyx_L3_error)
3260  }
3261  CYTHON_FALLTHROUGH;
3262  case 5:
3263  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nFreeDOF_trial)) != 0)) kw_args--;
3264  else {
3265  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 5); __PYX_ERR(1, 65, __pyx_L3_error)
3266  }
3267  CYTHON_FALLTHROUGH;
3268  case 6:
3269  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freeGlobal_trial)) != 0)) kw_args--;
3270  else {
3271  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 6); __PYX_ERR(1, 65, __pyx_L3_error)
3272  }
3273  CYTHON_FALLTHROUGH;
3274  case 7:
3275  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_test)) != 0)) kw_args--;
3276  else {
3277  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 7); __PYX_ERR(1, 65, __pyx_L3_error)
3278  }
3279  CYTHON_FALLTHROUGH;
3280  case 8:
3281  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_test)) != 0)) kw_args--;
3282  else {
3283  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 8); __PYX_ERR(1, 65, __pyx_L3_error)
3284  }
3285  CYTHON_FALLTHROUGH;
3286  case 9:
3287  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_trial)) != 0)) kw_args--;
3288  else {
3289  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 9); __PYX_ERR(1, 65, __pyx_L3_error)
3290  }
3291  CYTHON_FALLTHROUGH;
3292  case 10:
3293  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_trial)) != 0)) kw_args--;
3294  else {
3295  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 10); __PYX_ERR(1, 65, __pyx_L3_error)
3296  }
3297  CYTHON_FALLTHROUGH;
3298  case 11:
3299  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasNumericalFlux)) != 0)) kw_args--;
3300  else {
3301  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 11); __PYX_ERR(1, 65, __pyx_L3_error)
3302  }
3303  CYTHON_FALLTHROUGH;
3304  case 12:
3305  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasDiffusionInMixedForm)) != 0)) kw_args--;
3306  else {
3307  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 12); __PYX_ERR(1, 65, __pyx_L3_error)
3308  }
3309  CYTHON_FALLTHROUGH;
3310  case 13:
3311  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needNumericalFluxJacobian)) != 0)) kw_args--;
3312  else {
3313  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 13); __PYX_ERR(1, 65, __pyx_L3_error)
3314  }
3315  CYTHON_FALLTHROUGH;
3316  case 14:
3317  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
3318  else {
3319  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 14); __PYX_ERR(1, 65, __pyx_L3_error)
3320  }
3321  CYTHON_FALLTHROUGH;
3322  case 15:
3323  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
3324  else {
3325  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 15); __PYX_ERR(1, 65, __pyx_L3_error)
3326  }
3327  CYTHON_FALLTHROUGH;
3328  case 16:
3329  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nInteriorElementBoundaries_globa)) != 0)) kw_args--;
3330  else {
3331  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 16); __PYX_ERR(1, 65, __pyx_L3_error)
3332  }
3333  CYTHON_FALLTHROUGH;
3334  case 17:
3335  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_interiorElementBoundariesArray)) != 0)) kw_args--;
3336  else {
3337  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 17); __PYX_ERR(1, 65, __pyx_L3_error)
3338  }
3339  CYTHON_FALLTHROUGH;
3340  case 18:
3341  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3342  else {
3343  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 18); __PYX_ERR(1, 65, __pyx_L3_error)
3344  }
3345  CYTHON_FALLTHROUGH;
3346  case 19:
3347  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3348  else {
3349  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 19); __PYX_ERR(1, 65, __pyx_L3_error)
3350  }
3351  CYTHON_FALLTHROUGH;
3352  case 20:
3353  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasFluxBoundaryConditions)) != 0)) kw_args--;
3354  else {
3355  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 20); __PYX_ERR(1, 65, __pyx_L3_error)
3356  }
3357  CYTHON_FALLTHROUGH;
3358  case 21:
3359  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3360  else {
3361  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 21); __PYX_ERR(1, 65, __pyx_L3_error)
3362  }
3363  CYTHON_FALLTHROUGH;
3364  case 22:
3365  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3366  else {
3367  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 22); __PYX_ERR(1, 65, __pyx_L3_error)
3368  }
3369  CYTHON_FALLTHROUGH;
3370  case 23:
3371  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hasOutflowBoundary)) != 0)) kw_args--;
3372  else {
3373  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 23); __PYX_ERR(1, 65, __pyx_L3_error)
3374  }
3375  CYTHON_FALLTHROUGH;
3376  case 24:
3377  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_needOutflowJacobian)) != 0)) kw_args--;
3378  else {
3379  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 24); __PYX_ERR(1, 65, __pyx_L3_error)
3380  }
3381  CYTHON_FALLTHROUGH;
3382  case 25:
3383  if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rowptr)) != 0)) kw_args--;
3384  else {
3385  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 25); __PYX_ERR(1, 65, __pyx_L3_error)
3386  }
3387  CYTHON_FALLTHROUGH;
3388  case 26:
3389  if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces)) != 0)) kw_args--;
3390  else {
3391  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 26); __PYX_ERR(1, 65, __pyx_L3_error)
3392  }
3393  CYTHON_FALLTHROUGH;
3394  case 27:
3395  if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets)) != 0)) kw_args--;
3396  else {
3397  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 27); __PYX_ERR(1, 65, __pyx_L3_error)
3398  }
3399  CYTHON_FALLTHROUGH;
3400  case 28:
3401  if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eNebN)) != 0)) kw_args--;
3402  else {
3403  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 28); __PYX_ERR(1, 65, __pyx_L3_error)
3404  }
3405  CYTHON_FALLTHROUGH;
3406  case 29:
3407  if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb)) != 0)) kw_args--;
3408  else {
3409  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 29); __PYX_ERR(1, 65, __pyx_L3_error)
3410  }
3411  CYTHON_FALLTHROUGH;
3412  case 30:
3413  if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_eNebN)) != 0)) kw_args--;
3414  else {
3415  __Pyx_RaiseArgtupleInvalid("getOffsets_CSR", 1, 31, 31, 30); __PYX_ERR(1, 65, __pyx_L3_error)
3416  }
3417  }
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)
3420  }
3421  } else if (PyTuple_GET_SIZE(__pyx_args) != 31) {
3422  goto __pyx_L5_argtuple_error;
3423  } else {
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);
3455  }
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]);
3487  }
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)
3491  __pyx_L3_error:;
3492  __Pyx_AddTraceback("csparsity.PySparsityInfo.getOffsets_CSR", __pyx_clineno, __pyx_lineno, __pyx_filename);
3493  __Pyx_RefNannyFinishContext();
3494  return NULL;
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);
3512 
3513  /* function exit code */
3514  goto __pyx_L0;
3515  __pyx_L1_error:;
3516  __pyx_r = NULL;
3517  __pyx_L0:;
3518  __Pyx_RefNannyFinishContext();
3519  return __pyx_r;
3520 }
3521 
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);
3526 
3527  /* "csparsity.pyx":97
3528  * np.ndarray csrColumnOffsets_eb,
3529  * np.ndarray csrColumnOffsets_eb_eNebN):
3530  * self.cpp.getOffsets_CSR(nElements_global, # <<<<<<<<<<<<<<
3531  * nDOF_test_element,
3532  * nDOF_trial_element,
3533  */
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));
3535 
3536  /* "csparsity.pyx":65
3537  * hasOutflowBoundary,
3538  * needOutflowJacobian)
3539  * def getOffsets_CSR(self, # <<<<<<<<<<<<<<
3540  * int nElements_global,
3541  * int nDOF_test_element,
3542  */
3543 
3544  /* function exit code */
3545  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3546  __Pyx_XGIVEREF(__pyx_r);
3547  __Pyx_RefNannyFinishContext();
3548  return __pyx_r;
3549 }
3550 
3551 /* "csparsity.pyx":128
3552  * <int*> csrColumnOffsets_eb.data,
3553  * <int*> csrColumnOffsets_eb_eNebN.data)
3554  * def getCSR(self): # <<<<<<<<<<<<<<
3555  * self.cpp.getCSR()
3556  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr),
3557  */
3558 
3559 /* Python wrapper */
3560 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_9getCSR(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
3566 
3567  /* function exit code */
3568  __Pyx_RefNannyFinishContext();
3569  return __pyx_r;
3570 }
3571 
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;
3578  int *__pyx_t_4;
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;
3583  double *__pyx_t_9;
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);
3589 
3590  /* "csparsity.pyx":129
3591  * <int*> csrColumnOffsets_eb_eNebN.data)
3592  * def getCSR(self):
3593  * self.cpp.getCSR() # <<<<<<<<<<<<<<
3594  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr),
3595  * np.asarray(<int[:self.cpp.nnz]>self.cpp.colind),
3596  */
3597  __pyx_v_self->cpp.getCSR();
3598 
3599  /* "csparsity.pyx":130
3600  * def getCSR(self):
3601  * self.cpp.getCSR()
3602  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr), # <<<<<<<<<<<<<<
3603  * np.asarray(<int[:self.cpp.nnz]>self.cpp.colind),
3604  * self.cpp.nnz,
3605  */
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;
3613  if (!__pyx_t_4) {
3614  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3615  __PYX_ERR(1, 130, __pyx_L1_error)
3616  }
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;
3626  __pyx_t_6 = NULL;
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);
3634  }
3635  }
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;
3642 
3643  /* "csparsity.pyx":131
3644  * self.cpp.getCSR()
3645  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr),
3646  * np.asarray(<int[:self.cpp.nnz]>self.cpp.colind), # <<<<<<<<<<<<<<
3647  * self.cpp.nnz,
3648  * np.asarray(<double[:self.cpp.nnz]>self.cpp.nzval))
3649  */
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;
3656  if (!__pyx_t_4) {
3657  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3658  __PYX_ERR(1, 131, __pyx_L1_error)
3659  }
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;
3669  __pyx_t_7 = NULL;
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);
3677  }
3678  }
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;
3685 
3686  /* "csparsity.pyx":132
3687  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr),
3688  * np.asarray(<int[:self.cpp.nnz]>self.cpp.colind),
3689  * self.cpp.nnz, # <<<<<<<<<<<<<<
3690  * np.asarray(<double[:self.cpp.nnz]>self.cpp.nzval))
3691  */
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);
3694 
3695  /* "csparsity.pyx":133
3696  * np.asarray(<int[:self.cpp.nnz]>self.cpp.colind),
3697  * self.cpp.nnz,
3698  * np.asarray(<double[:self.cpp.nnz]>self.cpp.nzval)) # <<<<<<<<<<<<<<
3699  */
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;
3706  if (!__pyx_t_9) {
3707  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3708  __PYX_ERR(1, 133, __pyx_L1_error)
3709  }
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;
3719  __pyx_t_10 = NULL;
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);
3727  }
3728  }
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;
3735 
3736  /* "csparsity.pyx":130
3737  * def getCSR(self):
3738  * self.cpp.getCSR()
3739  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr), # <<<<<<<<<<<<<<
3740  * np.asarray(<int[:self.cpp.nnz]>self.cpp.colind),
3741  * self.cpp.nnz,
3742  */
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);
3753  __pyx_t_1 = 0;
3754  __pyx_t_3 = 0;
3755  __pyx_t_2 = 0;
3756  __pyx_t_7 = 0;
3757  __pyx_r = __pyx_t_8;
3758  __pyx_t_8 = 0;
3759  goto __pyx_L0;
3760 
3761  /* "csparsity.pyx":128
3762  * <int*> csrColumnOffsets_eb.data,
3763  * <int*> csrColumnOffsets_eb_eNebN.data)
3764  * def getCSR(self): # <<<<<<<<<<<<<<
3765  * self.cpp.getCSR()
3766  * return (np.asarray(<int[:self.cpp.nrows]>self.cpp.rowptr),
3767  */
3768 
3769  /* function exit code */
3770  __pyx_L1_error:;
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);
3780  __pyx_r = NULL;
3781  __pyx_L0:;
3782  __Pyx_XGIVEREF(__pyx_r);
3783  __Pyx_RefNannyFinishContext();
3784  return __pyx_r;
3785 }
3786 
3787 /* "(tree fragment)":1
3788  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
3789  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3790  * def __setstate_cython__(self, __pyx_state):
3791  */
3792 
3793 /* Python wrapper */
3794 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
3800 
3801  /* function exit code */
3802  __Pyx_RefNannyFinishContext();
3803  return __pyx_r;
3804 }
3805 
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);
3814 
3815  /* "(tree fragment)":2
3816  * def __reduce_cython__(self):
3817  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
3818  * def __setstate_cython__(self, __pyx_state):
3819  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3820  */
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)
3826 
3827  /* "(tree fragment)":1
3828  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
3829  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3830  * def __setstate_cython__(self, __pyx_state):
3831  */
3832 
3833  /* function exit code */
3834  __pyx_L1_error:;
3835  __Pyx_XDECREF(__pyx_t_1);
3836  __Pyx_AddTraceback("csparsity.PySparsityInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3837  __pyx_r = NULL;
3838  __Pyx_XGIVEREF(__pyx_r);
3839  __Pyx_RefNannyFinishContext();
3840  return __pyx_r;
3841 }
3842 
3843 /* "(tree fragment)":3
3844  * def __reduce_cython__(self):
3845  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3846  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
3847  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3848  */
3849 
3850 /* Python wrapper */
3851 static PyObject *__pyx_pw_9csparsity_14PySparsityInfo_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
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));
3857 
3858  /* function exit code */
3859  __Pyx_RefNannyFinishContext();
3860  return __pyx_r;
3861 }
3862 
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);
3871 
3872  /* "(tree fragment)":4
3873  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3874  * def __setstate_cython__(self, __pyx_state):
3875  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
3876  */
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)
3882 
3883  /* "(tree fragment)":3
3884  * def __reduce_cython__(self):
3885  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3886  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
3887  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
3888  */
3889 
3890  /* function exit code */
3891  __pyx_L1_error:;
3892  __Pyx_XDECREF(__pyx_t_1);
3893  __Pyx_AddTraceback("csparsity.PySparsityInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3894  __pyx_r = NULL;
3895  __Pyx_XGIVEREF(__pyx_r);
3896  __Pyx_RefNannyFinishContext();
3897  return __pyx_r;
3898 }
3899 
3900 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
3901  * ctypedef npy_cdouble complex_t
3902  *
3903  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
3904  * return PyArray_MultiIterNew(1, <void*>a)
3905  *
3906  */
3907 
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);
3916 
3917  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
3918  *
3919  * cdef inline object PyArray_MultiIterNew1(a):
3920  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
3921  *
3922  * cdef inline object PyArray_MultiIterNew2(a, b):
3923  */
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;
3928  __pyx_t_1 = 0;
3929  goto __pyx_L0;
3930 
3931  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
3932  * ctypedef npy_cdouble complex_t
3933  *
3934  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
3935  * return PyArray_MultiIterNew(1, <void*>a)
3936  *
3937  */
3938 
3939  /* function exit code */
3940  __pyx_L1_error:;
3941  __Pyx_XDECREF(__pyx_t_1);
3942  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
3943  __pyx_r = 0;
3944  __pyx_L0:;
3945  __Pyx_XGIVEREF(__pyx_r);
3946  __Pyx_RefNannyFinishContext();
3947  return __pyx_r;
3948 }
3949 
3950 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
3951  * return PyArray_MultiIterNew(1, <void*>a)
3952  *
3953  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
3954  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
3955  *
3956  */
3957 
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);
3966 
3967  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
3968  *
3969  * cdef inline object PyArray_MultiIterNew2(a, b):
3970  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
3971  *
3972  * cdef inline object PyArray_MultiIterNew3(a, b, c):
3973  */
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;
3978  __pyx_t_1 = 0;
3979  goto __pyx_L0;
3980 
3981  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
3982  * return PyArray_MultiIterNew(1, <void*>a)
3983  *
3984  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
3985  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
3986  *
3987  */
3988 
3989  /* function exit code */
3990  __pyx_L1_error:;
3991  __Pyx_XDECREF(__pyx_t_1);
3992  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
3993  __pyx_r = 0;
3994  __pyx_L0:;
3995  __Pyx_XGIVEREF(__pyx_r);
3996  __Pyx_RefNannyFinishContext();
3997  return __pyx_r;
3998 }
3999 
4000 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
4001  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4002  *
4003  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4004  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4005  *
4006  */
4007 
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);
4016 
4017  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
4018  *
4019  * cdef inline object PyArray_MultiIterNew3(a, b, c):
4020  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
4021  *
4022  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4023  */
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;
4028  __pyx_t_1 = 0;
4029  goto __pyx_L0;
4030 
4031  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
4032  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4033  *
4034  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4035  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4036  *
4037  */
4038 
4039  /* function exit code */
4040  __pyx_L1_error:;
4041  __Pyx_XDECREF(__pyx_t_1);
4042  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4043  __pyx_r = 0;
4044  __pyx_L0:;
4045  __Pyx_XGIVEREF(__pyx_r);
4046  __Pyx_RefNannyFinishContext();
4047  return __pyx_r;
4048 }
4049 
4050 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
4051  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4052  *
4053  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4054  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4055  *
4056  */
4057 
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);
4066 
4067  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
4068  *
4069  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4070  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
4071  *
4072  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4073  */
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;
4078  __pyx_t_1 = 0;
4079  goto __pyx_L0;
4080 
4081  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
4082  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4083  *
4084  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4085  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4086  *
4087  */
4088 
4089  /* function exit code */
4090  __pyx_L1_error:;
4091  __Pyx_XDECREF(__pyx_t_1);
4092  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4093  __pyx_r = 0;
4094  __pyx_L0:;
4095  __Pyx_XGIVEREF(__pyx_r);
4096  __Pyx_RefNannyFinishContext();
4097  return __pyx_r;
4098 }
4099 
4100 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
4101  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4102  *
4103  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4104  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4105  *
4106  */
4107 
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);
4116 
4117  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
4118  *
4119  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4120  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
4121  *
4122  * cdef inline tuple PyDataType_SHAPE(dtype d):
4123  */
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;
4128  __pyx_t_1 = 0;
4129  goto __pyx_L0;
4130 
4131  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
4132  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4133  *
4134  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4135  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4136  *
4137  */
4138 
4139  /* function exit code */
4140  __pyx_L1_error:;
4141  __Pyx_XDECREF(__pyx_t_1);
4142  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4143  __pyx_r = 0;
4144  __pyx_L0:;
4145  __Pyx_XGIVEREF(__pyx_r);
4146  __Pyx_RefNannyFinishContext();
4147  return __pyx_r;
4148 }
4149 
4150 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
4151  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4152  *
4153  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4154  * if PyDataType_HASSUBARRAY(d):
4155  * return <tuple>d.subarray.shape
4156  */
4157 
4158 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4159  PyObject *__pyx_r = NULL;
4160  __Pyx_RefNannyDeclarations
4161  int __pyx_t_1;
4162  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
4163 
4164  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
4165  *
4166  * cdef inline tuple PyDataType_SHAPE(dtype d):
4167  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4168  * return <tuple>d.subarray.shape
4169  * else:
4170  */
4171  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
4172  if (__pyx_t_1) {
4173 
4174  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
4175  * cdef inline tuple PyDataType_SHAPE(dtype d):
4176  * if PyDataType_HASSUBARRAY(d):
4177  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
4178  * else:
4179  * return ()
4180  */
4181  __Pyx_XDECREF(__pyx_r);
4182  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
4183  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
4184  goto __pyx_L0;
4185 
4186  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
4187  *
4188  * cdef inline tuple PyDataType_SHAPE(dtype d):
4189  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4190  * return <tuple>d.subarray.shape
4191  * else:
4192  */
4193  }
4194 
4195  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
4196  * return <tuple>d.subarray.shape
4197  * else:
4198  * return () # <<<<<<<<<<<<<<
4199  *
4200  *
4201  */
4202  /*else*/ {
4203  __Pyx_XDECREF(__pyx_r);
4204  __Pyx_INCREF(__pyx_empty_tuple);
4205  __pyx_r = __pyx_empty_tuple;
4206  goto __pyx_L0;
4207  }
4208 
4209  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
4210  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4211  *
4212  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4213  * if PyDataType_HASSUBARRAY(d):
4214  * return <tuple>d.subarray.shape
4215  */
4216 
4217  /* function exit code */
4218  __pyx_L0:;
4219  __Pyx_XGIVEREF(__pyx_r);
4220  __Pyx_RefNannyFinishContext();
4221  return __pyx_r;
4222 }
4223 
4224 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
4225  * int _import_umath() except -1
4226  *
4227  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
4228  * Py_INCREF(base) # important to do this before stealing the reference below!
4229  * PyArray_SetBaseObject(arr, base)
4230  */
4231 
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);
4235 
4236  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
4237  *
4238  * cdef inline void set_array_base(ndarray arr, object base):
4239  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
4240  * PyArray_SetBaseObject(arr, base)
4241  *
4242  */
4243  Py_INCREF(__pyx_v_base);
4244 
4245  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
4246  * cdef inline void set_array_base(ndarray arr, object base):
4247  * Py_INCREF(base) # important to do this before stealing the reference below!
4248  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
4249  *
4250  * cdef inline object get_array_base(ndarray arr):
4251  */
4252  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
4253 
4254  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
4255  * int _import_umath() except -1
4256  *
4257  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
4258  * Py_INCREF(base) # important to do this before stealing the reference below!
4259  * PyArray_SetBaseObject(arr, base)
4260  */
4261 
4262  /* function exit code */
4263  __Pyx_RefNannyFinishContext();
4264 }
4265 
4266 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
4267  * PyArray_SetBaseObject(arr, base)
4268  *
4269  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
4270  * base = PyArray_BASE(arr)
4271  * if base is NULL:
4272  */
4273 
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
4278  int __pyx_t_1;
4279  __Pyx_RefNannySetupContext("get_array_base", 0);
4280 
4281  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
4282  *
4283  * cdef inline object get_array_base(ndarray arr):
4284  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
4285  * if base is NULL:
4286  * return None
4287  */
4288  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
4289 
4290  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
4291  * cdef inline object get_array_base(ndarray arr):
4292  * base = PyArray_BASE(arr)
4293  * if base is NULL: # <<<<<<<<<<<<<<
4294  * return None
4295  * return <object>base
4296  */
4297  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
4298  if (__pyx_t_1) {
4299 
4300  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
4301  * base = PyArray_BASE(arr)
4302  * if base is NULL:
4303  * return None # <<<<<<<<<<<<<<
4304  * return <object>base
4305  *
4306  */
4307  __Pyx_XDECREF(__pyx_r);
4308  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4309  goto __pyx_L0;
4310 
4311  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
4312  * cdef inline object get_array_base(ndarray arr):
4313  * base = PyArray_BASE(arr)
4314  * if base is NULL: # <<<<<<<<<<<<<<
4315  * return None
4316  * return <object>base
4317  */
4318  }
4319 
4320  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
4321  * if base is NULL:
4322  * return None
4323  * return <object>base # <<<<<<<<<<<<<<
4324  *
4325  * # Versions of the import_* functions which are more suitable for
4326  */
4327  __Pyx_XDECREF(__pyx_r);
4328  __Pyx_INCREF(((PyObject *)__pyx_v_base));
4329  __pyx_r = ((PyObject *)__pyx_v_base);
4330  goto __pyx_L0;
4331 
4332  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
4333  * PyArray_SetBaseObject(arr, base)
4334  *
4335  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
4336  * base = PyArray_BASE(arr)
4337  * if base is NULL:
4338  */
4339 
4340  /* function exit code */
4341  __pyx_L0:;
4342  __Pyx_XGIVEREF(__pyx_r);
4343  __Pyx_RefNannyFinishContext();
4344  return __pyx_r;
4345 }
4346 
4347 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
4348  * # Versions of the import_* functions which are more suitable for
4349  * # Cython code.
4350  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
4351  * try:
4352  * __pyx_import_array()
4353  */
4354 
4355 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
4356  int __pyx_r;
4357  __Pyx_RefNannyDeclarations
4358  PyObject *__pyx_t_1 = NULL;
4359  PyObject *__pyx_t_2 = NULL;
4360  PyObject *__pyx_t_3 = NULL;
4361  int __pyx_t_4;
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);
4370 
4371  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
4372  * # Cython code.
4373  * cdef inline int import_array() except -1:
4374  * try: # <<<<<<<<<<<<<<
4375  * __pyx_import_array()
4376  * except Exception:
4377  */
4378  {
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);
4385  /*try:*/ {
4386 
4387  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
4388  * cdef inline int import_array() except -1:
4389  * try:
4390  * __pyx_import_array() # <<<<<<<<<<<<<<
4391  * except Exception:
4392  * raise ImportError("numpy.core.multiarray failed to import")
4393  */
4394  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)
4395 
4396  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
4397  * # Cython code.
4398  * cdef inline int import_array() except -1:
4399  * try: # <<<<<<<<<<<<<<
4400  * __pyx_import_array()
4401  * except Exception:
4402  */
4403  }
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;
4408  __pyx_L3_error:;
4409 
4410  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
4411  * try:
4412  * __pyx_import_array()
4413  * except Exception: # <<<<<<<<<<<<<<
4414  * raise ImportError("numpy.core.multiarray failed to import")
4415  *
4416  */
4417  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4418  if (__pyx_t_4) {
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);
4424 
4425  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
4426  * __pyx_import_array()
4427  * except Exception:
4428  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
4429  *
4430  * cdef inline int import_umath() except -1:
4431  */
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)
4437  }
4438  goto __pyx_L5_except_error;
4439  __pyx_L5_except_error:;
4440 
4441  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
4442  * # Cython code.
4443  * cdef inline int import_array() except -1:
4444  * try: # <<<<<<<<<<<<<<
4445  * __pyx_import_array()
4446  * except Exception:
4447  */
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;
4453  __pyx_L8_try_end:;
4454  }
4455 
4456  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
4457  * # Versions of the import_* functions which are more suitable for
4458  * # Cython code.
4459  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
4460  * try:
4461  * __pyx_import_array()
4462  */
4463 
4464  /* function exit code */
4465  __pyx_r = 0;
4466  goto __pyx_L0;
4467  __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);
4473  __pyx_r = -1;
4474  __pyx_L0:;
4475  __Pyx_RefNannyFinishContext();
4476  return __pyx_r;
4477 }
4478 
4479 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
4480  * raise ImportError("numpy.core.multiarray failed to import")
4481  *
4482  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
4483  * try:
4484  * _import_umath()
4485  */
4486 
4487 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
4488  int __pyx_r;
4489  __Pyx_RefNannyDeclarations
4490  PyObject *__pyx_t_1 = NULL;
4491  PyObject *__pyx_t_2 = NULL;
4492  PyObject *__pyx_t_3 = NULL;
4493  int __pyx_t_4;
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);
4502 
4503  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
4504  *
4505  * cdef inline int import_umath() except -1:
4506  * try: # <<<<<<<<<<<<<<
4507  * _import_umath()
4508  * except Exception:
4509  */
4510  {
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);
4517  /*try:*/ {
4518 
4519  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
4520  * cdef inline int import_umath() except -1:
4521  * try:
4522  * _import_umath() # <<<<<<<<<<<<<<
4523  * except Exception:
4524  * raise ImportError("numpy.core.umath failed to import")
4525  */
4526  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)
4527 
4528  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
4529  *
4530  * cdef inline int import_umath() except -1:
4531  * try: # <<<<<<<<<<<<<<
4532  * _import_umath()
4533  * except Exception:
4534  */
4535  }
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;
4540  __pyx_L3_error:;
4541 
4542  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
4543  * try:
4544  * _import_umath()
4545  * except Exception: # <<<<<<<<<<<<<<
4546  * raise ImportError("numpy.core.umath failed to import")
4547  *
4548  */
4549  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4550  if (__pyx_t_4) {
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);
4556 
4557  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
4558  * _import_umath()
4559  * except Exception:
4560  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
4561  *
4562  * cdef inline int import_ufunc() except -1:
4563  */
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)
4569  }
4570  goto __pyx_L5_except_error;
4571  __pyx_L5_except_error:;
4572 
4573  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
4574  *
4575  * cdef inline int import_umath() except -1:
4576  * try: # <<<<<<<<<<<<<<
4577  * _import_umath()
4578  * except Exception:
4579  */
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;
4585  __pyx_L8_try_end:;
4586  }
4587 
4588  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
4589  * raise ImportError("numpy.core.multiarray failed to import")
4590  *
4591  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
4592  * try:
4593  * _import_umath()
4594  */
4595 
4596  /* function exit code */
4597  __pyx_r = 0;
4598  goto __pyx_L0;
4599  __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);
4605  __pyx_r = -1;
4606  __pyx_L0:;
4607  __Pyx_RefNannyFinishContext();
4608  return __pyx_r;
4609 }
4610 
4611 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
4612  * raise ImportError("numpy.core.umath failed to import")
4613  *
4614  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
4615  * try:
4616  * _import_umath()
4617  */
4618 
4619 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
4620  int __pyx_r;
4621  __Pyx_RefNannyDeclarations
4622  PyObject *__pyx_t_1 = NULL;
4623  PyObject *__pyx_t_2 = NULL;
4624  PyObject *__pyx_t_3 = NULL;
4625  int __pyx_t_4;
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);
4634 
4635  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
4636  *
4637  * cdef inline int import_ufunc() except -1:
4638  * try: # <<<<<<<<<<<<<<
4639  * _import_umath()
4640  * except Exception:
4641  */
4642  {
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);
4649  /*try:*/ {
4650 
4651  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
4652  * cdef inline int import_ufunc() except -1:
4653  * try:
4654  * _import_umath() # <<<<<<<<<<<<<<
4655  * except Exception:
4656  * raise ImportError("numpy.core.umath failed to import")
4657  */
4658  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)
4659 
4660  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
4661  *
4662  * cdef inline int import_ufunc() except -1:
4663  * try: # <<<<<<<<<<<<<<
4664  * _import_umath()
4665  * except Exception:
4666  */
4667  }
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;
4672  __pyx_L3_error:;
4673 
4674  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
4675  * try:
4676  * _import_umath()
4677  * except Exception: # <<<<<<<<<<<<<<
4678  * raise ImportError("numpy.core.umath failed to import")
4679  *
4680  */
4681  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4682  if (__pyx_t_4) {
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);
4688 
4689  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
4690  * _import_umath()
4691  * except Exception:
4692  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
4693  *
4694  * cdef extern from *:
4695  */
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)
4701  }
4702  goto __pyx_L5_except_error;
4703  __pyx_L5_except_error:;
4704 
4705  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
4706  *
4707  * cdef inline int import_ufunc() except -1:
4708  * try: # <<<<<<<<<<<<<<
4709  * _import_umath()
4710  * except Exception:
4711  */
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;
4717  __pyx_L8_try_end:;
4718  }
4719 
4720  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
4721  * raise ImportError("numpy.core.umath failed to import")
4722  *
4723  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
4724  * try:
4725  * _import_umath()
4726  */
4727 
4728  /* function exit code */
4729  __pyx_r = 0;
4730  goto __pyx_L0;
4731  __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);
4737  __pyx_r = -1;
4738  __pyx_L0:;
4739  __Pyx_RefNannyFinishContext();
4740  return __pyx_r;
4741 }
4742 
4743 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
4744  *
4745  *
4746  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
4747  * """
4748  * Cython equivalent of `isinstance(obj, np.timedelta64)`
4749  */
4750 
4751 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
4752  int __pyx_r;
4753  __Pyx_RefNannyDeclarations
4754  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
4755 
4756  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
4757  * bool
4758  * """
4759  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
4760  *
4761  *
4762  */
4763  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
4764  goto __pyx_L0;
4765 
4766  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
4767  *
4768  *
4769  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
4770  * """
4771  * Cython equivalent of `isinstance(obj, np.timedelta64)`
4772  */
4773 
4774  /* function exit code */
4775  __pyx_L0:;
4776  __Pyx_RefNannyFinishContext();
4777  return __pyx_r;
4778 }
4779 
4780 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
4781  *
4782  *
4783  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
4784  * """
4785  * Cython equivalent of `isinstance(obj, np.datetime64)`
4786  */
4787 
4788 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
4789  int __pyx_r;
4790  __Pyx_RefNannyDeclarations
4791  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
4792 
4793  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
4794  * bool
4795  * """
4796  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
4797  *
4798  *
4799  */
4800  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
4801  goto __pyx_L0;
4802 
4803  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
4804  *
4805  *
4806  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
4807  * """
4808  * Cython equivalent of `isinstance(obj, np.datetime64)`
4809  */
4810 
4811  /* function exit code */
4812  __pyx_L0:;
4813  __Pyx_RefNannyFinishContext();
4814  return __pyx_r;
4815 }
4816 
4817 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
4818  *
4819  *
4820  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
4821  * """
4822  * returns the int64 value underlying scalar numpy datetime64 object
4823  */
4824 
4825 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
4826  npy_datetime __pyx_r;
4827 
4828  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
4829  * also needed. That can be found using `get_datetime64_unit`.
4830  * """
4831  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
4832  *
4833  *
4834  */
4835  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
4836  goto __pyx_L0;
4837 
4838  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
4839  *
4840  *
4841  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
4842  * """
4843  * returns the int64 value underlying scalar numpy datetime64 object
4844  */
4845 
4846  /* function exit code */
4847  __pyx_L0:;
4848  return __pyx_r;
4849 }
4850 
4851 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
4852  *
4853  *
4854  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
4855  * """
4856  * returns the int64 value underlying scalar numpy timedelta64 object
4857  */
4858 
4859 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
4860  npy_timedelta __pyx_r;
4861 
4862  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
4863  * returns the int64 value underlying scalar numpy timedelta64 object
4864  * """
4865  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
4866  *
4867  *
4868  */
4869  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
4870  goto __pyx_L0;
4871 
4872  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
4873  *
4874  *
4875  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
4876  * """
4877  * returns the int64 value underlying scalar numpy timedelta64 object
4878  */
4879 
4880  /* function exit code */
4881  __pyx_L0:;
4882  return __pyx_r;
4883 }
4884 
4885 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
4886  *
4887  *
4888  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
4889  * """
4890  * returns the unit part of the dtype for a numpy datetime64 object.
4891  */
4892 
4893 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
4894  NPY_DATETIMEUNIT __pyx_r;
4895 
4896  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
4897  * returns the unit part of the dtype for a numpy datetime64 object.
4898  * """
4899  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
4900  */
4901  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
4902  goto __pyx_L0;
4903 
4904  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
4905  *
4906  *
4907  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
4908  * """
4909  * returns the unit part of the dtype for a numpy datetime64 object.
4910  */
4911 
4912  /* function exit code */
4913  __pyx_L0:;
4914  return __pyx_r;
4915 }
4916 
4917 /* "View.MemoryView":122
4918  * cdef bint dtype_is_object
4919  *
4920  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
4921  * mode="c", bint allocate_buffer=True):
4922  *
4923  */
4924 
4925 /* Python wrapper */
4926 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
4936  int __pyx_r;
4937  __Pyx_RefNannyDeclarations
4938  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
4939  {
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)) {
4944  Py_ssize_t kw_args;
4945  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4946  switch (pos_args) {
4947  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4948  CYTHON_FALLTHROUGH;
4949  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4950  CYTHON_FALLTHROUGH;
4951  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4952  CYTHON_FALLTHROUGH;
4953  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4954  CYTHON_FALLTHROUGH;
4955  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4956  CYTHON_FALLTHROUGH;
4957  case 0: break;
4958  default: goto __pyx_L5_argtuple_error;
4959  }
4960  kw_args = PyDict_Size(__pyx_kwds);
4961  switch (pos_args) {
4962  case 0:
4963  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
4964  else goto __pyx_L5_argtuple_error;
4965  CYTHON_FALLTHROUGH;
4966  case 1:
4967  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
4968  else {
4969  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
4970  }
4971  CYTHON_FALLTHROUGH;
4972  case 2:
4973  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
4974  else {
4975  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
4976  }
4977  CYTHON_FALLTHROUGH;
4978  case 3:
4979  if (kw_args > 0) {
4980  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
4981  if (value) { values[3] = value; kw_args--; }
4982  }
4983  CYTHON_FALLTHROUGH;
4984  case 4:
4985  if (kw_args > 0) {
4986  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
4987  if (value) { values[4] = value; kw_args--; }
4988  }
4989  }
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)
4992  }
4993  } else {
4994  switch (PyTuple_GET_SIZE(__pyx_args)) {
4995  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4996  CYTHON_FALLTHROUGH;
4997  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4998  CYTHON_FALLTHROUGH;
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);
5002  break;
5003  default: goto __pyx_L5_argtuple_error;
5004  }
5005  }
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];
5010  if (values[4]) {
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)
5012  } else {
5013 
5014  /* "View.MemoryView":123
5015  *
5016  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
5017  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
5018  *
5019  * cdef int idx
5020  */
5021  __pyx_v_allocate_buffer = ((int)1);
5022  }
5023  }
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)
5027  __pyx_L3_error:;
5028  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5029  __Pyx_RefNannyFinishContext();
5030  return -1;
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)
5035  }
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);
5037 
5038  /* "View.MemoryView":122
5039  * cdef bint dtype_is_object
5040  *
5041  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5042  * mode="c", bint allocate_buffer=True):
5043  *
5044  */
5045 
5046  /* function exit code */
5047  goto __pyx_L0;
5048  __pyx_L1_error:;
5049  __pyx_r = -1;
5050  __pyx_L0:;
5051  __Pyx_RefNannyFinishContext();
5052  return __pyx_r;
5053 }
5054 
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) {
5056  int __pyx_v_idx;
5057  Py_ssize_t __pyx_v_i;
5058  Py_ssize_t __pyx_v_dim;
5059  PyObject **__pyx_v_p;
5060  char __pyx_v_order;
5061  int __pyx_r;
5062  __Pyx_RefNannyDeclarations
5063  Py_ssize_t __pyx_t_1;
5064  int __pyx_t_2;
5065  PyObject *__pyx_t_3 = NULL;
5066  int __pyx_t_4;
5067  PyObject *__pyx_t_5 = NULL;
5068  PyObject *__pyx_t_6 = NULL;
5069  char *__pyx_t_7;
5070  int __pyx_t_8;
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);
5079 
5080  /* "View.MemoryView":129
5081  * cdef PyObject **p
5082  *
5083  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
5084  * self.itemsize = itemsize
5085  *
5086  */
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)
5090  }
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);
5093 
5094  /* "View.MemoryView":130
5095  *
5096  * self.ndim = <int> len(shape)
5097  * self.itemsize = itemsize # <<<<<<<<<<<<<<
5098  *
5099  * if not self.ndim:
5100  */
5101  __pyx_v_self->itemsize = __pyx_v_itemsize;
5102 
5103  /* "View.MemoryView":132
5104  * self.itemsize = itemsize
5105  *
5106  * if not self.ndim: # <<<<<<<<<<<<<<
5107  * raise ValueError("Empty shape tuple for cython.array")
5108  *
5109  */
5110  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
5111  if (unlikely(__pyx_t_2)) {
5112 
5113  /* "View.MemoryView":133
5114  *
5115  * if not self.ndim:
5116  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
5117  *
5118  * if itemsize <= 0:
5119  */
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)
5125 
5126  /* "View.MemoryView":132
5127  * self.itemsize = itemsize
5128  *
5129  * if not self.ndim: # <<<<<<<<<<<<<<
5130  * raise ValueError("Empty shape tuple for cython.array")
5131  *
5132  */
5133  }
5134 
5135  /* "View.MemoryView":135
5136  * raise ValueError("Empty shape tuple for cython.array")
5137  *
5138  * if itemsize <= 0: # <<<<<<<<<<<<<<
5139  * raise ValueError("itemsize <= 0 for cython.array")
5140  *
5141  */
5142  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
5143  if (unlikely(__pyx_t_2)) {
5144 
5145  /* "View.MemoryView":136
5146  *
5147  * if itemsize <= 0:
5148  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
5149  *
5150  * if not isinstance(format, bytes):
5151  */
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)
5157 
5158  /* "View.MemoryView":135
5159  * raise ValueError("Empty shape tuple for cython.array")
5160  *
5161  * if itemsize <= 0: # <<<<<<<<<<<<<<
5162  * raise ValueError("itemsize <= 0 for cython.array")
5163  *
5164  */
5165  }
5166 
5167  /* "View.MemoryView":138
5168  * raise ValueError("itemsize <= 0 for cython.array")
5169  *
5170  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5171  * format = format.encode('ASCII')
5172  * self._format = format # keep a reference to the byte string
5173  */
5174  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
5175  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
5176  if (__pyx_t_4) {
5177 
5178  /* "View.MemoryView":139
5179  *
5180  * if not isinstance(format, bytes):
5181  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
5182  * self._format = format # keep a reference to the byte string
5183  * self.format = self._format
5184  */
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);
5187  __pyx_t_6 = NULL;
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);
5195  }
5196  }
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);
5203  __pyx_t_3 = 0;
5204 
5205  /* "View.MemoryView":138
5206  * raise ValueError("itemsize <= 0 for cython.array")
5207  *
5208  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5209  * format = format.encode('ASCII')
5210  * self._format = format # keep a reference to the byte string
5211  */
5212  }
5213 
5214  /* "View.MemoryView":140
5215  * if not isinstance(format, bytes):
5216  * format = format.encode('ASCII')
5217  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
5218  * self.format = self._format
5219  *
5220  */
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);
5228  __pyx_t_3 = 0;
5229 
5230  /* "View.MemoryView":141
5231  * format = format.encode('ASCII')
5232  * self._format = format # keep a reference to the byte string
5233  * self.format = self._format # <<<<<<<<<<<<<<
5234  *
5235  *
5236  */
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)
5240  }
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;
5243 
5244  /* "View.MemoryView":144
5245  *
5246  *
5247  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
5248  * self._strides = self._shape + self.ndim
5249  *
5250  */
5251  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
5252 
5253  /* "View.MemoryView":145
5254  *
5255  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
5256  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
5257  *
5258  * if not self._shape:
5259  */
5260  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
5261 
5262  /* "View.MemoryView":147
5263  * self._strides = self._shape + self.ndim
5264  *
5265  * if not self._shape: # <<<<<<<<<<<<<<
5266  * raise MemoryError("unable to allocate shape and strides.")
5267  *
5268  */
5269  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
5270  if (unlikely(__pyx_t_4)) {
5271 
5272  /* "View.MemoryView":148
5273  *
5274  * if not self._shape:
5275  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
5276  *
5277  *
5278  */
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)
5284 
5285  /* "View.MemoryView":147
5286  * self._strides = self._shape + self.ndim
5287  *
5288  * if not self._shape: # <<<<<<<<<<<<<<
5289  * raise MemoryError("unable to allocate shape and strides.")
5290  *
5291  */
5292  }
5293 
5294  /* "View.MemoryView":151
5295  *
5296  *
5297  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
5298  * if dim <= 0:
5299  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
5300  */
5301  __pyx_t_8 = 0;
5302  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
5303  for (;;) {
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)
5307  #else
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);
5310  #endif
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);
5316 
5317  /* "View.MemoryView":152
5318  *
5319  * for idx, dim in enumerate(shape):
5320  * if dim <= 0: # <<<<<<<<<<<<<<
5321  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
5322  * self._shape[idx] = dim
5323  */
5324  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
5325  if (unlikely(__pyx_t_4)) {
5326 
5327  /* "View.MemoryView":153
5328  * for idx, dim in enumerate(shape):
5329  * if dim <= 0:
5330  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
5331  * self._shape[idx] = dim
5332  *
5333  */
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);
5344  __pyx_t_5 = 0;
5345  __pyx_t_6 = 0;
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)
5355 
5356  /* "View.MemoryView":152
5357  *
5358  * for idx, dim in enumerate(shape):
5359  * if dim <= 0: # <<<<<<<<<<<<<<
5360  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
5361  * self._shape[idx] = dim
5362  */
5363  }
5364 
5365  /* "View.MemoryView":154
5366  * if dim <= 0:
5367  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
5368  * self._shape[idx] = dim # <<<<<<<<<<<<<<
5369  *
5370  * cdef char order
5371  */
5372  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
5373 
5374  /* "View.MemoryView":151
5375  *
5376  *
5377  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
5378  * if dim <= 0:
5379  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
5380  */
5381  }
5382  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5383 
5384  /* "View.MemoryView":157
5385  *
5386  * cdef char order
5387  * if mode == 'fortran': # <<<<<<<<<<<<<<
5388  * order = b'F'
5389  * self.mode = u'fortran'
5390  */
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)
5392  if (__pyx_t_4) {
5393 
5394  /* "View.MemoryView":158
5395  * cdef char order
5396  * if mode == 'fortran':
5397  * order = b'F' # <<<<<<<<<<<<<<
5398  * self.mode = u'fortran'
5399  * elif mode == 'c':
5400  */
5401  __pyx_v_order = 'F';
5402 
5403  /* "View.MemoryView":159
5404  * if mode == 'fortran':
5405  * order = b'F'
5406  * self.mode = u'fortran' # <<<<<<<<<<<<<<
5407  * elif mode == 'c':
5408  * order = b'C'
5409  */
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;
5415 
5416  /* "View.MemoryView":157
5417  *
5418  * cdef char order
5419  * if mode == 'fortran': # <<<<<<<<<<<<<<
5420  * order = b'F'
5421  * self.mode = u'fortran'
5422  */
5423  goto __pyx_L10;
5424  }
5425 
5426  /* "View.MemoryView":160
5427  * order = b'F'
5428  * self.mode = u'fortran'
5429  * elif mode == 'c': # <<<<<<<<<<<<<<
5430  * order = b'C'
5431  * self.mode = u'c'
5432  */
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)) {
5435 
5436  /* "View.MemoryView":161
5437  * self.mode = u'fortran'
5438  * elif mode == 'c':
5439  * order = b'C' # <<<<<<<<<<<<<<
5440  * self.mode = u'c'
5441  * else:
5442  */
5443  __pyx_v_order = 'C';
5444 
5445  /* "View.MemoryView":162
5446  * elif mode == 'c':
5447  * order = b'C'
5448  * self.mode = u'c' # <<<<<<<<<<<<<<
5449  * else:
5450  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
5451  */
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;
5457 
5458  /* "View.MemoryView":160
5459  * order = b'F'
5460  * self.mode = u'fortran'
5461  * elif mode == 'c': # <<<<<<<<<<<<<<
5462  * order = b'C'
5463  * self.mode = u'c'
5464  */
5465  goto __pyx_L10;
5466  }
5467 
5468  /* "View.MemoryView":164
5469  * self.mode = u'c'
5470  * else:
5471  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
5472  *
5473  * self.len = fill_contig_strides_array(self._shape, self._strides,
5474  */
5475  /*else*/ {
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)
5484  }
5485  __pyx_L10:;
5486 
5487  /* "View.MemoryView":166
5488  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
5489  *
5490  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
5491  * itemsize, self.ndim, order)
5492  *
5493  */
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);
5495 
5496  /* "View.MemoryView":169
5497  * itemsize, self.ndim, order)
5498  *
5499  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
5500  * self.dtype_is_object = format == b'O'
5501  * if allocate_buffer:
5502  */
5503  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
5504 
5505  /* "View.MemoryView":170
5506  *
5507  * self.free_data = allocate_buffer
5508  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
5509  * if allocate_buffer:
5510  *
5511  */
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;
5516 
5517  /* "View.MemoryView":171
5518  * self.free_data = allocate_buffer
5519  * self.dtype_is_object = format == b'O'
5520  * if allocate_buffer: # <<<<<<<<<<<<<<
5521  *
5522  *
5523  */
5524  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
5525  if (__pyx_t_4) {
5526 
5527  /* "View.MemoryView":174
5528  *
5529  *
5530  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
5531  * if not self.data:
5532  * raise MemoryError("unable to allocate array data.")
5533  */
5534  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
5535 
5536  /* "View.MemoryView":175
5537  *
5538  * self.data = <char *>malloc(self.len)
5539  * if not self.data: # <<<<<<<<<<<<<<
5540  * raise MemoryError("unable to allocate array data.")
5541  *
5542  */
5543  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
5544  if (unlikely(__pyx_t_4)) {
5545 
5546  /* "View.MemoryView":176
5547  * self.data = <char *>malloc(self.len)
5548  * if not self.data:
5549  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
5550  *
5551  * if self.dtype_is_object:
5552  */
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)
5558 
5559  /* "View.MemoryView":175
5560  *
5561  * self.data = <char *>malloc(self.len)
5562  * if not self.data: # <<<<<<<<<<<<<<
5563  * raise MemoryError("unable to allocate array data.")
5564  *
5565  */
5566  }
5567 
5568  /* "View.MemoryView":178
5569  * raise MemoryError("unable to allocate array data.")
5570  *
5571  * if self.dtype_is_object: # <<<<<<<<<<<<<<
5572  * p = <PyObject **> self.data
5573  * for i in range(self.len / itemsize):
5574  */
5575  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
5576  if (__pyx_t_4) {
5577 
5578  /* "View.MemoryView":179
5579  *
5580  * if self.dtype_is_object:
5581  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
5582  * for i in range(self.len / itemsize):
5583  * p[i] = Py_None
5584  */
5585  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
5586 
5587  /* "View.MemoryView":180
5588  * if self.dtype_is_object:
5589  * p = <PyObject **> self.data
5590  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
5591  * p[i] = Py_None
5592  * Py_INCREF(Py_None)
5593  */
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)
5597  }
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)
5601  }
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;
5606 
5607  /* "View.MemoryView":181
5608  * p = <PyObject **> self.data
5609  * for i in range(self.len / itemsize):
5610  * p[i] = Py_None # <<<<<<<<<<<<<<
5611  * Py_INCREF(Py_None)
5612  *
5613  */
5614  (__pyx_v_p[__pyx_v_i]) = Py_None;
5615 
5616  /* "View.MemoryView":182
5617  * for i in range(self.len / itemsize):
5618  * p[i] = Py_None
5619  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
5620  *
5621  * @cname('getbuffer')
5622  */
5623  Py_INCREF(Py_None);
5624  }
5625 
5626  /* "View.MemoryView":178
5627  * raise MemoryError("unable to allocate array data.")
5628  *
5629  * if self.dtype_is_object: # <<<<<<<<<<<<<<
5630  * p = <PyObject **> self.data
5631  * for i in range(self.len / itemsize):
5632  */
5633  }
5634 
5635  /* "View.MemoryView":171
5636  * self.free_data = allocate_buffer
5637  * self.dtype_is_object = format == b'O'
5638  * if allocate_buffer: # <<<<<<<<<<<<<<
5639  *
5640  *
5641  */
5642  }
5643 
5644  /* "View.MemoryView":122
5645  * cdef bint dtype_is_object
5646  *
5647  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5648  * mode="c", bint allocate_buffer=True):
5649  *
5650  */
5651 
5652  /* function exit code */
5653  __pyx_r = 0;
5654  goto __pyx_L0;
5655  __pyx_L1_error:;
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);
5661  __pyx_r = -1;
5662  __pyx_L0:;
5663  __Pyx_XDECREF(__pyx_v_format);
5664  __Pyx_RefNannyFinishContext();
5665  return __pyx_r;
5666 }
5667 
5668 /* "View.MemoryView":185
5669  *
5670  * @cname('getbuffer')
5671  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
5672  * cdef int bufmode = -1
5673  * if self.mode == u"c":
5674  */
5675 
5676 /* Python wrapper */
5677 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
5678 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
5679  int __pyx_r;
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));
5683 
5684  /* function exit code */
5685  __Pyx_RefNannyFinishContext();
5686  return __pyx_r;
5687 }
5688 
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;
5691  int __pyx_r;
5692  __Pyx_RefNannyDeclarations
5693  int __pyx_t_1;
5694  int __pyx_t_2;
5695  PyObject *__pyx_t_3 = NULL;
5696  char *__pyx_t_4;
5697  Py_ssize_t __pyx_t_5;
5698  int __pyx_t_6;
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");
5705  return -1;
5706  }
5707  __Pyx_RefNannySetupContext("__getbuffer__", 0);
5708  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
5709  __Pyx_GIVEREF(__pyx_v_info->obj);
5710 
5711  /* "View.MemoryView":186
5712  * @cname('getbuffer')
5713  * def __getbuffer__(self, Py_buffer *info, int flags):
5714  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
5715  * if self.mode == u"c":
5716  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5717  */
5718  __pyx_v_bufmode = -1;
5719 
5720  /* "View.MemoryView":187
5721  * def __getbuffer__(self, Py_buffer *info, int flags):
5722  * cdef int bufmode = -1
5723  * if self.mode == u"c": # <<<<<<<<<<<<<<
5724  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5725  * elif self.mode == u"fortran":
5726  */
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);
5729  if (__pyx_t_2) {
5730 
5731  /* "View.MemoryView":188
5732  * cdef int bufmode = -1
5733  * if self.mode == u"c":
5734  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
5735  * elif self.mode == u"fortran":
5736  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5737  */
5738  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5739 
5740  /* "View.MemoryView":187
5741  * def __getbuffer__(self, Py_buffer *info, int flags):
5742  * cdef int bufmode = -1
5743  * if self.mode == u"c": # <<<<<<<<<<<<<<
5744  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5745  * elif self.mode == u"fortran":
5746  */
5747  goto __pyx_L3;
5748  }
5749 
5750  /* "View.MemoryView":189
5751  * if self.mode == u"c":
5752  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5753  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
5754  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5755  * if not (flags & bufmode):
5756  */
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);
5759  if (__pyx_t_1) {
5760 
5761  /* "View.MemoryView":190
5762  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5763  * elif self.mode == u"fortran":
5764  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
5765  * if not (flags & bufmode):
5766  * raise ValueError("Can only create a buffer that is contiguous in memory.")
5767  */
5768  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5769 
5770  /* "View.MemoryView":189
5771  * if self.mode == u"c":
5772  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5773  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
5774  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5775  * if not (flags & bufmode):
5776  */
5777  }
5778  __pyx_L3:;
5779 
5780  /* "View.MemoryView":191
5781  * elif self.mode == u"fortran":
5782  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5783  * if not (flags & bufmode): # <<<<<<<<<<<<<<
5784  * raise ValueError("Can only create a buffer that is contiguous in memory.")
5785  * info.buf = self.data
5786  */
5787  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
5788  if (unlikely(__pyx_t_1)) {
5789 
5790  /* "View.MemoryView":192
5791  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5792  * if not (flags & bufmode):
5793  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
5794  * info.buf = self.data
5795  * info.len = self.len
5796  */
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)
5802 
5803  /* "View.MemoryView":191
5804  * elif self.mode == u"fortran":
5805  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5806  * if not (flags & bufmode): # <<<<<<<<<<<<<<
5807  * raise ValueError("Can only create a buffer that is contiguous in memory.")
5808  * info.buf = self.data
5809  */
5810  }
5811 
5812  /* "View.MemoryView":193
5813  * if not (flags & bufmode):
5814  * raise ValueError("Can only create a buffer that is contiguous in memory.")
5815  * info.buf = self.data # <<<<<<<<<<<<<<
5816  * info.len = self.len
5817  * info.ndim = self.ndim
5818  */
5819  __pyx_t_4 = __pyx_v_self->data;
5820  __pyx_v_info->buf = __pyx_t_4;
5821 
5822  /* "View.MemoryView":194
5823  * raise ValueError("Can only create a buffer that is contiguous in memory.")
5824  * info.buf = self.data
5825  * info.len = self.len # <<<<<<<<<<<<<<
5826  * info.ndim = self.ndim
5827  * info.shape = self._shape
5828  */
5829  __pyx_t_5 = __pyx_v_self->len;
5830  __pyx_v_info->len = __pyx_t_5;
5831 
5832  /* "View.MemoryView":195
5833  * info.buf = self.data
5834  * info.len = self.len
5835  * info.ndim = self.ndim # <<<<<<<<<<<<<<
5836  * info.shape = self._shape
5837  * info.strides = self._strides
5838  */
5839  __pyx_t_6 = __pyx_v_self->ndim;
5840  __pyx_v_info->ndim = __pyx_t_6;
5841 
5842  /* "View.MemoryView":196
5843  * info.len = self.len
5844  * info.ndim = self.ndim
5845  * info.shape = self._shape # <<<<<<<<<<<<<<
5846  * info.strides = self._strides
5847  * info.suboffsets = NULL
5848  */
5849  __pyx_t_7 = __pyx_v_self->_shape;
5850  __pyx_v_info->shape = __pyx_t_7;
5851 
5852  /* "View.MemoryView":197
5853  * info.ndim = self.ndim
5854  * info.shape = self._shape
5855  * info.strides = self._strides # <<<<<<<<<<<<<<
5856  * info.suboffsets = NULL
5857  * info.itemsize = self.itemsize
5858  */
5859  __pyx_t_7 = __pyx_v_self->_strides;
5860  __pyx_v_info->strides = __pyx_t_7;
5861 
5862  /* "View.MemoryView":198
5863  * info.shape = self._shape
5864  * info.strides = self._strides
5865  * info.suboffsets = NULL # <<<<<<<<<<<<<<
5866  * info.itemsize = self.itemsize
5867  * info.readonly = 0
5868  */
5869  __pyx_v_info->suboffsets = NULL;
5870 
5871  /* "View.MemoryView":199
5872  * info.strides = self._strides
5873  * info.suboffsets = NULL
5874  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
5875  * info.readonly = 0
5876  *
5877  */
5878  __pyx_t_5 = __pyx_v_self->itemsize;
5879  __pyx_v_info->itemsize = __pyx_t_5;
5880 
5881  /* "View.MemoryView":200
5882  * info.suboffsets = NULL
5883  * info.itemsize = self.itemsize
5884  * info.readonly = 0 # <<<<<<<<<<<<<<
5885  *
5886  * if flags & PyBUF_FORMAT:
5887  */
5888  __pyx_v_info->readonly = 0;
5889 
5890  /* "View.MemoryView":202
5891  * info.readonly = 0
5892  *
5893  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
5894  * info.format = self.format
5895  * else:
5896  */
5897  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
5898  if (__pyx_t_1) {
5899 
5900  /* "View.MemoryView":203
5901  *
5902  * if flags & PyBUF_FORMAT:
5903  * info.format = self.format # <<<<<<<<<<<<<<
5904  * else:
5905  * info.format = NULL
5906  */
5907  __pyx_t_4 = __pyx_v_self->format;
5908  __pyx_v_info->format = __pyx_t_4;
5909 
5910  /* "View.MemoryView":202
5911  * info.readonly = 0
5912  *
5913  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
5914  * info.format = self.format
5915  * else:
5916  */
5917  goto __pyx_L5;
5918  }
5919 
5920  /* "View.MemoryView":205
5921  * info.format = self.format
5922  * else:
5923  * info.format = NULL # <<<<<<<<<<<<<<
5924  *
5925  * info.obj = self
5926  */
5927  /*else*/ {
5928  __pyx_v_info->format = NULL;
5929  }
5930  __pyx_L5:;
5931 
5932  /* "View.MemoryView":207
5933  * info.format = NULL
5934  *
5935  * info.obj = self # <<<<<<<<<<<<<<
5936  *
5937  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
5938  */
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);
5944 
5945  /* "View.MemoryView":185
5946  *
5947  * @cname('getbuffer')
5948  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
5949  * cdef int bufmode = -1
5950  * if self.mode == u"c":
5951  */
5952 
5953  /* function exit code */
5954  __pyx_r = 0;
5955  goto __pyx_L0;
5956  __pyx_L1_error:;
5957  __Pyx_XDECREF(__pyx_t_3);
5958  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5959  __pyx_r = -1;
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;
5963  }
5964  goto __pyx_L2;
5965  __pyx_L0:;
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;
5969  }
5970  __pyx_L2:;
5971  __Pyx_RefNannyFinishContext();
5972  return __pyx_r;
5973 }
5974 
5975 /* "View.MemoryView":211
5976  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
5977  *
5978  * def __dealloc__(array self): # <<<<<<<<<<<<<<
5979  * if self.callback_free_data != NULL:
5980  * self.callback_free_data(self.data)
5981  */
5982 
5983 /* Python wrapper */
5984 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
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));
5989 
5990  /* function exit code */
5991  __Pyx_RefNannyFinishContext();
5992 }
5993 
5994 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
5995  __Pyx_RefNannyDeclarations
5996  int __pyx_t_1;
5997  __Pyx_RefNannySetupContext("__dealloc__", 0);
5998 
5999  /* "View.MemoryView":212
6000  *
6001  * def __dealloc__(array self):
6002  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6003  * self.callback_free_data(self.data)
6004  * elif self.free_data:
6005  */
6006  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
6007  if (__pyx_t_1) {
6008 
6009  /* "View.MemoryView":213
6010  * def __dealloc__(array self):
6011  * if self.callback_free_data != NULL:
6012  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
6013  * elif self.free_data:
6014  * if self.dtype_is_object:
6015  */
6016  __pyx_v_self->callback_free_data(__pyx_v_self->data);
6017 
6018  /* "View.MemoryView":212
6019  *
6020  * def __dealloc__(array self):
6021  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6022  * self.callback_free_data(self.data)
6023  * elif self.free_data:
6024  */
6025  goto __pyx_L3;
6026  }
6027 
6028  /* "View.MemoryView":214
6029  * if self.callback_free_data != NULL:
6030  * self.callback_free_data(self.data)
6031  * elif self.free_data: # <<<<<<<<<<<<<<
6032  * if self.dtype_is_object:
6033  * refcount_objects_in_slice(self.data, self._shape,
6034  */
6035  __pyx_t_1 = (__pyx_v_self->free_data != 0);
6036  if (__pyx_t_1) {
6037 
6038  /* "View.MemoryView":215
6039  * self.callback_free_data(self.data)
6040  * elif self.free_data:
6041  * if self.dtype_is_object: # <<<<<<<<<<<<<<
6042  * refcount_objects_in_slice(self.data, self._shape,
6043  * self._strides, self.ndim, False)
6044  */
6045  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
6046  if (__pyx_t_1) {
6047 
6048  /* "View.MemoryView":216
6049  * elif self.free_data:
6050  * if self.dtype_is_object:
6051  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
6052  * self._strides, self.ndim, False)
6053  * free(self.data)
6054  */
6055  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
6056 
6057  /* "View.MemoryView":215
6058  * self.callback_free_data(self.data)
6059  * elif self.free_data:
6060  * if self.dtype_is_object: # <<<<<<<<<<<<<<
6061  * refcount_objects_in_slice(self.data, self._shape,
6062  * self._strides, self.ndim, False)
6063  */
6064  }
6065 
6066  /* "View.MemoryView":218
6067  * refcount_objects_in_slice(self.data, self._shape,
6068  * self._strides, self.ndim, False)
6069  * free(self.data) # <<<<<<<<<<<<<<
6070  * PyObject_Free(self._shape)
6071  *
6072  */
6073  free(__pyx_v_self->data);
6074 
6075  /* "View.MemoryView":214
6076  * if self.callback_free_data != NULL:
6077  * self.callback_free_data(self.data)
6078  * elif self.free_data: # <<<<<<<<<<<<<<
6079  * if self.dtype_is_object:
6080  * refcount_objects_in_slice(self.data, self._shape,
6081  */
6082  }
6083  __pyx_L3:;
6084 
6085  /* "View.MemoryView":219
6086  * self._strides, self.ndim, False)
6087  * free(self.data)
6088  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
6089  *
6090  * @property
6091  */
6092  PyObject_Free(__pyx_v_self->_shape);
6093 
6094  /* "View.MemoryView":211
6095  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
6096  *
6097  * def __dealloc__(array self): # <<<<<<<<<<<<<<
6098  * if self.callback_free_data != NULL:
6099  * self.callback_free_data(self.data)
6100  */
6101 
6102  /* function exit code */
6103  __Pyx_RefNannyFinishContext();
6104 }
6105 
6106 /* "View.MemoryView":222
6107  *
6108  * @property
6109  * def memview(self): # <<<<<<<<<<<<<<
6110  * return self.get_memview()
6111  *
6112  */
6113 
6114 /* Python wrapper */
6115 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
6121 
6122  /* function exit code */
6123  __Pyx_RefNannyFinishContext();
6124  return __pyx_r;
6125 }
6126 
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);
6135 
6136  /* "View.MemoryView":223
6137  * @property
6138  * def memview(self):
6139  * return self.get_memview() # <<<<<<<<<<<<<<
6140  *
6141  * @cname('get_memview')
6142  */
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;
6147  __pyx_t_1 = 0;
6148  goto __pyx_L0;
6149 
6150  /* "View.MemoryView":222
6151  *
6152  * @property
6153  * def memview(self): # <<<<<<<<<<<<<<
6154  * return self.get_memview()
6155  *
6156  */
6157 
6158  /* function exit code */
6159  __pyx_L1_error:;
6160  __Pyx_XDECREF(__pyx_t_1);
6161  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6162  __pyx_r = NULL;
6163  __pyx_L0:;
6164  __Pyx_XGIVEREF(__pyx_r);
6165  __Pyx_RefNannyFinishContext();
6166  return __pyx_r;
6167 }
6168 
6169 /* "View.MemoryView":226
6170  *
6171  * @cname('get_memview')
6172  * cdef get_memview(self): # <<<<<<<<<<<<<<
6173  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6174  * return memoryview(self, flags, self.dtype_is_object)
6175  */
6176 
6177 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
6178  int __pyx_v_flags;
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);
6188 
6189  /* "View.MemoryView":227
6190  * @cname('get_memview')
6191  * cdef get_memview(self):
6192  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
6193  * return memoryview(self, flags, self.dtype_is_object)
6194  *
6195  */
6196  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
6197 
6198  /* "View.MemoryView":228
6199  * cdef get_memview(self):
6200  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6201  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
6202  *
6203  * def __len__(self):
6204  */
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);
6219  __pyx_t_1 = 0;
6220  __pyx_t_2 = 0;
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;
6225  __pyx_t_2 = 0;
6226  goto __pyx_L0;
6227 
6228  /* "View.MemoryView":226
6229  *
6230  * @cname('get_memview')
6231  * cdef get_memview(self): # <<<<<<<<<<<<<<
6232  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6233  * return memoryview(self, flags, self.dtype_is_object)
6234  */
6235 
6236  /* function exit code */
6237  __pyx_L1_error:;
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);
6242  __pyx_r = 0;
6243  __pyx_L0:;
6244  __Pyx_XGIVEREF(__pyx_r);
6245  __Pyx_RefNannyFinishContext();
6246  return __pyx_r;
6247 }
6248 
6249 /* "View.MemoryView":230
6250  * return memoryview(self, flags, self.dtype_is_object)
6251  *
6252  * def __len__(self): # <<<<<<<<<<<<<<
6253  * return self._shape[0]
6254  *
6255  */
6256 
6257 /* Python wrapper */
6258 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
6259 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
6260  Py_ssize_t __pyx_r;
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));
6264 
6265  /* function exit code */
6266  __Pyx_RefNannyFinishContext();
6267  return __pyx_r;
6268 }
6269 
6270 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
6271  Py_ssize_t __pyx_r;
6272  __Pyx_RefNannyDeclarations
6273  __Pyx_RefNannySetupContext("__len__", 0);
6274 
6275  /* "View.MemoryView":231
6276  *
6277  * def __len__(self):
6278  * return self._shape[0] # <<<<<<<<<<<<<<
6279  *
6280  * def __getattr__(self, attr):
6281  */
6282  __pyx_r = (__pyx_v_self->_shape[0]);
6283  goto __pyx_L0;
6284 
6285  /* "View.MemoryView":230
6286  * return memoryview(self, flags, self.dtype_is_object)
6287  *
6288  * def __len__(self): # <<<<<<<<<<<<<<
6289  * return self._shape[0]
6290  *
6291  */
6292 
6293  /* function exit code */
6294  __pyx_L0:;
6295  __Pyx_RefNannyFinishContext();
6296  return __pyx_r;
6297 }
6298 
6299 /* "View.MemoryView":233
6300  * return self._shape[0]
6301  *
6302  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
6303  * return getattr(self.memview, attr)
6304  *
6305  */
6306 
6307 /* Python wrapper */
6308 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
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));
6314 
6315  /* function exit code */
6316  __Pyx_RefNannyFinishContext();
6317  return __pyx_r;
6318 }
6319 
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);
6329 
6330  /* "View.MemoryView":234
6331  *
6332  * def __getattr__(self, attr):
6333  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
6334  *
6335  * def __getitem__(self, item):
6336  */
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;
6344  __pyx_t_2 = 0;
6345  goto __pyx_L0;
6346 
6347  /* "View.MemoryView":233
6348  * return self._shape[0]
6349  *
6350  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
6351  * return getattr(self.memview, attr)
6352  *
6353  */
6354 
6355  /* function exit code */
6356  __pyx_L1_error:;
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);
6360  __pyx_r = NULL;
6361  __pyx_L0:;
6362  __Pyx_XGIVEREF(__pyx_r);
6363  __Pyx_RefNannyFinishContext();
6364  return __pyx_r;
6365 }
6366 
6367 /* "View.MemoryView":236
6368  * return getattr(self.memview, attr)
6369  *
6370  * def __getitem__(self, item): # <<<<<<<<<<<<<<
6371  * return self.memview[item]
6372  *
6373  */
6374 
6375 /* Python wrapper */
6376 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
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));
6382 
6383  /* function exit code */
6384  __Pyx_RefNannyFinishContext();
6385  return __pyx_r;
6386 }
6387 
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);
6397 
6398  /* "View.MemoryView":237
6399  *
6400  * def __getitem__(self, item):
6401  * return self.memview[item] # <<<<<<<<<<<<<<
6402  *
6403  * def __setitem__(self, item, value):
6404  */
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;
6412  __pyx_t_2 = 0;
6413  goto __pyx_L0;
6414 
6415  /* "View.MemoryView":236
6416  * return getattr(self.memview, attr)
6417  *
6418  * def __getitem__(self, item): # <<<<<<<<<<<<<<
6419  * return self.memview[item]
6420  *
6421  */
6422 
6423  /* function exit code */
6424  __pyx_L1_error:;
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);
6428  __pyx_r = NULL;
6429  __pyx_L0:;
6430  __Pyx_XGIVEREF(__pyx_r);
6431  __Pyx_RefNannyFinishContext();
6432  return __pyx_r;
6433 }
6434 
6435 /* "View.MemoryView":239
6436  * return self.memview[item]
6437  *
6438  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
6439  * self.memview[item] = value
6440  *
6441  */
6442 
6443 /* Python wrapper */
6444 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
6445 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6446  int __pyx_r;
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));
6450 
6451  /* function exit code */
6452  __Pyx_RefNannyFinishContext();
6453  return __pyx_r;
6454 }
6455 
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) {
6457  int __pyx_r;
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);
6464 
6465  /* "View.MemoryView":240
6466  *
6467  * def __setitem__(self, item, value):
6468  * self.memview[item] = value # <<<<<<<<<<<<<<
6469  *
6470  *
6471  */
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;
6476 
6477  /* "View.MemoryView":239
6478  * return self.memview[item]
6479  *
6480  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
6481  * self.memview[item] = value
6482  *
6483  */
6484 
6485  /* function exit code */
6486  __pyx_r = 0;
6487  goto __pyx_L0;
6488  __pyx_L1_error:;
6489  __Pyx_XDECREF(__pyx_t_1);
6490  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6491  __pyx_r = -1;
6492  __pyx_L0:;
6493  __Pyx_RefNannyFinishContext();
6494  return __pyx_r;
6495 }
6496 
6497 /* "(tree fragment)":1
6498  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6499  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6500  * def __setstate_cython__(self, __pyx_state):
6501  */
6502 
6503 /* Python wrapper */
6504 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
6510 
6511  /* function exit code */
6512  __Pyx_RefNannyFinishContext();
6513  return __pyx_r;
6514 }
6515 
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);
6524 
6525  /* "(tree fragment)":2
6526  * def __reduce_cython__(self):
6527  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
6528  * def __setstate_cython__(self, __pyx_state):
6529  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6530  */
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;