proteus  1.8.1
C/C++/Fortran libraries
flcbdfWrappers.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__flcbdfWrappers
708 #define __PYX_HAVE_API__flcbdfWrappers
709 /* Early includes */
710 #include <string.h>
711 #include <stdio.h>
712 #include "numpy/arrayobject.h"
713 #include "numpy/ndarrayobject.h"
714 #include "numpy/ndarraytypes.h"
715 #include "numpy/arrayscalars.h"
716 #include "numpy/ufuncobject.h"
717 
718  /* NumPy API declarations from "numpy/__init__.pxd" */
719 
720 #include "FullDataFile.h"
721 #include "DaetkPetscSys.h"
722 #include "DaetkPetscVec.h"
723 #include "WeightedRMSNorm.h"
724 #include "FLCBDF_lite.h"
725 #include "pythread.h"
726 #include <stdlib.h>
727 #include "pystate.h"
728 #ifdef _OPENMP
729 #include <omp.h>
730 #endif /* _OPENMP */
731 
732 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
733 #define CYTHON_WITHOUT_ASSERTIONS
734 #endif
735 
736 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
737  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
738 
739 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
740 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
741 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
742 #define __PYX_DEFAULT_STRING_ENCODING ""
743 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
744 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
745 #define __Pyx_uchar_cast(c) ((unsigned char)c)
746 #define __Pyx_long_cast(x) ((long)x)
747 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
748  (sizeof(type) < sizeof(Py_ssize_t)) ||\
749  (sizeof(type) > sizeof(Py_ssize_t) &&\
750  likely(v < (type)PY_SSIZE_T_MAX ||\
751  v == (type)PY_SSIZE_T_MAX) &&\
752  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
753  v == (type)PY_SSIZE_T_MIN))) ||\
754  (sizeof(type) == sizeof(Py_ssize_t) &&\
755  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
756  v == (type)PY_SSIZE_T_MAX))) )
757 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
758  return (size_t) i < (size_t) limit;
759 }
760 #if defined (__cplusplus) && __cplusplus >= 201103L
761  #include <cstdlib>
762  #define __Pyx_sst_abs(value) std::abs(value)
763 #elif SIZEOF_INT >= SIZEOF_SIZE_T
764  #define __Pyx_sst_abs(value) abs(value)
765 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
766  #define __Pyx_sst_abs(value) labs(value)
767 #elif defined (_MSC_VER)
768  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
769 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
770  #define __Pyx_sst_abs(value) llabs(value)
771 #elif defined (__GNUC__)
772  #define __Pyx_sst_abs(value) __builtin_llabs(value)
773 #else
774  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
775 #endif
776 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
777 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
778 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
779 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
780 #define __Pyx_PyBytes_FromString PyBytes_FromString
781 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
782 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
783 #if PY_MAJOR_VERSION < 3
784  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
785  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
786 #else
787  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
788  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
789 #endif
790 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
792 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
793 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
794 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
795 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
796 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
797 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
798 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
799 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
800 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
801 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
802 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
803 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
804 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
805 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
806 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
807  const Py_UNICODE *u_end = u;
808  while (*u_end++) ;
809  return (size_t)(u_end - u - 1);
810 }
811 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
812 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
813 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
814 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
815 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
816 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
817 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
818 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
819 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
820 #define __Pyx_PySequence_Tuple(obj)\
821  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
822 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
823 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
824 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
825 #if CYTHON_ASSUME_SAFE_MACROS
826 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
827 #else
828 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
829 #endif
830 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
831 #if PY_MAJOR_VERSION >= 3
832 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
833 #else
834 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
835 #endif
836 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
837 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
838 static int __Pyx_sys_getdefaultencoding_not_ascii;
839 static int __Pyx_init_sys_getdefaultencoding_params(void) {
840  PyObject* sys;
841  PyObject* default_encoding = NULL;
842  PyObject* ascii_chars_u = NULL;
843  PyObject* ascii_chars_b = NULL;
844  const char* default_encoding_c;
845  sys = PyImport_ImportModule("sys");
846  if (!sys) goto bad;
847  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
848  Py_DECREF(sys);
849  if (!default_encoding) goto bad;
850  default_encoding_c = PyBytes_AsString(default_encoding);
851  if (!default_encoding_c) goto bad;
852  if (strcmp(default_encoding_c, "ascii") == 0) {
853  __Pyx_sys_getdefaultencoding_not_ascii = 0;
854  } else {
855  char ascii_chars[128];
856  int c;
857  for (c = 0; c < 128; c++) {
858  ascii_chars[c] = c;
859  }
860  __Pyx_sys_getdefaultencoding_not_ascii = 1;
861  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
862  if (!ascii_chars_u) goto bad;
863  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
864  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
865  PyErr_Format(
866  PyExc_ValueError,
867  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
868  default_encoding_c);
869  goto bad;
870  }
871  Py_DECREF(ascii_chars_u);
872  Py_DECREF(ascii_chars_b);
873  }
874  Py_DECREF(default_encoding);
875  return 0;
876 bad:
877  Py_XDECREF(default_encoding);
878  Py_XDECREF(ascii_chars_u);
879  Py_XDECREF(ascii_chars_b);
880  return -1;
881 }
882 #endif
883 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
884 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
885 #else
886 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
887 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
888 static char* __PYX_DEFAULT_STRING_ENCODING;
889 static int __Pyx_init_sys_getdefaultencoding_params(void) {
890  PyObject* sys;
891  PyObject* default_encoding = NULL;
892  char* default_encoding_c;
893  sys = PyImport_ImportModule("sys");
894  if (!sys) goto bad;
895  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
896  Py_DECREF(sys);
897  if (!default_encoding) goto bad;
898  default_encoding_c = PyBytes_AsString(default_encoding);
899  if (!default_encoding_c) goto bad;
900  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
901  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
902  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
903  Py_DECREF(default_encoding);
904  return 0;
905 bad:
906  Py_XDECREF(default_encoding);
907  return -1;
908 }
909 #endif
910 #endif
911 
912 
913 /* Test for GCC > 2.95 */
914 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
915  #define likely(x) __builtin_expect(!!(x), 1)
916  #define unlikely(x) __builtin_expect(!!(x), 0)
917 #else /* !__GNUC__ or GCC < 2.95 */
918  #define likely(x) (x)
919  #define unlikely(x) (x)
920 #endif /* __GNUC__ */
921 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
922 
923 static PyObject *__pyx_m = NULL;
924 static PyObject *__pyx_d;
925 static PyObject *__pyx_b;
926 static PyObject *__pyx_cython_runtime = NULL;
927 static PyObject *__pyx_empty_tuple;
928 static PyObject *__pyx_empty_bytes;
929 static PyObject *__pyx_empty_unicode;
930 static int __pyx_lineno;
931 static int __pyx_clineno = 0;
932 static const char * __pyx_cfilenm= __FILE__;
933 static const char *__pyx_filename;
934 
935 /* Header.proto */
936 #if !defined(CYTHON_CCOMPLEX)
937  #if defined(__cplusplus)
938  #define CYTHON_CCOMPLEX 1
939  #elif defined(_Complex_I)
940  #define CYTHON_CCOMPLEX 1
941  #else
942  #define CYTHON_CCOMPLEX 0
943  #endif
944 #endif
945 #if CYTHON_CCOMPLEX
946  #ifdef __cplusplus
947  #include <complex>
948  #else
949  #include <complex.h>
950  #endif
951 #endif
952 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
953  #undef _Complex_I
954  #define _Complex_I 1.0fj
955 #endif
956 
957 
958 static const char *__pyx_f[] = {
959  "stringsource",
960  "proteus/flcbdfWrappers.pyx",
961  "__init__.pxd",
962  "type.pxd",
963 };
964 /* ForceInitThreads.proto */
965 #ifndef __PYX_FORCE_INIT_THREADS
966  #define __PYX_FORCE_INIT_THREADS 0
967 #endif
968 
969 /* NoFastGil.proto */
970 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
971 #define __Pyx_PyGILState_Release PyGILState_Release
972 #define __Pyx_FastGIL_Remember()
973 #define __Pyx_FastGIL_Forget()
974 #define __Pyx_FastGilFuncInit()
975 
976 /* BufferFormatStructs.proto */
977 #define IS_UNSIGNED(type) (((type) -1) > 0)
978 struct __Pyx_StructField_;
979 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
980 typedef struct {
981  const char* name;
982  struct __Pyx_StructField_* fields;
983  size_t size;
984  size_t arraysize[8];
985  int ndim;
986  char typegroup;
987  char is_unsigned;
988  int flags;
989 } __Pyx_TypeInfo;
990 typedef struct __Pyx_StructField_ {
991  __Pyx_TypeInfo* type;
992  const char* name;
993  size_t offset;
994 } __Pyx_StructField;
995 typedef struct {
996  __Pyx_StructField* field;
997  size_t parent_offset;
998 } __Pyx_BufFmt_StackElem;
999 typedef struct {
1000  __Pyx_StructField root;
1001  __Pyx_BufFmt_StackElem* head;
1002  size_t fmt_offset;
1003  size_t new_count, enc_count;
1004  size_t struct_alignment;
1005  int is_complex;
1006  char enc_type;
1007  char new_packmode;
1008  char enc_packmode;
1009  char is_valid_array;
1010 } __Pyx_BufFmt_Context;
1011 
1012 /* Atomics.proto */
1013 #include <pythread.h>
1014 #ifndef CYTHON_ATOMICS
1015  #define CYTHON_ATOMICS 1
1016 #endif
1017 #define __pyx_atomic_int_type int
1018 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
1019  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
1020  !defined(__i386__)
1021  #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
1022  #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
1023  #ifdef __PYX_DEBUG_ATOMICS
1024  #warning "Using GNU atomics"
1025  #endif
1026 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
1027  #include <Windows.h>
1028  #undef __pyx_atomic_int_type
1029  #define __pyx_atomic_int_type LONG
1030  #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
1031  #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
1032  #ifdef __PYX_DEBUG_ATOMICS
1033  #pragma message ("Using MSVC atomics")
1034  #endif
1035 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
1036  #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
1037  #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
1038  #ifdef __PYX_DEBUG_ATOMICS
1039  #warning "Using Intel atomics"
1040  #endif
1041 #else
1042  #undef CYTHON_ATOMICS
1043  #define CYTHON_ATOMICS 0
1044  #ifdef __PYX_DEBUG_ATOMICS
1045  #warning "Not using atomics"
1046  #endif
1047 #endif
1048 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1049 #if CYTHON_ATOMICS
1050  #define __pyx_add_acquisition_count(memview)\
1051  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1052  #define __pyx_sub_acquisition_count(memview)\
1053  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1054 #else
1055  #define __pyx_add_acquisition_count(memview)\
1056  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1057  #define __pyx_sub_acquisition_count(memview)\
1058  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1059 #endif
1060 
1061 /* MemviewSliceStruct.proto */
1062 struct __pyx_memoryview_obj;
1063 typedef struct {
1064  struct __pyx_memoryview_obj *memview;
1065  char *data;
1066  Py_ssize_t shape[8];
1067  Py_ssize_t strides[8];
1068  Py_ssize_t suboffsets[8];
1069 } __Pyx_memviewslice;
1070 #define __Pyx_MemoryView_Len(m) (m.shape[0])
1071 
1072 
1073 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1074  * # in Cython to enable them only on the right systems.
1075  *
1076  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1077  * ctypedef npy_int16 int16_t
1078  * ctypedef npy_int32 int32_t
1079  */
1080 typedef npy_int8 __pyx_t_5numpy_int8_t;
1081 
1082 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1083  *
1084  * ctypedef npy_int8 int8_t
1085  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1086  * ctypedef npy_int32 int32_t
1087  * ctypedef npy_int64 int64_t
1088  */
1089 typedef npy_int16 __pyx_t_5numpy_int16_t;
1090 
1091 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1092  * ctypedef npy_int8 int8_t
1093  * ctypedef npy_int16 int16_t
1094  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1095  * ctypedef npy_int64 int64_t
1096  * #ctypedef npy_int96 int96_t
1097  */
1098 typedef npy_int32 __pyx_t_5numpy_int32_t;
1099 
1100 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1101  * ctypedef npy_int16 int16_t
1102  * ctypedef npy_int32 int32_t
1103  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1104  * #ctypedef npy_int96 int96_t
1105  * #ctypedef npy_int128 int128_t
1106  */
1107 typedef npy_int64 __pyx_t_5numpy_int64_t;
1108 
1109 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1110  * #ctypedef npy_int128 int128_t
1111  *
1112  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1113  * ctypedef npy_uint16 uint16_t
1114  * ctypedef npy_uint32 uint32_t
1115  */
1116 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1117 
1118 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1119  *
1120  * ctypedef npy_uint8 uint8_t
1121  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1122  * ctypedef npy_uint32 uint32_t
1123  * ctypedef npy_uint64 uint64_t
1124  */
1125 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1126 
1127 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1128  * ctypedef npy_uint8 uint8_t
1129  * ctypedef npy_uint16 uint16_t
1130  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1131  * ctypedef npy_uint64 uint64_t
1132  * #ctypedef npy_uint96 uint96_t
1133  */
1134 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1135 
1136 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1137  * ctypedef npy_uint16 uint16_t
1138  * ctypedef npy_uint32 uint32_t
1139  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1140  * #ctypedef npy_uint96 uint96_t
1141  * #ctypedef npy_uint128 uint128_t
1142  */
1143 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1144 
1145 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1146  * #ctypedef npy_uint128 uint128_t
1147  *
1148  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1149  * ctypedef npy_float64 float64_t
1150  * #ctypedef npy_float80 float80_t
1151  */
1152 typedef npy_float32 __pyx_t_5numpy_float32_t;
1153 
1154 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1155  *
1156  * ctypedef npy_float32 float32_t
1157  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1158  * #ctypedef npy_float80 float80_t
1159  * #ctypedef npy_float128 float128_t
1160  */
1161 typedef npy_float64 __pyx_t_5numpy_float64_t;
1162 
1163 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1164  * # The int types are mapped a bit surprising --
1165  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1166  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1167  * ctypedef npy_longlong long_t
1168  * ctypedef npy_longlong longlong_t
1169  */
1170 typedef npy_long __pyx_t_5numpy_int_t;
1171 
1172 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1173  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1174  * ctypedef npy_long int_t
1175  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1176  * ctypedef npy_longlong longlong_t
1177  *
1178  */
1179 typedef npy_longlong __pyx_t_5numpy_long_t;
1180 
1181 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1182  * ctypedef npy_long int_t
1183  * ctypedef npy_longlong long_t
1184  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1185  *
1186  * ctypedef npy_ulong uint_t
1187  */
1188 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1189 
1190 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1191  * ctypedef npy_longlong longlong_t
1192  *
1193  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1194  * ctypedef npy_ulonglong ulong_t
1195  * ctypedef npy_ulonglong ulonglong_t
1196  */
1197 typedef npy_ulong __pyx_t_5numpy_uint_t;
1198 
1199 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1200  *
1201  * ctypedef npy_ulong uint_t
1202  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1203  * ctypedef npy_ulonglong ulonglong_t
1204  *
1205  */
1206 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1207 
1208 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1209  * ctypedef npy_ulong uint_t
1210  * ctypedef npy_ulonglong ulong_t
1211  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1212  *
1213  * ctypedef npy_intp intp_t
1214  */
1215 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1216 
1217 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1218  * ctypedef npy_ulonglong ulonglong_t
1219  *
1220  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1221  * ctypedef npy_uintp uintp_t
1222  *
1223  */
1224 typedef npy_intp __pyx_t_5numpy_intp_t;
1225 
1226 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1227  *
1228  * ctypedef npy_intp intp_t
1229  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1230  *
1231  * ctypedef npy_double float_t
1232  */
1233 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1234 
1235 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1236  * ctypedef npy_uintp uintp_t
1237  *
1238  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1239  * ctypedef npy_double double_t
1240  * ctypedef npy_longdouble longdouble_t
1241  */
1242 typedef npy_double __pyx_t_5numpy_float_t;
1243 
1244 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1245  *
1246  * ctypedef npy_double float_t
1247  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1248  * ctypedef npy_longdouble longdouble_t
1249  *
1250  */
1251 typedef npy_double __pyx_t_5numpy_double_t;
1252 
1253 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1254  * ctypedef npy_double float_t
1255  * ctypedef npy_double double_t
1256  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1257  *
1258  * ctypedef npy_cfloat cfloat_t
1259  */
1260 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1261 /* Declarations.proto */
1262 #if CYTHON_CCOMPLEX
1263  #ifdef __cplusplus
1264  typedef ::std::complex< float > __pyx_t_float_complex;
1265  #else
1266  typedef float _Complex __pyx_t_float_complex;
1267  #endif
1268 #else
1269  typedef struct { float real, imag; } __pyx_t_float_complex;
1270 #endif
1271 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1272 
1273 /* Declarations.proto */
1274 #if CYTHON_CCOMPLEX
1275  #ifdef __cplusplus
1276  typedef ::std::complex< double > __pyx_t_double_complex;
1277  #else
1278  typedef double _Complex __pyx_t_double_complex;
1279  #endif
1280 #else
1281  typedef struct { double real, imag; } __pyx_t_double_complex;
1282 #endif
1283 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1284 
1285 
1286 /*--- Type declarations ---*/
1287 struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator;
1288 struct __pyx_array_obj;
1289 struct __pyx_MemviewEnum_obj;
1290 struct __pyx_memoryview_obj;
1291 struct __pyx_memoryviewslice_obj;
1292 
1293 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1294  * ctypedef npy_longdouble longdouble_t
1295  *
1296  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1297  * ctypedef npy_cdouble cdouble_t
1298  * ctypedef npy_clongdouble clongdouble_t
1299  */
1300 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1301 
1302 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1303  *
1304  * ctypedef npy_cfloat cfloat_t
1305  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1306  * ctypedef npy_clongdouble clongdouble_t
1307  *
1308  */
1309 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1310 
1311 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1312  * ctypedef npy_cfloat cfloat_t
1313  * ctypedef npy_cdouble cdouble_t
1314  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1315  *
1316  * ctypedef npy_cdouble complex_t
1317  */
1318 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1319 
1320 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1321  * ctypedef npy_clongdouble clongdouble_t
1322  *
1323  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1324  *
1325  * cdef inline object PyArray_MultiIterNew1(a):
1326  */
1327 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1328 
1329 /* "flcbdfWrappers.pxd":66
1330  * Vec yn,ynprime,yCminusyP,tempvec
1331  *
1332  * cdef class FLCBDF_integrator: # <<<<<<<<<<<<<<
1333  * cdef Sys *petscSys
1334  * cdef WeightedL2Norm *wNormp
1335  */
1336 struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator {
1337  PyObject_HEAD
1338  Daetk::Petsc::Sys *petscSys;
1339  Daetk::WeightedL2Norm *wNormp;
1340  Daetk::FullDataFile *data;
1341  Daetk::FLCBDF_lite *flcbdf;
1342  Daetk::Petsc::Vec *yVec;
1343  Daetk::Petsc::Vec *DyVec;
1344  Daetk::Petsc::Vec *yprimeVec;
1345  Daetk::Petsc::Vec *DyprimeVec;
1346  Daetk::Petsc::Vec *sizeVec;
1347 };
1348 
1349 
1350 /* "View.MemoryView":105
1351  *
1352  * @cname("__pyx_array")
1353  * cdef class array: # <<<<<<<<<<<<<<
1354  *
1355  * cdef:
1356  */
1357 struct __pyx_array_obj {
1358  PyObject_HEAD
1359  struct __pyx_vtabstruct_array *__pyx_vtab;
1360  char *data;
1361  Py_ssize_t len;
1362  char *format;
1363  int ndim;
1364  Py_ssize_t *_shape;
1365  Py_ssize_t *_strides;
1366  Py_ssize_t itemsize;
1367  PyObject *mode;
1368  PyObject *_format;
1369  void (*callback_free_data)(void *);
1370  int free_data;
1371  int dtype_is_object;
1372 };
1373 
1374 
1375 /* "View.MemoryView":279
1376  *
1377  * @cname('__pyx_MemviewEnum')
1378  * cdef class Enum(object): # <<<<<<<<<<<<<<
1379  * cdef object name
1380  * def __init__(self, name):
1381  */
1382 struct __pyx_MemviewEnum_obj {
1383  PyObject_HEAD
1384  PyObject *name;
1385 };
1386 
1387 
1388 /* "View.MemoryView":330
1389  *
1390  * @cname('__pyx_memoryview')
1391  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1392  *
1393  * cdef object obj
1394  */
1395 struct __pyx_memoryview_obj {
1396  PyObject_HEAD
1397  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1398  PyObject *obj;
1399  PyObject *_size;
1400  PyObject *_array_interface;
1401  PyThread_type_lock lock;
1402  __pyx_atomic_int acquisition_count[2];
1403  __pyx_atomic_int *acquisition_count_aligned_p;
1404  Py_buffer view;
1405  int flags;
1406  int dtype_is_object;
1407  __Pyx_TypeInfo *typeinfo;
1408 };
1409 
1410 
1411 /* "View.MemoryView":965
1412  *
1413  * @cname('__pyx_memoryviewslice')
1414  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1415  * "Internal class for passing memoryview slices to Python"
1416  *
1417  */
1418 struct __pyx_memoryviewslice_obj {
1419  struct __pyx_memoryview_obj __pyx_base;
1420  __Pyx_memviewslice from_slice;
1421  PyObject *from_object;
1422  PyObject *(*to_object_func)(char *);
1423  int (*to_dtype_func)(char *, PyObject *);
1424 };
1425 
1426 
1427 
1428 /* "View.MemoryView":105
1429  *
1430  * @cname("__pyx_array")
1431  * cdef class array: # <<<<<<<<<<<<<<
1432  *
1433  * cdef:
1434  */
1435 
1436 struct __pyx_vtabstruct_array {
1437  PyObject *(*get_memview)(struct __pyx_array_obj *);
1438 };
1439 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1440 
1441 
1442 /* "View.MemoryView":330
1443  *
1444  * @cname('__pyx_memoryview')
1445  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1446  *
1447  * cdef object obj
1448  */
1449 
1450 struct __pyx_vtabstruct_memoryview {
1451  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1452  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1453  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1454  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1455  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1456  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1457  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1458 };
1459 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1460 
1461 
1462 /* "View.MemoryView":965
1463  *
1464  * @cname('__pyx_memoryviewslice')
1465  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1466  * "Internal class for passing memoryview slices to Python"
1467  *
1468  */
1469 
1470 struct __pyx_vtabstruct__memoryviewslice {
1471  struct __pyx_vtabstruct_memoryview __pyx_base;
1472 };
1473 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1474 
1475 /* --- Runtime support code (head) --- */
1476 /* Refnanny.proto */
1477 #ifndef CYTHON_REFNANNY
1478  #define CYTHON_REFNANNY 0
1479 #endif
1480 #if CYTHON_REFNANNY
1481  typedef struct {
1482  void (*INCREF)(void*, PyObject*, int);
1483  void (*DECREF)(void*, PyObject*, int);
1484  void (*GOTREF)(void*, PyObject*, int);
1485  void (*GIVEREF)(void*, PyObject*, int);
1486  void* (*SetupContext)(const char*, int, const char*);
1487  void (*FinishContext)(void**);
1488  } __Pyx_RefNannyAPIStruct;
1489  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1490  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1491  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1492 #ifdef WITH_THREAD
1493  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1494  if (acquire_gil) {\
1495  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1496  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1497  PyGILState_Release(__pyx_gilstate_save);\
1498  } else {\
1499  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1500  }
1501 #else
1502  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1503  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1504 #endif
1505  #define __Pyx_RefNannyFinishContext()\
1506  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1507  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1508  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1509  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1510  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1511  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1512  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1513  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1514  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1515 #else
1516  #define __Pyx_RefNannyDeclarations
1517  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1518  #define __Pyx_RefNannyFinishContext()
1519  #define __Pyx_INCREF(r) Py_INCREF(r)
1520  #define __Pyx_DECREF(r) Py_DECREF(r)
1521  #define __Pyx_GOTREF(r)
1522  #define __Pyx_GIVEREF(r)
1523  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1524  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1525  #define __Pyx_XGOTREF(r)
1526  #define __Pyx_XGIVEREF(r)
1527 #endif
1528 #define __Pyx_XDECREF_SET(r, v) do {\
1529  PyObject *tmp = (PyObject *) r;\
1530  r = v; __Pyx_XDECREF(tmp);\
1531  } while (0)
1532 #define __Pyx_DECREF_SET(r, v) do {\
1533  PyObject *tmp = (PyObject *) r;\
1534  r = v; __Pyx_DECREF(tmp);\
1535  } while (0)
1536 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1537 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1538 
1539 /* PyObjectGetAttrStr.proto */
1540 #if CYTHON_USE_TYPE_SLOTS
1541 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1542 #else
1543 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1544 #endif
1545 
1546 /* GetBuiltinName.proto */
1547 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1548 
1549 /* RaiseArgTupleInvalid.proto */
1550 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1551  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1552 
1553 /* RaiseDoubleKeywords.proto */
1554 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1555 
1556 /* ParseKeywords.proto */
1557 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1558  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1559  const char* function_name);
1560 
1561 /* ArgTypeTest.proto */
1562 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1563  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1564  __Pyx__ArgTypeTest(obj, type, name, exact))
1565 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1566 
1567 /* PyDictVersioning.proto */
1568 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1569 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1570 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1571 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1572  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1573  (cache_var) = (value);
1574 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1575  static PY_UINT64_T __pyx_dict_version = 0;\
1576  static PyObject *__pyx_dict_cached_value = NULL;\
1577  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1578  (VAR) = __pyx_dict_cached_value;\
1579  } else {\
1580  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1581  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1582  }\
1583 }
1584 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1585 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1586 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1587 #else
1588 #define __PYX_GET_DICT_VERSION(dict) (0)
1589 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1590 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1591 #endif
1592 
1593 /* GetModuleGlobalName.proto */
1594 #if CYTHON_USE_DICT_VERSIONS
1595 #define __Pyx_GetModuleGlobalName(var, name) {\
1596  static PY_UINT64_T __pyx_dict_version = 0;\
1597  static PyObject *__pyx_dict_cached_value = NULL;\
1598  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1599  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1600  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1601 }
1602 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1603  PY_UINT64_T __pyx_dict_version;\
1604  PyObject *__pyx_dict_cached_value;\
1605  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1606 }
1607 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1608 #else
1609 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1610 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1611 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1612 #endif
1613 
1614 /* PyCFunctionFastCall.proto */
1615 #if CYTHON_FAST_PYCCALL
1616 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1617 #else
1618 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1619 #endif
1620 
1621 /* PyFunctionFastCall.proto */
1622 #if CYTHON_FAST_PYCALL
1623 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1624  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1625 #if 1 || PY_VERSION_HEX < 0x030600B1
1626 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1627 #else
1628 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1629 #endif
1630 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1631  (sizeof(char [1 - 2*!(cond)]) - 1)
1632 #ifndef Py_MEMBER_SIZE
1633 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1634 #endif
1635 #if CYTHON_FAST_PYCALL
1636  static size_t __pyx_pyframe_localsplus_offset = 0;
1637  #include "frameobject.h"
1638 #if PY_VERSION_HEX >= 0x030b00a6
1639  #ifndef Py_BUILD_CORE
1640  #define Py_BUILD_CORE 1
1641  #endif
1642  #include "internal/pycore_frame.h"
1643 #endif
1644  #define __Pxy_PyFrame_Initialize_Offsets()\
1645  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1646  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1647  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1648  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1649 #endif // CYTHON_FAST_PYCALL
1650 #endif
1651 
1652 /* PyObjectCall.proto */
1653 #if CYTHON_COMPILING_IN_CPYTHON
1654 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1655 #else
1656 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1657 #endif
1658 
1659 /* PyObjectCall2Args.proto */
1660 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1661 
1662 /* PyObjectCallMethO.proto */
1663 #if CYTHON_COMPILING_IN_CPYTHON
1664 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1665 #endif
1666 
1667 /* PyObjectCallOneArg.proto */
1668 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1669 
1670 /* SliceObject.proto */
1671 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1672  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1673 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1674  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1675  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1676  int has_cstart, int has_cstop, int wraparound);
1677 
1678 /* PyObjectCallNoArg.proto */
1679 #if CYTHON_COMPILING_IN_CPYTHON
1680 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1681 #else
1682 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1683 #endif
1684 
1685 /* PyThreadStateGet.proto */
1686 #if CYTHON_FAST_THREAD_STATE
1687 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1688 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1689 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1690 #else
1691 #define __Pyx_PyThreadState_declare
1692 #define __Pyx_PyThreadState_assign
1693 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1694 #endif
1695 
1696 /* PyErrFetchRestore.proto */
1697 #if CYTHON_FAST_THREAD_STATE
1698 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1699 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1700 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1701 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1702 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1703 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1704 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1705 #if CYTHON_COMPILING_IN_CPYTHON
1706 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1707 #else
1708 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1709 #endif
1710 #else
1711 #define __Pyx_PyErr_Clear() PyErr_Clear()
1712 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1713 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1714 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1715 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1716 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1717 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1718 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1719 #endif
1720 
1721 /* RaiseException.proto */
1722 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1723 
1724 /* GetTopmostException.proto */
1725 #if CYTHON_USE_EXC_INFO_STACK
1726 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1727 #endif
1728 
1729 /* SaveResetException.proto */
1730 #if CYTHON_FAST_THREAD_STATE
1731 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1732 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1733 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1734 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1735 #else
1736 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1737 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1738 #endif
1739 
1740 /* PyErrExceptionMatches.proto */
1741 #if CYTHON_FAST_THREAD_STATE
1742 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1743 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1744 #else
1745 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1746 #endif
1747 
1748 /* GetException.proto */
1749 #if CYTHON_FAST_THREAD_STATE
1750 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1751 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1752 #else
1753 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1754 #endif
1755 
1756 /* IncludeStringH.proto */
1757 #include <string.h>
1758 
1759 /* BytesEquals.proto */
1760 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1761 
1762 /* UnicodeEquals.proto */
1763 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1764 
1765 /* StrEquals.proto */
1766 #if PY_MAJOR_VERSION >= 3
1767 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1768 #else
1769 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1770 #endif
1771 
1772 /* DivInt[Py_ssize_t].proto */
1773 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1774 
1775 /* UnaryNegOverflows.proto */
1776 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1777  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1778 
1779 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1780 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1781 /* GetAttr.proto */
1782 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1783 
1784 /* GetItemInt.proto */
1785 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1786  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1787  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1788  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1789  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1790 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1791  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1792  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1793  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1794 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1795  int wraparound, int boundscheck);
1796 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1797  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1798  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1799  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1800 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1801  int wraparound, int boundscheck);
1802 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1803 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1804  int is_list, int wraparound, int boundscheck);
1805 
1806 /* ObjectGetItem.proto */
1807 #if CYTHON_USE_TYPE_SLOTS
1808 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1809 #else
1810 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1811 #endif
1812 
1813 /* decode_c_string_utf16.proto */
1814 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1815  int byteorder = 0;
1816  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1817 }
1818 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1819  int byteorder = -1;
1820  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1821 }
1822 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1823  int byteorder = 1;
1824  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1825 }
1826 
1827 /* decode_c_string.proto */
1828 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1829  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1830  const char* encoding, const char* errors,
1831  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1832 
1833 /* GetAttr3.proto */
1834 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1835 
1836 /* RaiseTooManyValuesToUnpack.proto */
1837 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1838 
1839 /* RaiseNeedMoreValuesToUnpack.proto */
1840 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1841 
1842 /* RaiseNoneIterError.proto */
1843 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1844 
1845 /* ExtTypeTest.proto */
1846 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1847 
1848 /* SwapException.proto */
1849 #if CYTHON_FAST_THREAD_STATE
1850 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1851 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1852 #else
1853 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1854 #endif
1855 
1856 /* Import.proto */
1857 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1858 
1859 /* FastTypeChecks.proto */
1860 #if CYTHON_COMPILING_IN_CPYTHON
1861 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1862 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1863 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1864 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1865 #else
1866 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1867 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1868 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1869 #endif
1870 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1871 
1872 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1873 /* ListCompAppend.proto */
1874 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1875 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1876  PyListObject* L = (PyListObject*) list;
1877  Py_ssize_t len = Py_SIZE(list);
1878  if (likely(L->allocated > len)) {
1879  Py_INCREF(x);
1880  PyList_SET_ITEM(list, len, x);
1881  __Pyx_SET_SIZE(list, len + 1);
1882  return 0;
1883  }
1884  return PyList_Append(list, x);
1885 }
1886 #else
1887 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1888 #endif
1889 
1890 /* PyIntBinop.proto */
1891 #if !CYTHON_COMPILING_IN_PYPY
1892 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1893 #else
1894 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1895  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1896 #endif
1897 
1898 /* ListExtend.proto */
1899 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
1900 #if CYTHON_COMPILING_IN_CPYTHON
1901  PyObject* none = _PyList_Extend((PyListObject*)L, v);
1902  if (unlikely(!none))
1903  return -1;
1904  Py_DECREF(none);
1905  return 0;
1906 #else
1907  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
1908 #endif
1909 }
1910 
1911 /* ListAppend.proto */
1912 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1913 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1914  PyListObject* L = (PyListObject*) list;
1915  Py_ssize_t len = Py_SIZE(list);
1916  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1917  Py_INCREF(x);
1918  PyList_SET_ITEM(list, len, x);
1919  __Pyx_SET_SIZE(list, len + 1);
1920  return 0;
1921  }
1922  return PyList_Append(list, x);
1923 }
1924 #else
1925 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1926 #endif
1927 
1928 /* None.proto */
1929 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1930 
1931 /* DivInt[long].proto */
1932 static CYTHON_INLINE long __Pyx_div_long(long, long);
1933 
1934 /* PySequenceContains.proto */
1935 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1936  int result = PySequence_Contains(seq, item);
1937  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1938 }
1939 
1940 /* ImportFrom.proto */
1941 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1942 
1943 /* HasAttr.proto */
1944 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1945 
1946 /* StringJoin.proto */
1947 #if PY_MAJOR_VERSION < 3
1948 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
1949 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
1950 #else
1951 #define __Pyx_PyString_Join PyUnicode_Join
1952 #define __Pyx_PyBaseString_Join PyUnicode_Join
1953 #endif
1954 #if CYTHON_COMPILING_IN_CPYTHON
1955  #if PY_MAJOR_VERSION < 3
1956  #define __Pyx_PyBytes_Join _PyString_Join
1957  #else
1958  #define __Pyx_PyBytes_Join _PyBytes_Join
1959  #endif
1960 #else
1961 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1962 #endif
1963 
1964 /* PyObject_Unicode.proto */
1965 #if PY_MAJOR_VERSION >= 3
1966 #define __Pyx_PyObject_Unicode(obj)\
1967  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1968 #else
1969 #define __Pyx_PyObject_Unicode(obj)\
1970  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1971 #endif
1972 
1973 /* PyObject_GenericGetAttrNoDict.proto */
1974 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1975 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1976 #else
1977 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1978 #endif
1979 
1980 /* PyObject_GenericGetAttr.proto */
1981 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1982 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1983 #else
1984 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1985 #endif
1986 
1987 /* PyObjectGetAttrStrNoError.proto */
1988 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1989 
1990 /* SetupReduce.proto */
1991 static int __Pyx_setup_reduce(PyObject* type_obj);
1992 
1993 /* SetVTable.proto */
1994 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1995 
1996 /* TypeImport.proto */
1997 #ifndef __PYX_HAVE_RT_ImportType_proto
1998 #define __PYX_HAVE_RT_ImportType_proto
1999 enum __Pyx_ImportType_CheckSize {
2000  __Pyx_ImportType_CheckSize_Error = 0,
2001  __Pyx_ImportType_CheckSize_Warn = 1,
2002  __Pyx_ImportType_CheckSize_Ignore = 2
2003 };
2004 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2005 #endif
2006 
2007 /* CLineInTraceback.proto */
2008 #ifdef CYTHON_CLINE_IN_TRACEBACK
2009 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2010 #else
2011 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2012 #endif
2013 
2014 /* CodeObjectCache.proto */
2015 typedef struct {
2016  PyCodeObject* code_object;
2017  int code_line;
2018 } __Pyx_CodeObjectCacheEntry;
2019 struct __Pyx_CodeObjectCache {
2020  int count;
2021  int max_count;
2022  __Pyx_CodeObjectCacheEntry* entries;
2023 };
2024 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2025 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2026 static PyCodeObject *__pyx_find_code_object(int code_line);
2027 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2028 
2029 /* AddTraceback.proto */
2030 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2031  int py_line, const char *filename);
2032 
2033 /* GCCDiagnostics.proto */
2034 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2035 #define __Pyx_HAS_GCC_DIAGNOSTIC
2036 #endif
2037 
2038 /* MemviewDtypeToObject.proto */
2039 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
2040 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
2041 
2042 /* RealImag.proto */
2043 #if CYTHON_CCOMPLEX
2044  #ifdef __cplusplus
2045  #define __Pyx_CREAL(z) ((z).real())
2046  #define __Pyx_CIMAG(z) ((z).imag())
2047  #else
2048  #define __Pyx_CREAL(z) (__real__(z))
2049  #define __Pyx_CIMAG(z) (__imag__(z))
2050  #endif
2051 #else
2052  #define __Pyx_CREAL(z) ((z).real)
2053  #define __Pyx_CIMAG(z) ((z).imag)
2054 #endif
2055 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2056  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2057  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2058  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2059 #else
2060  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2061  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2062 #endif
2063 
2064 /* Arithmetic.proto */
2065 #if CYTHON_CCOMPLEX
2066  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2067  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2068  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2069  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2070  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2071  #define __Pyx_c_neg_float(a) (-(a))
2072  #ifdef __cplusplus
2073  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2074  #define __Pyx_c_conj_float(z) (::std::conj(z))
2075  #if 1
2076  #define __Pyx_c_abs_float(z) (::std::abs(z))
2077  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2078  #endif
2079  #else
2080  #define __Pyx_c_is_zero_float(z) ((z)==0)
2081  #define __Pyx_c_conj_float(z) (conjf(z))
2082  #if 1
2083  #define __Pyx_c_abs_float(z) (cabsf(z))
2084  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2085  #endif
2086  #endif
2087 #else
2088  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2089  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2090  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2091  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2092  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2093  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2094  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2095  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2096  #if 1
2097  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2098  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2099  #endif
2100 #endif
2101 
2102 /* Arithmetic.proto */
2103 #if CYTHON_CCOMPLEX
2104  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2105  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2106  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2107  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2108  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2109  #define __Pyx_c_neg_double(a) (-(a))
2110  #ifdef __cplusplus
2111  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2112  #define __Pyx_c_conj_double(z) (::std::conj(z))
2113  #if 1
2114  #define __Pyx_c_abs_double(z) (::std::abs(z))
2115  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2116  #endif
2117  #else
2118  #define __Pyx_c_is_zero_double(z) ((z)==0)
2119  #define __Pyx_c_conj_double(z) (conj(z))
2120  #if 1
2121  #define __Pyx_c_abs_double(z) (cabs(z))
2122  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2123  #endif
2124  #endif
2125 #else
2126  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2127  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2128  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2129  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2130  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2131  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2132  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2133  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2134  #if 1
2135  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2136  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2137  #endif
2138 #endif
2139 
2140 #if PY_MAJOR_VERSION < 3
2141  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2142  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2143 #else
2144  #define __Pyx_GetBuffer PyObject_GetBuffer
2145  #define __Pyx_ReleaseBuffer PyBuffer_Release
2146 #endif
2147 
2148 
2149 /* BufferStructDeclare.proto */
2150 typedef struct {
2151  Py_ssize_t shape, strides, suboffsets;
2152 } __Pyx_Buf_DimInfo;
2153 typedef struct {
2154  size_t refcount;
2155  Py_buffer pybuffer;
2156 } __Pyx_Buffer;
2157 typedef struct {
2158  __Pyx_Buffer *rcbuffer;
2159  char *data;
2160  __Pyx_Buf_DimInfo diminfo[8];
2161 } __Pyx_LocalBuf_ND;
2162 
2163 /* MemviewSliceIsContig.proto */
2164 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2165 
2166 /* OverlappingSlices.proto */
2167 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2168  __Pyx_memviewslice *slice2,
2169  int ndim, size_t itemsize);
2170 
2171 /* Capsule.proto */
2172 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2173 
2174 /* CIntFromPy.proto */
2175 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2176 
2177 /* CIntToPy.proto */
2178 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2179 
2180 /* TypeInfoToFormat.proto */
2181 struct __pyx_typeinfo_string {
2182  char string[3];
2183 };
2184 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2185 
2186 /* MemviewSliceCopyTemplate.proto */
2187 static __Pyx_memviewslice
2188 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2189  const char *mode, int ndim,
2190  size_t sizeof_dtype, int contig_flag,
2191  int dtype_is_object);
2192 
2193 /* MemviewSliceInit.proto */
2194 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2195 #define __Pyx_MEMVIEW_DIRECT 1
2196 #define __Pyx_MEMVIEW_PTR 2
2197 #define __Pyx_MEMVIEW_FULL 4
2198 #define __Pyx_MEMVIEW_CONTIG 8
2199 #define __Pyx_MEMVIEW_STRIDED 16
2200 #define __Pyx_MEMVIEW_FOLLOW 32
2201 #define __Pyx_IS_C_CONTIG 1
2202 #define __Pyx_IS_F_CONTIG 2
2203 static int __Pyx_init_memviewslice(
2204  struct __pyx_memoryview_obj *memview,
2205  int ndim,
2206  __Pyx_memviewslice *memviewslice,
2207  int memview_is_new_reference);
2208 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2209  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2210 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2211  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2212 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2213 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2214 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2215 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2216 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2217 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2218 
2219 /* CIntFromPy.proto */
2220 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2221 
2222 /* CIntToPy.proto */
2223 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2224 
2225 /* CIntFromPy.proto */
2226 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2227 
2228 /* CheckBinaryVersion.proto */
2229 static int __Pyx_check_binary_version(void);
2230 
2231 /* InitStrings.proto */
2232 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2233 
2234 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2235 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2236 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2237 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2238 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*/
2239 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2240 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2241 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2242 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2243 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2244 
2245 /* Module declarations from 'cpython.buffer' */
2246 
2247 /* Module declarations from 'libc.string' */
2248 
2249 /* Module declarations from 'libc.stdio' */
2250 
2251 /* Module declarations from '__builtin__' */
2252 
2253 /* Module declarations from 'cpython.type' */
2254 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2255 
2256 /* Module declarations from 'cpython' */
2257 
2258 /* Module declarations from 'cpython.object' */
2259 
2260 /* Module declarations from 'cpython.ref' */
2261 
2262 /* Module declarations from 'cpython.mem' */
2263 
2264 /* Module declarations from 'numpy' */
2265 
2266 /* Module declarations from 'numpy' */
2267 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2268 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2269 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2270 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2271 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2272 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2273 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2274 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2275 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2276 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2277 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2278 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2279 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2280 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2281 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2282 
2283 /* Module declarations from 'libcpp' */
2284 
2285 /* Module declarations from 'flcbdfWrappers' */
2286 static PyTypeObject *__pyx_ptype_14flcbdfWrappers_FLCBDF_integrator = 0;
2287 static PyTypeObject *__pyx_array_type = 0;
2288 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2289 static PyTypeObject *__pyx_memoryview_type = 0;
2290 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2291 static PyObject *generic = 0;
2292 static PyObject *strided = 0;
2293 static PyObject *indirect = 0;
2294 static PyObject *contiguous = 0;
2295 static PyObject *indirect_contiguous = 0;
2296 static int __pyx_memoryview_thread_locks_used;
2297 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2298 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2299 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2300 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2301 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2302 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2303 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2304 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2305 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*/
2306 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2307 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2308 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2309 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2310 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2311 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2312 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2313 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2314 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2315 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2316 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2317 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2318 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2319 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2320 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2321 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2322 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2323 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2324 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2325 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2326 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2327 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2328 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2329 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2330 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2331 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
2332 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2333 #define __Pyx_MODULE_NAME "flcbdfWrappers"
2334 extern int __pyx_module_is_main_flcbdfWrappers;
2335 int __pyx_module_is_main_flcbdfWrappers = 0;
2336 
2337 /* Implementation of 'flcbdfWrappers' */
2338 static PyObject *__pyx_builtin_TypeError;
2339 static PyObject *__pyx_builtin_ImportError;
2340 static PyObject *__pyx_builtin_ValueError;
2341 static PyObject *__pyx_builtin_MemoryError;
2342 static PyObject *__pyx_builtin_enumerate;
2343 static PyObject *__pyx_builtin_range;
2344 static PyObject *__pyx_builtin_Ellipsis;
2345 static PyObject *__pyx_builtin_id;
2346 static PyObject *__pyx_builtin_IndexError;
2347 static const char __pyx_k_O[] = "O";
2348 static const char __pyx_k_T[] = "T{";
2349  static const char __pyx_k_c[] = "c";
2350  static const char __pyx_k_s[] = "(%s)";
2351  static const char __pyx_k_t[] = "t";
2352  static const char __pyx_k_y[] = "y";
2353  static const char __pyx_k_Dy[] = "Dy";
2354  static const char __pyx_k_dV[] = "dV";
2355  static const char __pyx_k_id[] = "id";
2356  static const char __pyx_k_np[] = "np";
2357  static const char __pyx_k_t0[] = "t0";
2358  static const char __pyx_k__24[] = "^";
2359  static const char __pyx_k__25[] = "";
2360  static const char __pyx_k__26[] = ":";
2361 static const char __pyx_k__27[] = "}";
2362 static const char __pyx_k__28[] = ",";
2363 static const char __pyx_k_new[] = "__new__";
2364 static const char __pyx_k_obj[] = "obj";
2365 static const char __pyx_k_atol[] = "atol";
2366 static const char __pyx_k_base[] = "base";
2367 static const char __pyx_k_dict[] = "__dict__";
2368 static const char __pyx_k_join[] = "join";
2369 static const char __pyx_k_main[] = "__main__";
2370 static const char __pyx_k_mode[] = "mode";
2371 static const char __pyx_k_name[] = "name";
2372 static const char __pyx_k_ndim[] = "ndim";
2373 static const char __pyx_k_pack[] = "pack";
2374 static const char __pyx_k_rtol[] = "rtol";
2375 static const char __pyx_k_size[] = "size";
2376 static const char __pyx_k_step[] = "step";
2377 static const char __pyx_k_stop[] = "stop";
2378 static const char __pyx_k_tOut[] = "tOut";
2379 static const char __pyx_k_test[] = "__test__";
2380 static const char __pyx_k_tout[] = "tout";
2381 static const char __pyx_k_ASCII[] = "ASCII";
2382 static const char __pyx_k_class[] = "__class__";
2383 static const char __pyx_k_error[] = "error";
2384 static const char __pyx_k_flags[] = "flags";
2385 static const char __pyx_k_numpy[] = "numpy";
2386 static const char __pyx_k_range[] = "range";
2387 static const char __pyx_k_shape[] = "shape";
2388 static const char __pyx_k_start[] = "start";
2389 static const char __pyx_k_yName[] = "yName";
2390 static const char __pyx_k_encode[] = "encode";
2391 static const char __pyx_k_format[] = "format";
2392 static const char __pyx_k_import[] = "__import__";
2393 static const char __pyx_k_name_2[] = "__name__";
2394 static const char __pyx_k_pickle[] = "pickle";
2395 static const char __pyx_k_reduce[] = "__reduce__";
2396 static const char __pyx_k_struct[] = "struct";
2397 static const char __pyx_k_unpack[] = "unpack";
2398 static const char __pyx_k_update[] = "update";
2399 static const char __pyx_k_yPrime[] = "yPrime";
2400 static const char __pyx_k_yprime[] = "yprime";
2401 static const char __pyx_k_Dyprime[] = "Dyprime";
2402 static const char __pyx_k_asarray[] = "asarray";
2403 static const char __pyx_k_fortran[] = "fortran";
2404 static const char __pyx_k_memview[] = "memview";
2405 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2406 static const char __pyx_k_getstate[] = "__getstate__";
2407 static const char __pyx_k_itemsize[] = "itemsize";
2408 static const char __pyx_k_pyx_type[] = "__pyx_type";
2409 static const char __pyx_k_setstate[] = "__setstate__";
2410 static const char __pyx_k_TypeError[] = "TypeError";
2411 static const char __pyx_k_enumerate[] = "enumerate";
2412 static const char __pyx_k_pyx_state[] = "__pyx_state";
2413 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2414 static const char __pyx_k_IndexError[] = "IndexError";
2415 static const char __pyx_k_ValueError[] = "ValueError";
2416 static const char __pyx_k_pyx_result[] = "__pyx_result";
2417 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2418 static const char __pyx_k_ImportError[] = "ImportError";
2419 static const char __pyx_k_MemoryError[] = "MemoryError";
2420 static const char __pyx_k_PickleError[] = "PickleError";
2421 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2422 static const char __pyx_k_stringsource[] = "stringsource";
2423 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2424 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2425 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2426 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2427 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2428 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2429 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2430 static const char __pyx_k_FLCBDF_integrator[] = "FLCBDF_integrator";
2431 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2432 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2433 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2434 static const char __pyx_k_data__0_d___1_s_txt[] = "data_{0:d}_{1:s}.txt";
2435 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2436 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2437 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2438 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2439 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2440 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2441 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2442 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2443 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2444 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2445 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2446 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2447 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2448 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2449 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2450 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2451 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2452 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2453 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2454 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2455 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2456 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2457 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2458 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2459 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2460 static PyObject *__pyx_n_s_ASCII;
2461 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2462 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2463 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2464 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2465 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2466 static PyObject *__pyx_n_s_Dy;
2467 static PyObject *__pyx_n_s_Dyprime;
2468 static PyObject *__pyx_n_s_Ellipsis;
2469 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2470 static PyObject *__pyx_n_s_FLCBDF_integrator;
2471 static PyObject *__pyx_n_s_ImportError;
2472 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2473 static PyObject *__pyx_n_s_IndexError;
2474 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2475 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2476 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2477 static PyObject *__pyx_n_s_MemoryError;
2478 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2479 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2480 static PyObject *__pyx_n_b_O;
2481 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2482 static PyObject *__pyx_n_s_PickleError;
2483 static PyObject *__pyx_kp_b_T;
2484 static PyObject *__pyx_n_s_TypeError;
2485 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2486 static PyObject *__pyx_n_s_ValueError;
2487 static PyObject *__pyx_n_s_View_MemoryView;
2488 static PyObject *__pyx_kp_b__24;
2489 static PyObject *__pyx_kp_b__25;
2490 static PyObject *__pyx_kp_b__26;
2491 static PyObject *__pyx_kp_b__27;
2492 static PyObject *__pyx_kp_u__28;
2493 static PyObject *__pyx_n_s_allocate_buffer;
2494 static PyObject *__pyx_n_s_asarray;
2495 static PyObject *__pyx_n_s_atol;
2496 static PyObject *__pyx_n_s_base;
2497 static PyObject *__pyx_n_s_c;
2498 static PyObject *__pyx_n_u_c;
2499 static PyObject *__pyx_n_s_class;
2500 static PyObject *__pyx_n_s_cline_in_traceback;
2501 static PyObject *__pyx_kp_s_contiguous_and_direct;
2502 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2503 static PyObject *__pyx_n_s_dV;
2504 static PyObject *__pyx_kp_s_data__0_d___1_s_txt;
2505 static PyObject *__pyx_n_s_dict;
2506 static PyObject *__pyx_n_s_dtype_is_object;
2507 static PyObject *__pyx_n_s_encode;
2508 static PyObject *__pyx_n_s_enumerate;
2509 static PyObject *__pyx_n_s_error;
2510 static PyObject *__pyx_n_s_flags;
2511 static PyObject *__pyx_n_s_format;
2512 static PyObject *__pyx_n_s_fortran;
2513 static PyObject *__pyx_n_u_fortran;
2514 static PyObject *__pyx_n_s_getstate;
2515 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2516 static PyObject *__pyx_n_s_id;
2517 static PyObject *__pyx_n_s_import;
2518 static PyObject *__pyx_n_s_itemsize;
2519 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2520 static PyObject *__pyx_n_s_join;
2521 static PyObject *__pyx_n_s_main;
2522 static PyObject *__pyx_n_s_memview;
2523 static PyObject *__pyx_n_s_mode;
2524 static PyObject *__pyx_n_s_name;
2525 static PyObject *__pyx_n_s_name_2;
2526 static PyObject *__pyx_n_s_ndim;
2527 static PyObject *__pyx_n_s_new;
2528 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2529 static PyObject *__pyx_n_s_np;
2530 static PyObject *__pyx_n_s_numpy;
2531 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2532 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2533 static PyObject *__pyx_n_s_obj;
2534 static PyObject *__pyx_n_s_pack;
2535 static PyObject *__pyx_n_s_pickle;
2536 static PyObject *__pyx_n_s_pyx_PickleError;
2537 static PyObject *__pyx_n_s_pyx_checksum;
2538 static PyObject *__pyx_n_s_pyx_getbuffer;
2539 static PyObject *__pyx_n_s_pyx_result;
2540 static PyObject *__pyx_n_s_pyx_state;
2541 static PyObject *__pyx_n_s_pyx_type;
2542 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2543 static PyObject *__pyx_n_s_pyx_vtable;
2544 static PyObject *__pyx_n_s_range;
2545 static PyObject *__pyx_n_s_reduce;
2546 static PyObject *__pyx_n_s_reduce_cython;
2547 static PyObject *__pyx_n_s_reduce_ex;
2548 static PyObject *__pyx_n_s_rtol;
2549 static PyObject *__pyx_kp_u_s;
2550 static PyObject *__pyx_n_s_setstate;
2551 static PyObject *__pyx_n_s_setstate_cython;
2552 static PyObject *__pyx_n_s_shape;
2553 static PyObject *__pyx_n_s_size;
2554 static PyObject *__pyx_n_s_start;
2555 static PyObject *__pyx_n_s_step;
2556 static PyObject *__pyx_n_s_stop;
2557 static PyObject *__pyx_kp_s_strided_and_direct;
2558 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2559 static PyObject *__pyx_kp_s_strided_and_indirect;
2560 static PyObject *__pyx_kp_s_stringsource;
2561 static PyObject *__pyx_n_s_struct;
2562 static PyObject *__pyx_n_s_t;
2563 static PyObject *__pyx_n_s_t0;
2564 static PyObject *__pyx_n_s_tOut;
2565 static PyObject *__pyx_n_s_test;
2566 static PyObject *__pyx_n_s_tout;
2567 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2568 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2569 static PyObject *__pyx_n_s_unpack;
2570 static PyObject *__pyx_n_s_update;
2571 static PyObject *__pyx_n_s_y;
2572 static PyObject *__pyx_n_s_yName;
2573 static PyObject *__pyx_n_s_yPrime;
2574 static PyObject *__pyx_n_s_yprime;
2575 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_choose_dt(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_t, double __pyx_v_tout); /* proto */
2576 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_2set_dt(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_DT); /* proto */
2577 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_4set_order(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, int __pyx_v_k); /* proto */
2578 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_6initialize_dt(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_t0, double __pyx_v_tOut, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_yPrime); /* proto */
2579 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_8setInitialGuess(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y); /* proto */
2580 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_10lastStepErrorOk(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y); /* proto */
2581 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_12calculate_yprime(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_Dy, PyArrayObject *__pyx_v_yprime, PyArrayObject *__pyx_v_Dyprime); /* proto */
2582 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_14stepTaken(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y); /* proto */
2583 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_16retryStep_errorFailure(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self); /* proto */
2584 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_18retryStep_solverFailure(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self); /* proto */
2585 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_20initializeTimeHistory(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_yPrime); /* proto */
2586 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_22setTolerances(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_atol, double __pyx_v_rtol, PyArrayObject *__pyx_v_dV); /* proto */
2587 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_24getCurrentAlpha(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self); /* proto */
2588 static int __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_26__cinit__(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y, PyObject *__pyx_v_yName); /* proto */
2589 static void __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_28__dealloc__(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self); /* proto */
2590 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self); /* proto */
2591 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2592 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 */
2593 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 */
2594 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2595 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2596 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2597 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2598 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
2599 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 */
2600 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
2601 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 */
2602 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2603 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2604 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2605 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2606 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 */
2607 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2608 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
2609 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 */
2610 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 */
2611 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2612 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2613 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2614 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2615 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2616 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2617 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2618 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2619 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2620 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2621 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2622 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2623 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2624 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2625 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2626 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2627 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2628 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 */
2629 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2630 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2631 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2632 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 */
2633 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 */
2634 static PyObject *__pyx_tp_new_14flcbdfWrappers_FLCBDF_integrator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2635 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2636 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2637 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2638 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2639 static PyObject *__pyx_int_0;
2640 static PyObject *__pyx_int_1;
2641 static PyObject *__pyx_int_112105877;
2642 static PyObject *__pyx_int_136983863;
2643 static PyObject *__pyx_int_184977713;
2644 static PyObject *__pyx_int_neg_1;
2645 static PyObject *__pyx_slice_;
2646 static PyObject *__pyx_tuple__2;
2647 static PyObject *__pyx_tuple__3;
2648 static PyObject *__pyx_tuple__4;
2649 static PyObject *__pyx_tuple__5;
2650 static PyObject *__pyx_tuple__6;
2651 static PyObject *__pyx_tuple__7;
2652 static PyObject *__pyx_tuple__8;
2653 static PyObject *__pyx_tuple__9;
2654 static PyObject *__pyx_tuple__10;
2655 static PyObject *__pyx_tuple__11;
2656 static PyObject *__pyx_tuple__12;
2657 static PyObject *__pyx_tuple__13;
2658 static PyObject *__pyx_tuple__14;
2659 static PyObject *__pyx_tuple__15;
2660 static PyObject *__pyx_tuple__16;
2661 static PyObject *__pyx_tuple__17;
2662 static PyObject *__pyx_tuple__18;
2663 static PyObject *__pyx_tuple__19;
2664 static PyObject *__pyx_tuple__20;
2665 static PyObject *__pyx_tuple__21;
2666 static PyObject *__pyx_tuple__22;
2667 static PyObject *__pyx_tuple__23;
2668 static PyObject *__pyx_tuple__29;
2669 static PyObject *__pyx_tuple__30;
2670 static PyObject *__pyx_tuple__31;
2671 static PyObject *__pyx_tuple__32;
2672 static PyObject *__pyx_tuple__33;
2673 static PyObject *__pyx_tuple__34;
2674 static PyObject *__pyx_codeobj__35;
2675 /* Late includes */
2676 
2677 /* "flcbdfWrappers.pyx":6
2678  *
2679  * cdef class FLCBDF_integrator:
2680  * def choose_dt(self, double t, double tout): # <<<<<<<<<<<<<<
2681  * return self.flcbdf.chooseDT(t,tout)
2682  *
2683  */
2684 
2685 /* Python wrapper */
2686 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_1choose_dt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2687 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_1choose_dt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2688  double __pyx_v_t;
2689  double __pyx_v_tout;
2690  int __pyx_lineno = 0;
2691  const char *__pyx_filename = NULL;
2692  int __pyx_clineno = 0;
2693  PyObject *__pyx_r = 0;
2694  __Pyx_RefNannyDeclarations
2695  __Pyx_RefNannySetupContext("choose_dt (wrapper)", 0);
2696  {
2697  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_tout,0};
2698  PyObject* values[2] = {0,0};
2699  if (unlikely(__pyx_kwds)) {
2700  Py_ssize_t kw_args;
2701  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2702  switch (pos_args) {
2703  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2704  CYTHON_FALLTHROUGH;
2705  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2706  CYTHON_FALLTHROUGH;
2707  case 0: break;
2708  default: goto __pyx_L5_argtuple_error;
2709  }
2710  kw_args = PyDict_Size(__pyx_kwds);
2711  switch (pos_args) {
2712  case 0:
2713  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2714  else goto __pyx_L5_argtuple_error;
2715  CYTHON_FALLTHROUGH;
2716  case 1:
2717  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tout)) != 0)) kw_args--;
2718  else {
2719  __Pyx_RaiseArgtupleInvalid("choose_dt", 1, 2, 2, 1); __PYX_ERR(1, 6, __pyx_L3_error)
2720  }
2721  }
2722  if (unlikely(kw_args > 0)) {
2723  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "choose_dt") < 0)) __PYX_ERR(1, 6, __pyx_L3_error)
2724  }
2725  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
2726  goto __pyx_L5_argtuple_error;
2727  } else {
2728  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2729  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2730  }
2731  __pyx_v_t = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 6, __pyx_L3_error)
2732  __pyx_v_tout = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_tout == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 6, __pyx_L3_error)
2733  }
2734  goto __pyx_L4_argument_unpacking_done;
2735  __pyx_L5_argtuple_error:;
2736  __Pyx_RaiseArgtupleInvalid("choose_dt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 6, __pyx_L3_error)
2737  __pyx_L3_error:;
2738  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.choose_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
2739  __Pyx_RefNannyFinishContext();
2740  return NULL;
2741  __pyx_L4_argument_unpacking_done:;
2742  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_choose_dt(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), __pyx_v_t, __pyx_v_tout);
2743 
2744  /* function exit code */
2745  __Pyx_RefNannyFinishContext();
2746  return __pyx_r;
2747 }
2748 
2749 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_choose_dt(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_t, double __pyx_v_tout) {
2750  PyObject *__pyx_r = NULL;
2751  __Pyx_RefNannyDeclarations
2752  PyObject *__pyx_t_1 = NULL;
2753  int __pyx_lineno = 0;
2754  const char *__pyx_filename = NULL;
2755  int __pyx_clineno = 0;
2756  __Pyx_RefNannySetupContext("choose_dt", 0);
2757 
2758  /* "flcbdfWrappers.pyx":7
2759  * cdef class FLCBDF_integrator:
2760  * def choose_dt(self, double t, double tout):
2761  * return self.flcbdf.chooseDT(t,tout) # <<<<<<<<<<<<<<
2762  *
2763  * def set_dt(self, double DT):
2764  */
2765  __Pyx_XDECREF(__pyx_r);
2766  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->flcbdf->chooseDT(__pyx_v_t, __pyx_v_tout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
2767  __Pyx_GOTREF(__pyx_t_1);
2768  __pyx_r = __pyx_t_1;
2769  __pyx_t_1 = 0;
2770  goto __pyx_L0;
2771 
2772  /* "flcbdfWrappers.pyx":6
2773  *
2774  * cdef class FLCBDF_integrator:
2775  * def choose_dt(self, double t, double tout): # <<<<<<<<<<<<<<
2776  * return self.flcbdf.chooseDT(t,tout)
2777  *
2778  */
2779 
2780  /* function exit code */
2781  __pyx_L1_error:;
2782  __Pyx_XDECREF(__pyx_t_1);
2783  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.choose_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
2784  __pyx_r = NULL;
2785  __pyx_L0:;
2786  __Pyx_XGIVEREF(__pyx_r);
2787  __Pyx_RefNannyFinishContext();
2788  return __pyx_r;
2789 }
2790 
2791 /* "flcbdfWrappers.pyx":9
2792  * return self.flcbdf.chooseDT(t,tout)
2793  *
2794  * def set_dt(self, double DT): # <<<<<<<<<<<<<<
2795  * self.flcbdf.setDT(DT)
2796  * return DT
2797  */
2798 
2799 /* Python wrapper */
2800 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_3set_dt(PyObject *__pyx_v_self, PyObject *__pyx_arg_DT); /*proto*/
2801 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_3set_dt(PyObject *__pyx_v_self, PyObject *__pyx_arg_DT) {
2802  double __pyx_v_DT;
2803  int __pyx_lineno = 0;
2804  const char *__pyx_filename = NULL;
2805  int __pyx_clineno = 0;
2806  PyObject *__pyx_r = 0;
2807  __Pyx_RefNannyDeclarations
2808  __Pyx_RefNannySetupContext("set_dt (wrapper)", 0);
2809  assert(__pyx_arg_DT); {
2810  __pyx_v_DT = __pyx_PyFloat_AsDouble(__pyx_arg_DT); if (unlikely((__pyx_v_DT == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 9, __pyx_L3_error)
2811  }
2812  goto __pyx_L4_argument_unpacking_done;
2813  __pyx_L3_error:;
2814  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.set_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
2815  __Pyx_RefNannyFinishContext();
2816  return NULL;
2817  __pyx_L4_argument_unpacking_done:;
2818  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_2set_dt(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), ((double)__pyx_v_DT));
2819 
2820  /* function exit code */
2821  __Pyx_RefNannyFinishContext();
2822  return __pyx_r;
2823 }
2824 
2825 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_2set_dt(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_DT) {
2826  PyObject *__pyx_r = NULL;
2827  __Pyx_RefNannyDeclarations
2828  PyObject *__pyx_t_1 = NULL;
2829  int __pyx_lineno = 0;
2830  const char *__pyx_filename = NULL;
2831  int __pyx_clineno = 0;
2832  __Pyx_RefNannySetupContext("set_dt", 0);
2833 
2834  /* "flcbdfWrappers.pyx":10
2835  *
2836  * def set_dt(self, double DT):
2837  * self.flcbdf.setDT(DT) # <<<<<<<<<<<<<<
2838  * return DT
2839  *
2840  */
2841  (void)(__pyx_v_self->flcbdf->setDT(__pyx_v_DT));
2842 
2843  /* "flcbdfWrappers.pyx":11
2844  * def set_dt(self, double DT):
2845  * self.flcbdf.setDT(DT)
2846  * return DT # <<<<<<<<<<<<<<
2847  *
2848  * def set_order(self, int k):
2849  */
2850  __Pyx_XDECREF(__pyx_r);
2851  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_DT); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
2852  __Pyx_GOTREF(__pyx_t_1);
2853  __pyx_r = __pyx_t_1;
2854  __pyx_t_1 = 0;
2855  goto __pyx_L0;
2856 
2857  /* "flcbdfWrappers.pyx":9
2858  * return self.flcbdf.chooseDT(t,tout)
2859  *
2860  * def set_dt(self, double DT): # <<<<<<<<<<<<<<
2861  * self.flcbdf.setDT(DT)
2862  * return DT
2863  */
2864 
2865  /* function exit code */
2866  __pyx_L1_error:;
2867  __Pyx_XDECREF(__pyx_t_1);
2868  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.set_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
2869  __pyx_r = NULL;
2870  __pyx_L0:;
2871  __Pyx_XGIVEREF(__pyx_r);
2872  __Pyx_RefNannyFinishContext();
2873  return __pyx_r;
2874 }
2875 
2876 /* "flcbdfWrappers.pyx":13
2877  * return DT
2878  *
2879  * def set_order(self, int k): # <<<<<<<<<<<<<<
2880  * self.flcbdf.useFixedOrder(k)
2881  * return k
2882  */
2883 
2884 /* Python wrapper */
2885 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_5set_order(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/
2886 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_5set_order(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) {
2887  int __pyx_v_k;
2888  int __pyx_lineno = 0;
2889  const char *__pyx_filename = NULL;
2890  int __pyx_clineno = 0;
2891  PyObject *__pyx_r = 0;
2892  __Pyx_RefNannyDeclarations
2893  __Pyx_RefNannySetupContext("set_order (wrapper)", 0);
2894  assert(__pyx_arg_k); {
2895  __pyx_v_k = __Pyx_PyInt_As_int(__pyx_arg_k); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 13, __pyx_L3_error)
2896  }
2897  goto __pyx_L4_argument_unpacking_done;
2898  __pyx_L3_error:;
2899  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.set_order", __pyx_clineno, __pyx_lineno, __pyx_filename);
2900  __Pyx_RefNannyFinishContext();
2901  return NULL;
2902  __pyx_L4_argument_unpacking_done:;
2903  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_4set_order(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), ((int)__pyx_v_k));
2904 
2905  /* function exit code */
2906  __Pyx_RefNannyFinishContext();
2907  return __pyx_r;
2908 }
2909 
2910 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_4set_order(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, int __pyx_v_k) {
2911  PyObject *__pyx_r = NULL;
2912  __Pyx_RefNannyDeclarations
2913  PyObject *__pyx_t_1 = NULL;
2914  int __pyx_lineno = 0;
2915  const char *__pyx_filename = NULL;
2916  int __pyx_clineno = 0;
2917  __Pyx_RefNannySetupContext("set_order", 0);
2918 
2919  /* "flcbdfWrappers.pyx":14
2920  *
2921  * def set_order(self, int k):
2922  * self.flcbdf.useFixedOrder(k) # <<<<<<<<<<<<<<
2923  * return k
2924  *
2925  */
2926  __pyx_v_self->flcbdf->useFixedOrder(__pyx_v_k);
2927 
2928  /* "flcbdfWrappers.pyx":15
2929  * def set_order(self, int k):
2930  * self.flcbdf.useFixedOrder(k)
2931  * return k # <<<<<<<<<<<<<<
2932  *
2933  * def initialize_dt(self,
2934  */
2935  __Pyx_XDECREF(__pyx_r);
2936  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
2937  __Pyx_GOTREF(__pyx_t_1);
2938  __pyx_r = __pyx_t_1;
2939  __pyx_t_1 = 0;
2940  goto __pyx_L0;
2941 
2942  /* "flcbdfWrappers.pyx":13
2943  * return DT
2944  *
2945  * def set_order(self, int k): # <<<<<<<<<<<<<<
2946  * self.flcbdf.useFixedOrder(k)
2947  * return k
2948  */
2949 
2950  /* function exit code */
2951  __pyx_L1_error:;
2952  __Pyx_XDECREF(__pyx_t_1);
2953  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.set_order", __pyx_clineno, __pyx_lineno, __pyx_filename);
2954  __pyx_r = NULL;
2955  __pyx_L0:;
2956  __Pyx_XGIVEREF(__pyx_r);
2957  __Pyx_RefNannyFinishContext();
2958  return __pyx_r;
2959 }
2960 
2961 /* "flcbdfWrappers.pyx":17
2962  * return k
2963  *
2964  * def initialize_dt(self, # <<<<<<<<<<<<<<
2965  * double t0,
2966  * double tOut,
2967  */
2968 
2969 /* Python wrapper */
2970 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_7initialize_dt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2971 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_7initialize_dt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2972  double __pyx_v_t0;
2973  double __pyx_v_tOut;
2974  PyArrayObject *__pyx_v_y = 0;
2975  PyArrayObject *__pyx_v_yPrime = 0;
2976  int __pyx_lineno = 0;
2977  const char *__pyx_filename = NULL;
2978  int __pyx_clineno = 0;
2979  PyObject *__pyx_r = 0;
2980  __Pyx_RefNannyDeclarations
2981  __Pyx_RefNannySetupContext("initialize_dt (wrapper)", 0);
2982  {
2983  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t0,&__pyx_n_s_tOut,&__pyx_n_s_y,&__pyx_n_s_yPrime,0};
2984  PyObject* values[4] = {0,0,0,0};
2985  if (unlikely(__pyx_kwds)) {
2986  Py_ssize_t kw_args;
2987  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2988  switch (pos_args) {
2989  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2990  CYTHON_FALLTHROUGH;
2991  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2992  CYTHON_FALLTHROUGH;
2993  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2994  CYTHON_FALLTHROUGH;
2995  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2996  CYTHON_FALLTHROUGH;
2997  case 0: break;
2998  default: goto __pyx_L5_argtuple_error;
2999  }
3000  kw_args = PyDict_Size(__pyx_kwds);
3001  switch (pos_args) {
3002  case 0:
3003  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t0)) != 0)) kw_args--;
3004  else goto __pyx_L5_argtuple_error;
3005  CYTHON_FALLTHROUGH;
3006  case 1:
3007  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tOut)) != 0)) kw_args--;
3008  else {
3009  __Pyx_RaiseArgtupleInvalid("initialize_dt", 1, 4, 4, 1); __PYX_ERR(1, 17, __pyx_L3_error)
3010  }
3011  CYTHON_FALLTHROUGH;
3012  case 2:
3013  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
3014  else {
3015  __Pyx_RaiseArgtupleInvalid("initialize_dt", 1, 4, 4, 2); __PYX_ERR(1, 17, __pyx_L3_error)
3016  }
3017  CYTHON_FALLTHROUGH;
3018  case 3:
3019  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yPrime)) != 0)) kw_args--;
3020  else {
3021  __Pyx_RaiseArgtupleInvalid("initialize_dt", 1, 4, 4, 3); __PYX_ERR(1, 17, __pyx_L3_error)
3022  }
3023  }
3024  if (unlikely(kw_args > 0)) {
3025  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_dt") < 0)) __PYX_ERR(1, 17, __pyx_L3_error)
3026  }
3027  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
3028  goto __pyx_L5_argtuple_error;
3029  } else {
3030  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3031  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3032  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3033  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3034  }
3035  __pyx_v_t0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_t0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 18, __pyx_L3_error)
3036  __pyx_v_tOut = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_tOut == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 19, __pyx_L3_error)
3037  __pyx_v_y = ((PyArrayObject *)values[2]);
3038  __pyx_v_yPrime = ((PyArrayObject *)values[3]);
3039  }
3040  goto __pyx_L4_argument_unpacking_done;
3041  __pyx_L5_argtuple_error:;
3042  __Pyx_RaiseArgtupleInvalid("initialize_dt", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 17, __pyx_L3_error)
3043  __pyx_L3_error:;
3044  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.initialize_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
3045  __Pyx_RefNannyFinishContext();
3046  return NULL;
3047  __pyx_L4_argument_unpacking_done:;
3048  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 20, __pyx_L1_error)
3049  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yPrime), __pyx_ptype_5numpy_ndarray, 1, "yPrime", 0))) __PYX_ERR(1, 21, __pyx_L1_error)
3050  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_6initialize_dt(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), __pyx_v_t0, __pyx_v_tOut, __pyx_v_y, __pyx_v_yPrime);
3051 
3052  /* function exit code */
3053  goto __pyx_L0;
3054  __pyx_L1_error:;
3055  __pyx_r = NULL;
3056  __pyx_L0:;
3057  __Pyx_RefNannyFinishContext();
3058  return __pyx_r;
3059 }
3060 
3061 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_6initialize_dt(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_t0, double __pyx_v_tOut, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_yPrime) {
3062  Daetk::Petsc::Vec *__pyx_v_yVec;
3063  Daetk::Petsc::Vec *__pyx_v_yPrimeVec;
3064  double __pyx_v_DT;
3065  PyObject *__pyx_r = NULL;
3066  __Pyx_RefNannyDeclarations
3067  PyObject *__pyx_t_1 = NULL;
3068  int __pyx_lineno = 0;
3069  const char *__pyx_filename = NULL;
3070  int __pyx_clineno = 0;
3071  __Pyx_RefNannySetupContext("initialize_dt", 0);
3072 
3073  /* "flcbdfWrappers.pyx":22
3074  * np.ndarray y,
3075  * np.ndarray yPrime):
3076  * cdef Vec *yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3077  * cdef Vec *yPrimeVec = new Vec(REF, <double*>(yPrime.data),self.flcbdf.yn.ldim_)
3078  * DT = self.flcbdf.chooseInitialStepSize(t0,tOut,yVec[0],yPrimeVec[0])
3079  */
3080  __pyx_v_yVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_y->data), __pyx_v_self->flcbdf->yn.ldim_);
3081 
3082  /* "flcbdfWrappers.pyx":23
3083  * np.ndarray yPrime):
3084  * cdef Vec *yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_)
3085  * cdef Vec *yPrimeVec = new Vec(REF, <double*>(yPrime.data),self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3086  * DT = self.flcbdf.chooseInitialStepSize(t0,tOut,yVec[0],yPrimeVec[0])
3087  * del yVec
3088  */
3089  __pyx_v_yPrimeVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_yPrime->data), __pyx_v_self->flcbdf->yn.ldim_);
3090 
3091  /* "flcbdfWrappers.pyx":24
3092  * cdef Vec *yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_)
3093  * cdef Vec *yPrimeVec = new Vec(REF, <double*>(yPrime.data),self.flcbdf.yn.ldim_)
3094  * DT = self.flcbdf.chooseInitialStepSize(t0,tOut,yVec[0],yPrimeVec[0]) # <<<<<<<<<<<<<<
3095  * del yVec
3096  * del yPrimeVec
3097  */
3098  __pyx_v_DT = __pyx_v_self->flcbdf->chooseInitialStepSize(__pyx_v_t0, __pyx_v_tOut, (__pyx_v_yVec[0]), (__pyx_v_yPrimeVec[0]));
3099 
3100  /* "flcbdfWrappers.pyx":25
3101  * cdef Vec *yPrimeVec = new Vec(REF, <double*>(yPrime.data),self.flcbdf.yn.ldim_)
3102  * DT = self.flcbdf.chooseInitialStepSize(t0,tOut,yVec[0],yPrimeVec[0])
3103  * del yVec # <<<<<<<<<<<<<<
3104  * del yPrimeVec
3105  * return DT
3106  */
3107  delete __pyx_v_yVec;
3108 
3109  /* "flcbdfWrappers.pyx":26
3110  * DT = self.flcbdf.chooseInitialStepSize(t0,tOut,yVec[0],yPrimeVec[0])
3111  * del yVec
3112  * del yPrimeVec # <<<<<<<<<<<<<<
3113  * return DT
3114  *
3115  */
3116  delete __pyx_v_yPrimeVec;
3117 
3118  /* "flcbdfWrappers.pyx":27
3119  * del yVec
3120  * del yPrimeVec
3121  * return DT # <<<<<<<<<<<<<<
3122  *
3123  * def setInitialGuess(self, np.ndarray y):
3124  */
3125  __Pyx_XDECREF(__pyx_r);
3126  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_DT); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 27, __pyx_L1_error)
3127  __Pyx_GOTREF(__pyx_t_1);
3128  __pyx_r = __pyx_t_1;
3129  __pyx_t_1 = 0;
3130  goto __pyx_L0;
3131 
3132  /* "flcbdfWrappers.pyx":17
3133  * return k
3134  *
3135  * def initialize_dt(self, # <<<<<<<<<<<<<<
3136  * double t0,
3137  * double tOut,
3138  */
3139 
3140  /* function exit code */
3141  __pyx_L1_error:;
3142  __Pyx_XDECREF(__pyx_t_1);
3143  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.initialize_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
3144  __pyx_r = NULL;
3145  __pyx_L0:;
3146  __Pyx_XGIVEREF(__pyx_r);
3147  __Pyx_RefNannyFinishContext();
3148  return __pyx_r;
3149 }
3150 
3151 /* "flcbdfWrappers.pyx":29
3152  * return DT
3153  *
3154  * def setInitialGuess(self, np.ndarray y): # <<<<<<<<<<<<<<
3155  * yn = np.asarray(<double[:self.flcbdf.yn.ldim_]> self.flcbdf.yn.p_)
3156  * y[:] = yn
3157  */
3158 
3159 /* Python wrapper */
3160 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_9setInitialGuess(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/
3161 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_9setInitialGuess(PyObject *__pyx_v_self, PyObject *__pyx_v_y) {
3162  int __pyx_lineno = 0;
3163  const char *__pyx_filename = NULL;
3164  int __pyx_clineno = 0;
3165  PyObject *__pyx_r = 0;
3166  __Pyx_RefNannyDeclarations
3167  __Pyx_RefNannySetupContext("setInitialGuess (wrapper)", 0);
3168  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 29, __pyx_L1_error)
3169  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_8setInitialGuess(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), ((PyArrayObject *)__pyx_v_y));
3170 
3171  /* function exit code */
3172  goto __pyx_L0;
3173  __pyx_L1_error:;
3174  __pyx_r = NULL;
3175  __pyx_L0:;
3176  __Pyx_RefNannyFinishContext();
3177  return __pyx_r;
3178 }
3179 
3180 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_8setInitialGuess(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y) {
3181  PyObject *__pyx_v_yn = NULL;
3182  PyObject *__pyx_r = NULL;
3183  __Pyx_RefNannyDeclarations
3184  PyObject *__pyx_t_1 = NULL;
3185  PyObject *__pyx_t_2 = NULL;
3186  PyObject *__pyx_t_3 = NULL;
3187  double *__pyx_t_4;
3188  struct __pyx_array_obj *__pyx_t_5 = NULL;
3189  PyObject *__pyx_t_6 = NULL;
3190  int __pyx_lineno = 0;
3191  const char *__pyx_filename = NULL;
3192  int __pyx_clineno = 0;
3193  __Pyx_RefNannySetupContext("setInitialGuess", 0);
3194 
3195  /* "flcbdfWrappers.pyx":30
3196  *
3197  * def setInitialGuess(self, np.ndarray y):
3198  * yn = np.asarray(<double[:self.flcbdf.yn.ldim_]> self.flcbdf.yn.p_) # <<<<<<<<<<<<<<
3199  * y[:] = yn
3200  *
3201  */
3202  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
3203  __Pyx_GOTREF(__pyx_t_2);
3204  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 30, __pyx_L1_error)
3205  __Pyx_GOTREF(__pyx_t_3);
3206  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3207  __pyx_t_4 = __pyx_v_self->flcbdf->yn.p_;
3208  if (!__pyx_t_4) {
3209  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3210  __PYX_ERR(1, 30, __pyx_L1_error)
3211  }
3212  __pyx_t_6 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 30, __pyx_L1_error)
3213  __Pyx_GOTREF(__pyx_t_6);
3214  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->flcbdf->yn.ldim_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
3215  __Pyx_GOTREF(__pyx_t_2);
3216  __pyx_t_5 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_6), (char *) "c", (char *) __pyx_t_4);
3217  if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 30, __pyx_L1_error)
3218  __Pyx_GOTREF(__pyx_t_5);
3219  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3220  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3221  __pyx_t_6 = NULL;
3222  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3223  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
3224  if (likely(__pyx_t_6)) {
3225  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3226  __Pyx_INCREF(__pyx_t_6);
3227  __Pyx_INCREF(function);
3228  __Pyx_DECREF_SET(__pyx_t_3, function);
3229  }
3230  }
3231  __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));
3232  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3233  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3234  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error)
3235  __Pyx_GOTREF(__pyx_t_1);
3236  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3237  __pyx_v_yn = __pyx_t_1;
3238  __pyx_t_1 = 0;
3239 
3240  /* "flcbdfWrappers.pyx":31
3241  * def setInitialGuess(self, np.ndarray y):
3242  * yn = np.asarray(<double[:self.flcbdf.yn.ldim_]> self.flcbdf.yn.p_)
3243  * y[:] = yn # <<<<<<<<<<<<<<
3244  *
3245  * def lastStepErrorOk(self, np.ndarray y):
3246  */
3247  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_y), __pyx_v_yn, 0, 0, NULL, NULL, &__pyx_slice_, 0, 0, 1) < 0) __PYX_ERR(1, 31, __pyx_L1_error)
3248 
3249  /* "flcbdfWrappers.pyx":29
3250  * return DT
3251  *
3252  * def setInitialGuess(self, np.ndarray y): # <<<<<<<<<<<<<<
3253  * yn = np.asarray(<double[:self.flcbdf.yn.ldim_]> self.flcbdf.yn.p_)
3254  * y[:] = yn
3255  */
3256 
3257  /* function exit code */
3258  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3259  goto __pyx_L0;
3260  __pyx_L1_error:;
3261  __Pyx_XDECREF(__pyx_t_1);
3262  __Pyx_XDECREF(__pyx_t_2);
3263  __Pyx_XDECREF(__pyx_t_3);
3264  __Pyx_XDECREF(((PyObject *)__pyx_t_5));
3265  __Pyx_XDECREF(__pyx_t_6);
3266  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.setInitialGuess", __pyx_clineno, __pyx_lineno, __pyx_filename);
3267  __pyx_r = NULL;
3268  __pyx_L0:;
3269  __Pyx_XDECREF(__pyx_v_yn);
3270  __Pyx_XGIVEREF(__pyx_r);
3271  __Pyx_RefNannyFinishContext();
3272  return __pyx_r;
3273 }
3274 
3275 /* "flcbdfWrappers.pyx":33
3276  * y[:] = yn
3277  *
3278  * def lastStepErrorOk(self, np.ndarray y): # <<<<<<<<<<<<<<
3279  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3280  * Ok = not self.flcbdf.errorForStepTooLarge(yVec[0])
3281  */
3282 
3283 /* Python wrapper */
3284 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_11lastStepErrorOk(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/
3285 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_11lastStepErrorOk(PyObject *__pyx_v_self, PyObject *__pyx_v_y) {
3286  int __pyx_lineno = 0;
3287  const char *__pyx_filename = NULL;
3288  int __pyx_clineno = 0;
3289  PyObject *__pyx_r = 0;
3290  __Pyx_RefNannyDeclarations
3291  __Pyx_RefNannySetupContext("lastStepErrorOk (wrapper)", 0);
3292  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 33, __pyx_L1_error)
3293  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_10lastStepErrorOk(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), ((PyArrayObject *)__pyx_v_y));
3294 
3295  /* function exit code */
3296  goto __pyx_L0;
3297  __pyx_L1_error:;
3298  __pyx_r = NULL;
3299  __pyx_L0:;
3300  __Pyx_RefNannyFinishContext();
3301  return __pyx_r;
3302 }
3303 
3304 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_10lastStepErrorOk(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y) {
3305  Daetk::Petsc::Vec *__pyx_v_yVec;
3306  int __pyx_v_Ok;
3307  PyObject *__pyx_r = NULL;
3308  __Pyx_RefNannyDeclarations
3309  PyObject *__pyx_t_1 = NULL;
3310  PyObject *__pyx_t_2 = NULL;
3311  int __pyx_lineno = 0;
3312  const char *__pyx_filename = NULL;
3313  int __pyx_clineno = 0;
3314  __Pyx_RefNannySetupContext("lastStepErrorOk", 0);
3315 
3316  /* "flcbdfWrappers.pyx":34
3317  *
3318  * def lastStepErrorOk(self, np.ndarray y):
3319  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3320  * Ok = not self.flcbdf.errorForStepTooLarge(yVec[0])
3321  * del yVec
3322  */
3323  __pyx_v_yVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_y->data), __pyx_v_self->flcbdf->yn.ldim_);
3324 
3325  /* "flcbdfWrappers.pyx":35
3326  * def lastStepErrorOk(self, np.ndarray y):
3327  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3328  * Ok = not self.flcbdf.errorForStepTooLarge(yVec[0]) # <<<<<<<<<<<<<<
3329  * del yVec
3330  * return int(Ok)
3331  */
3332  __pyx_v_Ok = (!(__pyx_v_self->flcbdf->errorForStepTooLarge((__pyx_v_yVec[0])) != 0));
3333 
3334  /* "flcbdfWrappers.pyx":36
3335  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3336  * Ok = not self.flcbdf.errorForStepTooLarge(yVec[0])
3337  * del yVec # <<<<<<<<<<<<<<
3338  * return int(Ok)
3339  *
3340  */
3341  delete __pyx_v_yVec;
3342 
3343  /* "flcbdfWrappers.pyx":37
3344  * Ok = not self.flcbdf.errorForStepTooLarge(yVec[0])
3345  * del yVec
3346  * return int(Ok) # <<<<<<<<<<<<<<
3347  *
3348  * def calculate_yprime(self,
3349  */
3350  __Pyx_XDECREF(__pyx_r);
3351  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_Ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 37, __pyx_L1_error)
3352  __Pyx_GOTREF(__pyx_t_1);
3353  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
3354  __Pyx_GOTREF(__pyx_t_2);
3355  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3356  __pyx_r = __pyx_t_2;
3357  __pyx_t_2 = 0;
3358  goto __pyx_L0;
3359 
3360  /* "flcbdfWrappers.pyx":33
3361  * y[:] = yn
3362  *
3363  * def lastStepErrorOk(self, np.ndarray y): # <<<<<<<<<<<<<<
3364  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3365  * Ok = not self.flcbdf.errorForStepTooLarge(yVec[0])
3366  */
3367 
3368  /* function exit code */
3369  __pyx_L1_error:;
3370  __Pyx_XDECREF(__pyx_t_1);
3371  __Pyx_XDECREF(__pyx_t_2);
3372  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.lastStepErrorOk", __pyx_clineno, __pyx_lineno, __pyx_filename);
3373  __pyx_r = NULL;
3374  __pyx_L0:;
3375  __Pyx_XGIVEREF(__pyx_r);
3376  __Pyx_RefNannyFinishContext();
3377  return __pyx_r;
3378 }
3379 
3380 /* "flcbdfWrappers.pyx":39
3381  * return int(Ok)
3382  *
3383  * def calculate_yprime(self, # <<<<<<<<<<<<<<
3384  * np.ndarray y,
3385  * np.ndarray Dy,
3386  */
3387 
3388 /* Python wrapper */
3389 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_13calculate_yprime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3390 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_13calculate_yprime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3391  PyArrayObject *__pyx_v_y = 0;
3392  PyArrayObject *__pyx_v_Dy = 0;
3393  PyArrayObject *__pyx_v_yprime = 0;
3394  PyArrayObject *__pyx_v_Dyprime = 0;
3395  int __pyx_lineno = 0;
3396  const char *__pyx_filename = NULL;
3397  int __pyx_clineno = 0;
3398  PyObject *__pyx_r = 0;
3399  __Pyx_RefNannyDeclarations
3400  __Pyx_RefNannySetupContext("calculate_yprime (wrapper)", 0);
3401  {
3402  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_Dy,&__pyx_n_s_yprime,&__pyx_n_s_Dyprime,0};
3403  PyObject* values[4] = {0,0,0,0};
3404  if (unlikely(__pyx_kwds)) {
3405  Py_ssize_t kw_args;
3406  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3407  switch (pos_args) {
3408  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3409  CYTHON_FALLTHROUGH;
3410  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3411  CYTHON_FALLTHROUGH;
3412  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3413  CYTHON_FALLTHROUGH;
3414  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3415  CYTHON_FALLTHROUGH;
3416  case 0: break;
3417  default: goto __pyx_L5_argtuple_error;
3418  }
3419  kw_args = PyDict_Size(__pyx_kwds);
3420  switch (pos_args) {
3421  case 0:
3422  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
3423  else goto __pyx_L5_argtuple_error;
3424  CYTHON_FALLTHROUGH;
3425  case 1:
3426  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Dy)) != 0)) kw_args--;
3427  else {
3428  __Pyx_RaiseArgtupleInvalid("calculate_yprime", 1, 4, 4, 1); __PYX_ERR(1, 39, __pyx_L3_error)
3429  }
3430  CYTHON_FALLTHROUGH;
3431  case 2:
3432  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yprime)) != 0)) kw_args--;
3433  else {
3434  __Pyx_RaiseArgtupleInvalid("calculate_yprime", 1, 4, 4, 2); __PYX_ERR(1, 39, __pyx_L3_error)
3435  }
3436  CYTHON_FALLTHROUGH;
3437  case 3:
3438  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Dyprime)) != 0)) kw_args--;
3439  else {
3440  __Pyx_RaiseArgtupleInvalid("calculate_yprime", 1, 4, 4, 3); __PYX_ERR(1, 39, __pyx_L3_error)
3441  }
3442  }
3443  if (unlikely(kw_args > 0)) {
3444  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_yprime") < 0)) __PYX_ERR(1, 39, __pyx_L3_error)
3445  }
3446  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
3447  goto __pyx_L5_argtuple_error;
3448  } else {
3449  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3450  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3451  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3452  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3453  }
3454  __pyx_v_y = ((PyArrayObject *)values[0]);
3455  __pyx_v_Dy = ((PyArrayObject *)values[1]);
3456  __pyx_v_yprime = ((PyArrayObject *)values[2]);
3457  __pyx_v_Dyprime = ((PyArrayObject *)values[3]);
3458  }
3459  goto __pyx_L4_argument_unpacking_done;
3460  __pyx_L5_argtuple_error:;
3461  __Pyx_RaiseArgtupleInvalid("calculate_yprime", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 39, __pyx_L3_error)
3462  __pyx_L3_error:;
3463  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.calculate_yprime", __pyx_clineno, __pyx_lineno, __pyx_filename);
3464  __Pyx_RefNannyFinishContext();
3465  return NULL;
3466  __pyx_L4_argument_unpacking_done:;
3467  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 40, __pyx_L1_error)
3468  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dy), __pyx_ptype_5numpy_ndarray, 1, "Dy", 0))) __PYX_ERR(1, 41, __pyx_L1_error)
3469  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yprime), __pyx_ptype_5numpy_ndarray, 1, "yprime", 0))) __PYX_ERR(1, 42, __pyx_L1_error)
3470  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dyprime), __pyx_ptype_5numpy_ndarray, 1, "Dyprime", 0))) __PYX_ERR(1, 43, __pyx_L1_error)
3471  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_12calculate_yprime(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), __pyx_v_y, __pyx_v_Dy, __pyx_v_yprime, __pyx_v_Dyprime);
3472 
3473  /* function exit code */
3474  goto __pyx_L0;
3475  __pyx_L1_error:;
3476  __pyx_r = NULL;
3477  __pyx_L0:;
3478  __Pyx_RefNannyFinishContext();
3479  return __pyx_r;
3480 }
3481 
3482 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_12calculate_yprime(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_Dy, PyArrayObject *__pyx_v_yprime, PyArrayObject *__pyx_v_Dyprime) {
3483  PyObject *__pyx_r = NULL;
3484  __Pyx_RefNannyDeclarations
3485  int __pyx_t_1;
3486  __Pyx_RefNannySetupContext("calculate_yprime", 0);
3487 
3488  /* "flcbdfWrappers.pyx":44
3489  * np.ndarray yprime,
3490  * np.ndarray Dyprime):
3491  * if self.yVec is NULL: # <<<<<<<<<<<<<<
3492  * self.yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_)
3493  * self.DyVec = new Vec(REF, <double*>(Dy.data), self.flcbdf.yn.ldim_)
3494  */
3495  __pyx_t_1 = ((__pyx_v_self->yVec == NULL) != 0);
3496  if (__pyx_t_1) {
3497 
3498  /* "flcbdfWrappers.pyx":45
3499  * np.ndarray Dyprime):
3500  * if self.yVec is NULL:
3501  * self.yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3502  * self.DyVec = new Vec(REF, <double*>(Dy.data), self.flcbdf.yn.ldim_)
3503  * self.yprimeVec = new Vec(REF, <double*>(yprime.data), self.flcbdf.yn.ldim_)
3504  */
3505  __pyx_v_self->yVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_y->data), __pyx_v_self->flcbdf->yn.ldim_);
3506 
3507  /* "flcbdfWrappers.pyx":46
3508  * if self.yVec is NULL:
3509  * self.yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_)
3510  * self.DyVec = new Vec(REF, <double*>(Dy.data), self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3511  * self.yprimeVec = new Vec(REF, <double*>(yprime.data), self.flcbdf.yn.ldim_)
3512  * self.DyprimeVec = new Vec(REF, <double*>(Dyprime.data), self.flcbdf.yn.ldim_)
3513  */
3514  __pyx_v_self->DyVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_Dy->data), __pyx_v_self->flcbdf->yn.ldim_);
3515 
3516  /* "flcbdfWrappers.pyx":47
3517  * self.yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_)
3518  * self.DyVec = new Vec(REF, <double*>(Dy.data), self.flcbdf.yn.ldim_)
3519  * self.yprimeVec = new Vec(REF, <double*>(yprime.data), self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3520  * self.DyprimeVec = new Vec(REF, <double*>(Dyprime.data), self.flcbdf.yn.ldim_)
3521  * self.flcbdf.calculate_yprime(self.yVec[0], self.DyVec[0], self.yprimeVec[0], self.DyprimeVec[0])
3522  */
3523  __pyx_v_self->yprimeVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_yprime->data), __pyx_v_self->flcbdf->yn.ldim_);
3524 
3525  /* "flcbdfWrappers.pyx":48
3526  * self.DyVec = new Vec(REF, <double*>(Dy.data), self.flcbdf.yn.ldim_)
3527  * self.yprimeVec = new Vec(REF, <double*>(yprime.data), self.flcbdf.yn.ldim_)
3528  * self.DyprimeVec = new Vec(REF, <double*>(Dyprime.data), self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3529  * self.flcbdf.calculate_yprime(self.yVec[0], self.DyVec[0], self.yprimeVec[0], self.DyprimeVec[0])
3530  *
3531  */
3532  __pyx_v_self->DyprimeVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_Dyprime->data), __pyx_v_self->flcbdf->yn.ldim_);
3533 
3534  /* "flcbdfWrappers.pyx":44
3535  * np.ndarray yprime,
3536  * np.ndarray Dyprime):
3537  * if self.yVec is NULL: # <<<<<<<<<<<<<<
3538  * self.yVec = new Vec(REF, <double*>(y.data), self.flcbdf.yn.ldim_)
3539  * self.DyVec = new Vec(REF, <double*>(Dy.data), self.flcbdf.yn.ldim_)
3540  */
3541  }
3542 
3543  /* "flcbdfWrappers.pyx":49
3544  * self.yprimeVec = new Vec(REF, <double*>(yprime.data), self.flcbdf.yn.ldim_)
3545  * self.DyprimeVec = new Vec(REF, <double*>(Dyprime.data), self.flcbdf.yn.ldim_)
3546  * self.flcbdf.calculate_yprime(self.yVec[0], self.DyVec[0], self.yprimeVec[0], self.DyprimeVec[0]) # <<<<<<<<<<<<<<
3547  *
3548  * def stepTaken(self, np.ndarray y):
3549  */
3550  (void)(__pyx_v_self->flcbdf->calculate_yprime((__pyx_v_self->yVec[0]), (__pyx_v_self->DyVec[0]), (__pyx_v_self->yprimeVec[0]), (__pyx_v_self->DyprimeVec[0])));
3551 
3552  /* "flcbdfWrappers.pyx":39
3553  * return int(Ok)
3554  *
3555  * def calculate_yprime(self, # <<<<<<<<<<<<<<
3556  * np.ndarray y,
3557  * np.ndarray Dy,
3558  */
3559 
3560  /* function exit code */
3561  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3562  __Pyx_XGIVEREF(__pyx_r);
3563  __Pyx_RefNannyFinishContext();
3564  return __pyx_r;
3565 }
3566 
3567 /* "flcbdfWrappers.pyx":51
3568  * self.flcbdf.calculate_yprime(self.yVec[0], self.DyVec[0], self.yprimeVec[0], self.DyprimeVec[0])
3569  *
3570  * def stepTaken(self, np.ndarray y): # <<<<<<<<<<<<<<
3571  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3572  * self.flcbdf.estimateError(yVec[0])
3573  */
3574 
3575 /* Python wrapper */
3576 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_15stepTaken(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/
3577 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_15stepTaken(PyObject *__pyx_v_self, PyObject *__pyx_v_y) {
3578  int __pyx_lineno = 0;
3579  const char *__pyx_filename = NULL;
3580  int __pyx_clineno = 0;
3581  PyObject *__pyx_r = 0;
3582  __Pyx_RefNannyDeclarations
3583  __Pyx_RefNannySetupContext("stepTaken (wrapper)", 0);
3584  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 51, __pyx_L1_error)
3585  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_14stepTaken(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), ((PyArrayObject *)__pyx_v_y));
3586 
3587  /* function exit code */
3588  goto __pyx_L0;
3589  __pyx_L1_error:;
3590  __pyx_r = NULL;
3591  __pyx_L0:;
3592  __Pyx_RefNannyFinishContext();
3593  return __pyx_r;
3594 }
3595 
3596 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_14stepTaken(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y) {
3597  Daetk::Petsc::Vec *__pyx_v_yVec;
3598  PyObject *__pyx_r = NULL;
3599  __Pyx_RefNannyDeclarations
3600  __Pyx_RefNannySetupContext("stepTaken", 0);
3601 
3602  /* "flcbdfWrappers.pyx":52
3603  *
3604  * def stepTaken(self, np.ndarray y):
3605  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3606  * self.flcbdf.estimateError(yVec[0])
3607  * del yVec
3608  */
3609  __pyx_v_yVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_y->data), __pyx_v_self->flcbdf->yn.ldim_);
3610 
3611  /* "flcbdfWrappers.pyx":53
3612  * def stepTaken(self, np.ndarray y):
3613  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3614  * self.flcbdf.estimateError(yVec[0]) # <<<<<<<<<<<<<<
3615  * del yVec
3616  *
3617  */
3618  (void)(__pyx_v_self->flcbdf->estimateError((__pyx_v_yVec[0])));
3619 
3620  /* "flcbdfWrappers.pyx":54
3621  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3622  * self.flcbdf.estimateError(yVec[0])
3623  * del yVec # <<<<<<<<<<<<<<
3624  *
3625  * def retryStep_errorFailure(self):
3626  */
3627  delete __pyx_v_yVec;
3628 
3629  /* "flcbdfWrappers.pyx":51
3630  * self.flcbdf.calculate_yprime(self.yVec[0], self.DyVec[0], self.yprimeVec[0], self.DyprimeVec[0])
3631  *
3632  * def stepTaken(self, np.ndarray y): # <<<<<<<<<<<<<<
3633  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3634  * self.flcbdf.estimateError(yVec[0])
3635  */
3636 
3637  /* function exit code */
3638  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3639  __Pyx_XGIVEREF(__pyx_r);
3640  __Pyx_RefNannyFinishContext();
3641  return __pyx_r;
3642 }
3643 
3644 /* "flcbdfWrappers.pyx":56
3645  * del yVec
3646  *
3647  * def retryStep_errorFailure(self): # <<<<<<<<<<<<<<
3648  * cdef double h
3649  * h = self.flcbdf.retryStep_errorFailure()
3650  */
3651 
3652 /* Python wrapper */
3653 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_17retryStep_errorFailure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3654 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_17retryStep_errorFailure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3655  PyObject *__pyx_r = 0;
3656  __Pyx_RefNannyDeclarations
3657  __Pyx_RefNannySetupContext("retryStep_errorFailure (wrapper)", 0);
3658  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_16retryStep_errorFailure(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self));
3659 
3660  /* function exit code */
3661  __Pyx_RefNannyFinishContext();
3662  return __pyx_r;
3663 }
3664 
3665 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_16retryStep_errorFailure(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self) {
3666  double __pyx_v_h;
3667  PyObject *__pyx_r = NULL;
3668  __Pyx_RefNannyDeclarations
3669  PyObject *__pyx_t_1 = NULL;
3670  int __pyx_lineno = 0;
3671  const char *__pyx_filename = NULL;
3672  int __pyx_clineno = 0;
3673  __Pyx_RefNannySetupContext("retryStep_errorFailure", 0);
3674 
3675  /* "flcbdfWrappers.pyx":58
3676  * def retryStep_errorFailure(self):
3677  * cdef double h
3678  * h = self.flcbdf.retryStep_errorFailure() # <<<<<<<<<<<<<<
3679  * return h
3680  *
3681  */
3682  __pyx_v_h = __pyx_v_self->flcbdf->retryStep_errorFailure();
3683 
3684  /* "flcbdfWrappers.pyx":59
3685  * cdef double h
3686  * h = self.flcbdf.retryStep_errorFailure()
3687  * return h # <<<<<<<<<<<<<<
3688  *
3689  * def retryStep_solverFailure(self):
3690  */
3691  __Pyx_XDECREF(__pyx_r);
3692  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 59, __pyx_L1_error)
3693  __Pyx_GOTREF(__pyx_t_1);
3694  __pyx_r = __pyx_t_1;
3695  __pyx_t_1 = 0;
3696  goto __pyx_L0;
3697 
3698  /* "flcbdfWrappers.pyx":56
3699  * del yVec
3700  *
3701  * def retryStep_errorFailure(self): # <<<<<<<<<<<<<<
3702  * cdef double h
3703  * h = self.flcbdf.retryStep_errorFailure()
3704  */
3705 
3706  /* function exit code */
3707  __pyx_L1_error:;
3708  __Pyx_XDECREF(__pyx_t_1);
3709  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.retryStep_errorFailure", __pyx_clineno, __pyx_lineno, __pyx_filename);
3710  __pyx_r = NULL;
3711  __pyx_L0:;
3712  __Pyx_XGIVEREF(__pyx_r);
3713  __Pyx_RefNannyFinishContext();
3714  return __pyx_r;
3715 }
3716 
3717 /* "flcbdfWrappers.pyx":61
3718  * return h
3719  *
3720  * def retryStep_solverFailure(self): # <<<<<<<<<<<<<<
3721  * cdef double h
3722  * h = self.flcbdf.retryStep_solverFailure()
3723  */
3724 
3725 /* Python wrapper */
3726 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_19retryStep_solverFailure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3727 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_19retryStep_solverFailure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3728  PyObject *__pyx_r = 0;
3729  __Pyx_RefNannyDeclarations
3730  __Pyx_RefNannySetupContext("retryStep_solverFailure (wrapper)", 0);
3731  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_18retryStep_solverFailure(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self));
3732 
3733  /* function exit code */
3734  __Pyx_RefNannyFinishContext();
3735  return __pyx_r;
3736 }
3737 
3738 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_18retryStep_solverFailure(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self) {
3739  double __pyx_v_h;
3740  PyObject *__pyx_r = NULL;
3741  __Pyx_RefNannyDeclarations
3742  PyObject *__pyx_t_1 = NULL;
3743  int __pyx_lineno = 0;
3744  const char *__pyx_filename = NULL;
3745  int __pyx_clineno = 0;
3746  __Pyx_RefNannySetupContext("retryStep_solverFailure", 0);
3747 
3748  /* "flcbdfWrappers.pyx":63
3749  * def retryStep_solverFailure(self):
3750  * cdef double h
3751  * h = self.flcbdf.retryStep_solverFailure() # <<<<<<<<<<<<<<
3752  * return h
3753  *
3754  */
3755  __pyx_v_h = __pyx_v_self->flcbdf->retryStep_solverFailure();
3756 
3757  /* "flcbdfWrappers.pyx":64
3758  * cdef double h
3759  * h = self.flcbdf.retryStep_solverFailure()
3760  * return h # <<<<<<<<<<<<<<
3761  *
3762  * def initializeTimeHistory(self,
3763  */
3764  __Pyx_XDECREF(__pyx_r);
3765  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error)
3766  __Pyx_GOTREF(__pyx_t_1);
3767  __pyx_r = __pyx_t_1;
3768  __pyx_t_1 = 0;
3769  goto __pyx_L0;
3770 
3771  /* "flcbdfWrappers.pyx":61
3772  * return h
3773  *
3774  * def retryStep_solverFailure(self): # <<<<<<<<<<<<<<
3775  * cdef double h
3776  * h = self.flcbdf.retryStep_solverFailure()
3777  */
3778 
3779  /* function exit code */
3780  __pyx_L1_error:;
3781  __Pyx_XDECREF(__pyx_t_1);
3782  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.retryStep_solverFailure", __pyx_clineno, __pyx_lineno, __pyx_filename);
3783  __pyx_r = NULL;
3784  __pyx_L0:;
3785  __Pyx_XGIVEREF(__pyx_r);
3786  __Pyx_RefNannyFinishContext();
3787  return __pyx_r;
3788 }
3789 
3790 /* "flcbdfWrappers.pyx":66
3791  * return h
3792  *
3793  * def initializeTimeHistory(self, # <<<<<<<<<<<<<<
3794  * np.ndarray y,
3795  * np.ndarray yPrime):
3796  */
3797 
3798 /* Python wrapper */
3799 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_21initializeTimeHistory(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3800 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_21initializeTimeHistory(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3801  PyArrayObject *__pyx_v_y = 0;
3802  PyArrayObject *__pyx_v_yPrime = 0;
3803  int __pyx_lineno = 0;
3804  const char *__pyx_filename = NULL;
3805  int __pyx_clineno = 0;
3806  PyObject *__pyx_r = 0;
3807  __Pyx_RefNannyDeclarations
3808  __Pyx_RefNannySetupContext("initializeTimeHistory (wrapper)", 0);
3809  {
3810  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_yPrime,0};
3811  PyObject* values[2] = {0,0};
3812  if (unlikely(__pyx_kwds)) {
3813  Py_ssize_t kw_args;
3814  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3815  switch (pos_args) {
3816  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3817  CYTHON_FALLTHROUGH;
3818  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3819  CYTHON_FALLTHROUGH;
3820  case 0: break;
3821  default: goto __pyx_L5_argtuple_error;
3822  }
3823  kw_args = PyDict_Size(__pyx_kwds);
3824  switch (pos_args) {
3825  case 0:
3826  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
3827  else goto __pyx_L5_argtuple_error;
3828  CYTHON_FALLTHROUGH;
3829  case 1:
3830  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yPrime)) != 0)) kw_args--;
3831  else {
3832  __Pyx_RaiseArgtupleInvalid("initializeTimeHistory", 1, 2, 2, 1); __PYX_ERR(1, 66, __pyx_L3_error)
3833  }
3834  }
3835  if (unlikely(kw_args > 0)) {
3836  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeTimeHistory") < 0)) __PYX_ERR(1, 66, __pyx_L3_error)
3837  }
3838  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
3839  goto __pyx_L5_argtuple_error;
3840  } else {
3841  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3842  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3843  }
3844  __pyx_v_y = ((PyArrayObject *)values[0]);
3845  __pyx_v_yPrime = ((PyArrayObject *)values[1]);
3846  }
3847  goto __pyx_L4_argument_unpacking_done;
3848  __pyx_L5_argtuple_error:;
3849  __Pyx_RaiseArgtupleInvalid("initializeTimeHistory", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 66, __pyx_L3_error)
3850  __pyx_L3_error:;
3851  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.initializeTimeHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
3852  __Pyx_RefNannyFinishContext();
3853  return NULL;
3854  __pyx_L4_argument_unpacking_done:;
3855  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 67, __pyx_L1_error)
3856  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yPrime), __pyx_ptype_5numpy_ndarray, 1, "yPrime", 0))) __PYX_ERR(1, 68, __pyx_L1_error)
3857  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_20initializeTimeHistory(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), __pyx_v_y, __pyx_v_yPrime);
3858 
3859  /* function exit code */
3860  goto __pyx_L0;
3861  __pyx_L1_error:;
3862  __pyx_r = NULL;
3863  __pyx_L0:;
3864  __Pyx_RefNannyFinishContext();
3865  return __pyx_r;
3866 }
3867 
3868 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_20initializeTimeHistory(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_yPrime) {
3869  Daetk::Petsc::Vec *__pyx_v_yVec;
3870  Daetk::Petsc::Vec *__pyx_v_yPrimeVec;
3871  PyObject *__pyx_r = NULL;
3872  __Pyx_RefNannyDeclarations
3873  __Pyx_RefNannySetupContext("initializeTimeHistory", 0);
3874 
3875  /* "flcbdfWrappers.pyx":69
3876  * np.ndarray y,
3877  * np.ndarray yPrime):
3878  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3879  * cdef Vec *yPrimeVec = new Vec(REF,<double*>(yPrime.data),self.flcbdf.yn.ldim_)
3880  * self.flcbdf.initializeTimeHistory(yVec[0],yPrimeVec[0])
3881  */
3882  __pyx_v_yVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_y->data), __pyx_v_self->flcbdf->yn.ldim_);
3883 
3884  /* "flcbdfWrappers.pyx":70
3885  * np.ndarray yPrime):
3886  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3887  * cdef Vec *yPrimeVec = new Vec(REF,<double*>(yPrime.data),self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
3888  * self.flcbdf.initializeTimeHistory(yVec[0],yPrimeVec[0])
3889  * del yVec
3890  */
3891  __pyx_v_yPrimeVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_yPrime->data), __pyx_v_self->flcbdf->yn.ldim_);
3892 
3893  /* "flcbdfWrappers.pyx":71
3894  * cdef Vec *yVec = new Vec(REF,<double*>(y.data),self.flcbdf.yn.ldim_)
3895  * cdef Vec *yPrimeVec = new Vec(REF,<double*>(yPrime.data),self.flcbdf.yn.ldim_)
3896  * self.flcbdf.initializeTimeHistory(yVec[0],yPrimeVec[0]) # <<<<<<<<<<<<<<
3897  * del yVec
3898  * del yPrimeVec
3899  */
3900  (void)(__pyx_v_self->flcbdf->initializeTimeHistory((__pyx_v_yVec[0]), (__pyx_v_yPrimeVec[0])));
3901 
3902  /* "flcbdfWrappers.pyx":72
3903  * cdef Vec *yPrimeVec = new Vec(REF,<double*>(yPrime.data),self.flcbdf.yn.ldim_)
3904  * self.flcbdf.initializeTimeHistory(yVec[0],yPrimeVec[0])
3905  * del yVec # <<<<<<<<<<<<<<
3906  * del yPrimeVec
3907  *
3908  */
3909  delete __pyx_v_yVec;
3910 
3911  /* "flcbdfWrappers.pyx":73
3912  * self.flcbdf.initializeTimeHistory(yVec[0],yPrimeVec[0])
3913  * del yVec
3914  * del yPrimeVec # <<<<<<<<<<<<<<
3915  *
3916  * def setTolerances(self,
3917  */
3918  delete __pyx_v_yPrimeVec;
3919 
3920  /* "flcbdfWrappers.pyx":66
3921  * return h
3922  *
3923  * def initializeTimeHistory(self, # <<<<<<<<<<<<<<
3924  * np.ndarray y,
3925  * np.ndarray yPrime):
3926  */
3927 
3928  /* function exit code */
3929  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3930  __Pyx_XGIVEREF(__pyx_r);
3931  __Pyx_RefNannyFinishContext();
3932  return __pyx_r;
3933 }
3934 
3935 /* "flcbdfWrappers.pyx":75
3936  * del yPrimeVec
3937  *
3938  * def setTolerances(self, # <<<<<<<<<<<<<<
3939  * double atol,
3940  * double rtol,
3941  */
3942 
3943 /* Python wrapper */
3944 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_23setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3945 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_23setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3946  double __pyx_v_atol;
3947  double __pyx_v_rtol;
3948  PyArrayObject *__pyx_v_dV = 0;
3949  int __pyx_lineno = 0;
3950  const char *__pyx_filename = NULL;
3951  int __pyx_clineno = 0;
3952  PyObject *__pyx_r = 0;
3953  __Pyx_RefNannyDeclarations
3954  __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0);
3955  {
3956  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_atol,&__pyx_n_s_rtol,&__pyx_n_s_dV,0};
3957  PyObject* values[3] = {0,0,0};
3958  if (unlikely(__pyx_kwds)) {
3959  Py_ssize_t kw_args;
3960  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3961  switch (pos_args) {
3962  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3963  CYTHON_FALLTHROUGH;
3964  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3965  CYTHON_FALLTHROUGH;
3966  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3967  CYTHON_FALLTHROUGH;
3968  case 0: break;
3969  default: goto __pyx_L5_argtuple_error;
3970  }
3971  kw_args = PyDict_Size(__pyx_kwds);
3972  switch (pos_args) {
3973  case 0:
3974  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_atol)) != 0)) kw_args--;
3975  else goto __pyx_L5_argtuple_error;
3976  CYTHON_FALLTHROUGH;
3977  case 1:
3978  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rtol)) != 0)) kw_args--;
3979  else {
3980  __Pyx_RaiseArgtupleInvalid("setTolerances", 1, 3, 3, 1); __PYX_ERR(1, 75, __pyx_L3_error)
3981  }
3982  CYTHON_FALLTHROUGH;
3983  case 2:
3984  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV)) != 0)) kw_args--;
3985  else {
3986  __Pyx_RaiseArgtupleInvalid("setTolerances", 1, 3, 3, 2); __PYX_ERR(1, 75, __pyx_L3_error)
3987  }
3988  }
3989  if (unlikely(kw_args > 0)) {
3990  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(1, 75, __pyx_L3_error)
3991  }
3992  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
3993  goto __pyx_L5_argtuple_error;
3994  } else {
3995  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3996  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3997  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3998  }
3999  __pyx_v_atol = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_atol == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L3_error)
4000  __pyx_v_rtol = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_rtol == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 77, __pyx_L3_error)
4001  __pyx_v_dV = ((PyArrayObject *)values[2]);
4002  }
4003  goto __pyx_L4_argument_unpacking_done;
4004  __pyx_L5_argtuple_error:;
4005  __Pyx_RaiseArgtupleInvalid("setTolerances", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 75, __pyx_L3_error)
4006  __pyx_L3_error:;
4007  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
4008  __Pyx_RefNannyFinishContext();
4009  return NULL;
4010  __pyx_L4_argument_unpacking_done:;
4011  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV), __pyx_ptype_5numpy_ndarray, 1, "dV", 0))) __PYX_ERR(1, 78, __pyx_L1_error)
4012  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_22setTolerances(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), __pyx_v_atol, __pyx_v_rtol, __pyx_v_dV);
4013 
4014  /* function exit code */
4015  goto __pyx_L0;
4016  __pyx_L1_error:;
4017  __pyx_r = NULL;
4018  __pyx_L0:;
4019  __Pyx_RefNannyFinishContext();
4020  return __pyx_r;
4021 }
4022 
4023 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_22setTolerances(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, double __pyx_v_atol, double __pyx_v_rtol, PyArrayObject *__pyx_v_dV) {
4024  Daetk::Petsc::Vec *__pyx_v_dV_Vec;
4025  PyObject *__pyx_r = NULL;
4026  __Pyx_RefNannyDeclarations
4027  __Pyx_RefNannySetupContext("setTolerances", 0);
4028 
4029  /* "flcbdfWrappers.pyx":79
4030  * double rtol,
4031  * np.ndarray dV):
4032  * cdef Vec *dV_Vec = new Vec(REF,<double*>(dV.data),self.flcbdf.yn.ldim_) # <<<<<<<<<<<<<<
4033  * self.wNormp.setTolerances(atol,rtol,dV_Vec[0])
4034  * del dV_Vec
4035  */
4036  __pyx_v_dV_Vec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_dV->data), __pyx_v_self->flcbdf->yn.ldim_);
4037 
4038  /* "flcbdfWrappers.pyx":80
4039  * np.ndarray dV):
4040  * cdef Vec *dV_Vec = new Vec(REF,<double*>(dV.data),self.flcbdf.yn.ldim_)
4041  * self.wNormp.setTolerances(atol,rtol,dV_Vec[0]) # <<<<<<<<<<<<<<
4042  * del dV_Vec
4043  *
4044  */
4045  __pyx_v_self->wNormp->setTolerances(__pyx_v_atol, __pyx_v_rtol, (__pyx_v_dV_Vec[0]));
4046 
4047  /* "flcbdfWrappers.pyx":81
4048  * cdef Vec *dV_Vec = new Vec(REF,<double*>(dV.data),self.flcbdf.yn.ldim_)
4049  * self.wNormp.setTolerances(atol,rtol,dV_Vec[0])
4050  * del dV_Vec # <<<<<<<<<<<<<<
4051  *
4052  * def getCurrentAlpha(self):
4053  */
4054  delete __pyx_v_dV_Vec;
4055 
4056  /* "flcbdfWrappers.pyx":75
4057  * del yPrimeVec
4058  *
4059  * def setTolerances(self, # <<<<<<<<<<<<<<
4060  * double atol,
4061  * double rtol,
4062  */
4063 
4064  /* function exit code */
4065  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4066  __Pyx_XGIVEREF(__pyx_r);
4067  __Pyx_RefNannyFinishContext();
4068  return __pyx_r;
4069 }
4070 
4071 /* "flcbdfWrappers.pyx":83
4072  * del dV_Vec
4073  *
4074  * def getCurrentAlpha(self): # <<<<<<<<<<<<<<
4075  * cdef double alpha
4076  * alpha = self.flcbdf.getCurrentAlpha()
4077  */
4078 
4079 /* Python wrapper */
4080 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_25getCurrentAlpha(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4081 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_25getCurrentAlpha(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4082  PyObject *__pyx_r = 0;
4083  __Pyx_RefNannyDeclarations
4084  __Pyx_RefNannySetupContext("getCurrentAlpha (wrapper)", 0);
4085  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_24getCurrentAlpha(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self));
4086 
4087  /* function exit code */
4088  __Pyx_RefNannyFinishContext();
4089  return __pyx_r;
4090 }
4091 
4092 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_24getCurrentAlpha(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self) {
4093  double __pyx_v_alpha;
4094  PyObject *__pyx_r = NULL;
4095  __Pyx_RefNannyDeclarations
4096  PyObject *__pyx_t_1 = NULL;
4097  int __pyx_lineno = 0;
4098  const char *__pyx_filename = NULL;
4099  int __pyx_clineno = 0;
4100  __Pyx_RefNannySetupContext("getCurrentAlpha", 0);
4101 
4102  /* "flcbdfWrappers.pyx":85
4103  * def getCurrentAlpha(self):
4104  * cdef double alpha
4105  * alpha = self.flcbdf.getCurrentAlpha() # <<<<<<<<<<<<<<
4106  * return alpha
4107  *
4108  */
4109  __pyx_v_alpha = __pyx_v_self->flcbdf->getCurrentAlpha();
4110 
4111  /* "flcbdfWrappers.pyx":86
4112  * cdef double alpha
4113  * alpha = self.flcbdf.getCurrentAlpha()
4114  * return alpha # <<<<<<<<<<<<<<
4115  *
4116  * def __cinit__(self,
4117  */
4118  __Pyx_XDECREF(__pyx_r);
4119  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_alpha); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 86, __pyx_L1_error)
4120  __Pyx_GOTREF(__pyx_t_1);
4121  __pyx_r = __pyx_t_1;
4122  __pyx_t_1 = 0;
4123  goto __pyx_L0;
4124 
4125  /* "flcbdfWrappers.pyx":83
4126  * del dV_Vec
4127  *
4128  * def getCurrentAlpha(self): # <<<<<<<<<<<<<<
4129  * cdef double alpha
4130  * alpha = self.flcbdf.getCurrentAlpha()
4131  */
4132 
4133  /* function exit code */
4134  __pyx_L1_error:;
4135  __Pyx_XDECREF(__pyx_t_1);
4136  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.getCurrentAlpha", __pyx_clineno, __pyx_lineno, __pyx_filename);
4137  __pyx_r = NULL;
4138  __pyx_L0:;
4139  __Pyx_XGIVEREF(__pyx_r);
4140  __Pyx_RefNannyFinishContext();
4141  return __pyx_r;
4142 }
4143 
4144 /* "flcbdfWrappers.pyx":88
4145  * return alpha
4146  *
4147  * def __cinit__(self, # <<<<<<<<<<<<<<
4148  * np.ndarray y,
4149  * object yName):
4150  */
4151 
4152 /* Python wrapper */
4153 static int __pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_27__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4154 static int __pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_27__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4155  PyArrayObject *__pyx_v_y = 0;
4156  PyObject *__pyx_v_yName = 0;
4157  int __pyx_lineno = 0;
4158  const char *__pyx_filename = NULL;
4159  int __pyx_clineno = 0;
4160  int __pyx_r;
4161  __Pyx_RefNannyDeclarations
4162  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
4163  {
4164  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_yName,0};
4165  PyObject* values[2] = {0,0};
4166  if (unlikely(__pyx_kwds)) {
4167  Py_ssize_t kw_args;
4168  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4169  switch (pos_args) {
4170  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4171  CYTHON_FALLTHROUGH;
4172  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4173  CYTHON_FALLTHROUGH;
4174  case 0: break;
4175  default: goto __pyx_L5_argtuple_error;
4176  }
4177  kw_args = PyDict_Size(__pyx_kwds);
4178  switch (pos_args) {
4179  case 0:
4180  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
4181  else goto __pyx_L5_argtuple_error;
4182  CYTHON_FALLTHROUGH;
4183  case 1:
4184  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yName)) != 0)) kw_args--;
4185  else {
4186  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 88, __pyx_L3_error)
4187  }
4188  }
4189  if (unlikely(kw_args > 0)) {
4190  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 88, __pyx_L3_error)
4191  }
4192  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4193  goto __pyx_L5_argtuple_error;
4194  } else {
4195  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4196  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4197  }
4198  __pyx_v_y = ((PyArrayObject *)values[0]);
4199  __pyx_v_yName = values[1];
4200  }
4201  goto __pyx_L4_argument_unpacking_done;
4202  __pyx_L5_argtuple_error:;
4203  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 88, __pyx_L3_error)
4204  __pyx_L3_error:;
4205  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4206  __Pyx_RefNannyFinishContext();
4207  return -1;
4208  __pyx_L4_argument_unpacking_done:;
4209  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(1, 89, __pyx_L1_error)
4210  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_26__cinit__(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), __pyx_v_y, __pyx_v_yName);
4211 
4212  /* function exit code */
4213  goto __pyx_L0;
4214  __pyx_L1_error:;
4215  __pyx_r = -1;
4216  __pyx_L0:;
4217  __Pyx_RefNannyFinishContext();
4218  return __pyx_r;
4219 }
4220 
4221 static int __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_26__cinit__(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, PyArrayObject *__pyx_v_y, PyObject *__pyx_v_yName) {
4222  CYTHON_UNUSED int __pyx_v_initialized;
4223  int __pyx_v_ignore1;
4224  char **__pyx_v_ignore2;
4225  int __pyx_v_dim;
4226  PyObject *__pyx_v_dataFilename = NULL;
4227  int __pyx_r;
4228  __Pyx_RefNannyDeclarations
4229  PyObject *__pyx_t_1 = NULL;
4230  int __pyx_t_2;
4231  int __pyx_t_3;
4232  int __pyx_t_4;
4233  PyObject *__pyx_t_5 = NULL;
4234  PyObject *__pyx_t_6 = NULL;
4235  PyObject *__pyx_t_7 = NULL;
4236  PyObject *__pyx_t_8 = NULL;
4237  char const *__pyx_t_9;
4238  int __pyx_lineno = 0;
4239  const char *__pyx_filename = NULL;
4240  int __pyx_clineno = 0;
4241  __Pyx_RefNannySetupContext("__cinit__", 0);
4242  __Pyx_INCREF(__pyx_v_yName);
4243 
4244  /* "flcbdfWrappers.pyx":91
4245  * np.ndarray y,
4246  * object yName):
4247  * initialized=True # <<<<<<<<<<<<<<
4248  * cdef int ignore1
4249  * cdef char** ignore2
4250  */
4251  __pyx_v_initialized = 1;
4252 
4253  /* "flcbdfWrappers.pyx":94
4254  * cdef int ignore1
4255  * cdef char** ignore2
4256  * self.petscSys = new Sys(ignore1, ignore2, NULL, NULL) # <<<<<<<<<<<<<<
4257  * cdef int dim=y.size
4258  * self.sizeVec = new Vec(REF,<double*>(y.data),dim)#this is so we have a parallel vector in the registry
4259  */
4260  __pyx_v_self->petscSys = new Daetk::Petsc::Sys(__pyx_v_ignore1, __pyx_v_ignore2, NULL, NULL);
4261 
4262  /* "flcbdfWrappers.pyx":95
4263  * cdef char** ignore2
4264  * self.petscSys = new Sys(ignore1, ignore2, NULL, NULL)
4265  * cdef int dim=y.size # <<<<<<<<<<<<<<
4266  * self.sizeVec = new Vec(REF,<double*>(y.data),dim)#this is so we have a parallel vector in the registry
4267  * self.sizeVec.setExample()
4268  */
4269  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 95, __pyx_L1_error)
4270  __Pyx_GOTREF(__pyx_t_1);
4271  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 95, __pyx_L1_error)
4272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4273  __pyx_v_dim = __pyx_t_2;
4274 
4275  /* "flcbdfWrappers.pyx":96
4276  * self.petscSys = new Sys(ignore1, ignore2, NULL, NULL)
4277  * cdef int dim=y.size
4278  * self.sizeVec = new Vec(REF,<double*>(y.data),dim)#this is so we have a parallel vector in the registry # <<<<<<<<<<<<<<
4279  * self.sizeVec.setExample()
4280  * self.wNormp = new WeightedL2Norm(dim)
4281  */
4282  __pyx_v_self->sizeVec = new Daetk::Petsc::Vec(((Daetk::Petsc::Vec::CopyType)Daetk::Petsc::Vec::REF), ((double *)__pyx_v_y->data), __pyx_v_dim);
4283 
4284  /* "flcbdfWrappers.pyx":97
4285  * cdef int dim=y.size
4286  * self.sizeVec = new Vec(REF,<double*>(y.data),dim)#this is so we have a parallel vector in the registry
4287  * self.sizeVec.setExample() # <<<<<<<<<<<<<<
4288  * self.wNormp = new WeightedL2Norm(dim)
4289  * if not isinstance(yName, bytes):
4290  */
4291  __pyx_v_self->sizeVec->setExample();
4292 
4293  /* "flcbdfWrappers.pyx":98
4294  * self.sizeVec = new Vec(REF,<double*>(y.data),dim)#this is so we have a parallel vector in the registry
4295  * self.sizeVec.setExample()
4296  * self.wNormp = new WeightedL2Norm(dim) # <<<<<<<<<<<<<<
4297  * if not isinstance(yName, bytes):
4298  * yName = yName.encode()
4299  */
4300  __pyx_v_self->wNormp = new Daetk::WeightedL2Norm(__pyx_v_dim);
4301 
4302  /* "flcbdfWrappers.pyx":99
4303  * self.sizeVec.setExample()
4304  * self.wNormp = new WeightedL2Norm(dim)
4305  * if not isinstance(yName, bytes): # <<<<<<<<<<<<<<
4306  * yName = yName.encode()
4307  * dataFilename = "data_{0:d}_{1:s}.txt".format(dim,yName)
4308  */
4309  __pyx_t_3 = PyBytes_Check(__pyx_v_yName);
4310  __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
4311  if (__pyx_t_4) {
4312 
4313  /* "flcbdfWrappers.pyx":100
4314  * self.wNormp = new WeightedL2Norm(dim)
4315  * if not isinstance(yName, bytes):
4316  * yName = yName.encode() # <<<<<<<<<<<<<<
4317  * dataFilename = "data_{0:d}_{1:s}.txt".format(dim,yName)
4318  * self.data = new FullDataFile(0.0, dataFilename)
4319  */
4320  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_yName, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L1_error)
4321  __Pyx_GOTREF(__pyx_t_5);
4322  __pyx_t_6 = NULL;
4323  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
4324  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
4325  if (likely(__pyx_t_6)) {
4326  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
4327  __Pyx_INCREF(__pyx_t_6);
4328  __Pyx_INCREF(function);
4329  __Pyx_DECREF_SET(__pyx_t_5, function);
4330  }
4331  }
4332  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
4333  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
4334  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error)
4335  __Pyx_GOTREF(__pyx_t_1);
4336  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4337  __Pyx_DECREF_SET(__pyx_v_yName, __pyx_t_1);
4338  __pyx_t_1 = 0;
4339 
4340  /* "flcbdfWrappers.pyx":99
4341  * self.sizeVec.setExample()
4342  * self.wNormp = new WeightedL2Norm(dim)
4343  * if not isinstance(yName, bytes): # <<<<<<<<<<<<<<
4344  * yName = yName.encode()
4345  * dataFilename = "data_{0:d}_{1:s}.txt".format(dim,yName)
4346  */
4347  }
4348 
4349  /* "flcbdfWrappers.pyx":101
4350  * if not isinstance(yName, bytes):
4351  * yName = yName.encode()
4352  * dataFilename = "data_{0:d}_{1:s}.txt".format(dim,yName) # <<<<<<<<<<<<<<
4353  * self.data = new FullDataFile(0.0, dataFilename)
4354  * self.flcbdf = new FLCBDF_lite(dim, self.wNormp[0], self.data[0])
4355  */
4356  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_data__0_d___1_s_txt, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L1_error)
4357  __Pyx_GOTREF(__pyx_t_5);
4358  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 101, __pyx_L1_error)
4359  __Pyx_GOTREF(__pyx_t_6);
4360  __pyx_t_7 = NULL;
4361  __pyx_t_2 = 0;
4362  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
4363  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
4364  if (likely(__pyx_t_7)) {
4365  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
4366  __Pyx_INCREF(__pyx_t_7);
4367  __Pyx_INCREF(function);
4368  __Pyx_DECREF_SET(__pyx_t_5, function);
4369  __pyx_t_2 = 1;
4370  }
4371  }
4372  #if CYTHON_FAST_PYCALL
4373  if (PyFunction_Check(__pyx_t_5)) {
4374  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_yName};
4375  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 101, __pyx_L1_error)
4376  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4377  __Pyx_GOTREF(__pyx_t_1);
4378  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4379  } else
4380  #endif
4381  #if CYTHON_FAST_PYCCALL
4382  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
4383  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_yName};
4384  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_2, 2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 101, __pyx_L1_error)
4385  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4386  __Pyx_GOTREF(__pyx_t_1);
4387  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4388  } else
4389  #endif
4390  {
4391  __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 101, __pyx_L1_error)
4392  __Pyx_GOTREF(__pyx_t_8);
4393  if (__pyx_t_7) {
4394  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
4395  }
4396  __Pyx_GIVEREF(__pyx_t_6);
4397  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_t_6);
4398  __Pyx_INCREF(__pyx_v_yName);
4399  __Pyx_GIVEREF(__pyx_v_yName);
4400  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_2, __pyx_v_yName);
4401  __pyx_t_6 = 0;
4402  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 101, __pyx_L1_error)
4403  __Pyx_GOTREF(__pyx_t_1);
4404  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4405  }
4406  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4407  __pyx_v_dataFilename = __pyx_t_1;
4408  __pyx_t_1 = 0;
4409 
4410  /* "flcbdfWrappers.pyx":102
4411  * yName = yName.encode()
4412  * dataFilename = "data_{0:d}_{1:s}.txt".format(dim,yName)
4413  * self.data = new FullDataFile(0.0, dataFilename) # <<<<<<<<<<<<<<
4414  * self.flcbdf = new FLCBDF_lite(dim, self.wNormp[0], self.data[0])
4415  *
4416  */
4417  __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_dataFilename); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(1, 102, __pyx_L1_error)
4418  __pyx_v_self->data = new Daetk::FullDataFile(0.0, __pyx_t_9);
4419 
4420  /* "flcbdfWrappers.pyx":103
4421  * dataFilename = "data_{0:d}_{1:s}.txt".format(dim,yName)
4422  * self.data = new FullDataFile(0.0, dataFilename)
4423  * self.flcbdf = new FLCBDF_lite(dim, self.wNormp[0], self.data[0]) # <<<<<<<<<<<<<<
4424  *
4425  * def __dealloc__(self):
4426  */
4427  __pyx_v_self->flcbdf = new Daetk::FLCBDF_lite(__pyx_v_dim, (__pyx_v_self->wNormp[0]), (__pyx_v_self->data[0]));
4428 
4429  /* "flcbdfWrappers.pyx":88
4430  * return alpha
4431  *
4432  * def __cinit__(self, # <<<<<<<<<<<<<<
4433  * np.ndarray y,
4434  * object yName):
4435  */
4436 
4437  /* function exit code */
4438  __pyx_r = 0;
4439  goto __pyx_L0;
4440  __pyx_L1_error:;
4441  __Pyx_XDECREF(__pyx_t_1);
4442  __Pyx_XDECREF(__pyx_t_5);
4443  __Pyx_XDECREF(__pyx_t_6);
4444  __Pyx_XDECREF(__pyx_t_7);
4445  __Pyx_XDECREF(__pyx_t_8);
4446  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4447  __pyx_r = -1;
4448  __pyx_L0:;
4449  __Pyx_XDECREF(__pyx_v_dataFilename);
4450  __Pyx_XDECREF(__pyx_v_yName);
4451  __Pyx_RefNannyFinishContext();
4452  return __pyx_r;
4453 }
4454 
4455 /* "flcbdfWrappers.pyx":105
4456  * self.flcbdf = new FLCBDF_lite(dim, self.wNormp[0], self.data[0])
4457  *
4458  * def __dealloc__(self): # <<<<<<<<<<<<<<
4459  * del self.wNormp
4460  * del self.petscSys
4461  */
4462 
4463 /* Python wrapper */
4464 static void __pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_29__dealloc__(PyObject *__pyx_v_self); /*proto*/
4465 static void __pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_29__dealloc__(PyObject *__pyx_v_self) {
4466  __Pyx_RefNannyDeclarations
4467  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
4468  __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_28__dealloc__(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self));
4469 
4470  /* function exit code */
4471  __Pyx_RefNannyFinishContext();
4472 }
4473 
4474 static void __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_28__dealloc__(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self) {
4475  __Pyx_RefNannyDeclarations
4476  __Pyx_RefNannySetupContext("__dealloc__", 0);
4477 
4478  /* "flcbdfWrappers.pyx":106
4479  *
4480  * def __dealloc__(self):
4481  * del self.wNormp # <<<<<<<<<<<<<<
4482  * del self.petscSys
4483  * del self.data
4484  */
4485  delete __pyx_v_self->wNormp;
4486 
4487  /* "flcbdfWrappers.pyx":107
4488  * def __dealloc__(self):
4489  * del self.wNormp
4490  * del self.petscSys # <<<<<<<<<<<<<<
4491  * del self.data
4492  * del self.flcbdf
4493  */
4494  delete __pyx_v_self->petscSys;
4495 
4496  /* "flcbdfWrappers.pyx":108
4497  * del self.wNormp
4498  * del self.petscSys
4499  * del self.data # <<<<<<<<<<<<<<
4500  * del self.flcbdf
4501  * del self.sizeVec
4502  */
4503  delete __pyx_v_self->data;
4504 
4505  /* "flcbdfWrappers.pyx":109
4506  * del self.petscSys
4507  * del self.data
4508  * del self.flcbdf # <<<<<<<<<<<<<<
4509  * del self.sizeVec
4510  */
4511  delete __pyx_v_self->flcbdf;
4512 
4513  /* "flcbdfWrappers.pyx":110
4514  * del self.data
4515  * del self.flcbdf
4516  * del self.sizeVec # <<<<<<<<<<<<<<
4517  */
4518  delete __pyx_v_self->sizeVec;
4519 
4520  /* "flcbdfWrappers.pyx":105
4521  * self.flcbdf = new FLCBDF_lite(dim, self.wNormp[0], self.data[0])
4522  *
4523  * def __dealloc__(self): # <<<<<<<<<<<<<<
4524  * del self.wNormp
4525  * del self.petscSys
4526  */
4527 
4528  /* function exit code */
4529  __Pyx_RefNannyFinishContext();
4530 }
4531 
4532 /* "(tree fragment)":1
4533  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4534  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4535  * def __setstate_cython__(self, __pyx_state):
4536  */
4537 
4538 /* Python wrapper */
4539 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4540 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4541  PyObject *__pyx_r = 0;
4542  __Pyx_RefNannyDeclarations
4543  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
4544  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_30__reduce_cython__(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self));
4545 
4546  /* function exit code */
4547  __Pyx_RefNannyFinishContext();
4548  return __pyx_r;
4549 }
4550 
4551 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self) {
4552  PyObject *__pyx_r = NULL;
4553  __Pyx_RefNannyDeclarations
4554  PyObject *__pyx_t_1 = NULL;
4555  int __pyx_lineno = 0;
4556  const char *__pyx_filename = NULL;
4557  int __pyx_clineno = 0;
4558  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
4559 
4560  /* "(tree fragment)":2
4561  * def __reduce_cython__(self):
4562  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
4563  * def __setstate_cython__(self, __pyx_state):
4564  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4565  */
4566  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
4567  __Pyx_GOTREF(__pyx_t_1);
4568  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4569  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4570  __PYX_ERR(0, 2, __pyx_L1_error)
4571 
4572  /* "(tree fragment)":1
4573  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4574  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4575  * def __setstate_cython__(self, __pyx_state):
4576  */
4577 
4578  /* function exit code */
4579  __pyx_L1_error:;
4580  __Pyx_XDECREF(__pyx_t_1);
4581  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4582  __pyx_r = NULL;
4583  __Pyx_XGIVEREF(__pyx_r);
4584  __Pyx_RefNannyFinishContext();
4585  return __pyx_r;
4586 }
4587 
4588 /* "(tree fragment)":3
4589  * def __reduce_cython__(self):
4590  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4591  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4592  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4593  */
4594 
4595 /* Python wrapper */
4596 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
4597 static PyObject *__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
4598  PyObject *__pyx_r = 0;
4599  __Pyx_RefNannyDeclarations
4600  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
4601  __pyx_r = __pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_32__setstate_cython__(((struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
4602 
4603  /* function exit code */
4604  __Pyx_RefNannyFinishContext();
4605  return __pyx_r;
4606 }
4607 
4608 static PyObject *__pyx_pf_14flcbdfWrappers_17FLCBDF_integrator_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
4609  PyObject *__pyx_r = NULL;
4610  __Pyx_RefNannyDeclarations
4611  PyObject *__pyx_t_1 = NULL;
4612  int __pyx_lineno = 0;
4613  const char *__pyx_filename = NULL;
4614  int __pyx_clineno = 0;
4615  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
4616 
4617  /* "(tree fragment)":4
4618  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4619  * def __setstate_cython__(self, __pyx_state):
4620  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
4621  */
4622  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
4623  __Pyx_GOTREF(__pyx_t_1);
4624  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4625  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4626  __PYX_ERR(0, 4, __pyx_L1_error)
4627 
4628  /* "(tree fragment)":3
4629  * def __reduce_cython__(self):
4630  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4631  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4632  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4633  */
4634 
4635  /* function exit code */
4636  __pyx_L1_error:;
4637  __Pyx_XDECREF(__pyx_t_1);
4638  __Pyx_AddTraceback("flcbdfWrappers.FLCBDF_integrator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4639  __pyx_r = NULL;
4640  __Pyx_XGIVEREF(__pyx_r);
4641  __Pyx_RefNannyFinishContext();
4642  return __pyx_r;
4643 }
4644 
4645 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
4646  * ctypedef npy_cdouble complex_t
4647  *
4648  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4649  * return PyArray_MultiIterNew(1, <void*>a)
4650  *
4651  */
4652 
4653 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
4654  PyObject *__pyx_r = NULL;
4655  __Pyx_RefNannyDeclarations
4656  PyObject *__pyx_t_1 = NULL;
4657  int __pyx_lineno = 0;
4658  const char *__pyx_filename = NULL;
4659  int __pyx_clineno = 0;
4660  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
4661 
4662  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
4663  *
4664  * cdef inline object PyArray_MultiIterNew1(a):
4665  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
4666  *
4667  * cdef inline object PyArray_MultiIterNew2(a, b):
4668  */
4669  __Pyx_XDECREF(__pyx_r);
4670  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)
4671  __Pyx_GOTREF(__pyx_t_1);
4672  __pyx_r = __pyx_t_1;
4673  __pyx_t_1 = 0;
4674  goto __pyx_L0;
4675 
4676  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
4677  * ctypedef npy_cdouble complex_t
4678  *
4679  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4680  * return PyArray_MultiIterNew(1, <void*>a)
4681  *
4682  */
4683 
4684  /* function exit code */
4685  __pyx_L1_error:;
4686  __Pyx_XDECREF(__pyx_t_1);
4687  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
4688  __pyx_r = 0;
4689  __pyx_L0:;
4690  __Pyx_XGIVEREF(__pyx_r);
4691  __Pyx_RefNannyFinishContext();
4692  return __pyx_r;
4693 }
4694 
4695 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
4696  * return PyArray_MultiIterNew(1, <void*>a)
4697  *
4698  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4699  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4700  *
4701  */
4702 
4703 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
4704  PyObject *__pyx_r = NULL;
4705  __Pyx_RefNannyDeclarations
4706  PyObject *__pyx_t_1 = NULL;
4707  int __pyx_lineno = 0;
4708  const char *__pyx_filename = NULL;
4709  int __pyx_clineno = 0;
4710  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
4711 
4712  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
4713  *
4714  * cdef inline object PyArray_MultiIterNew2(a, b):
4715  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
4716  *
4717  * cdef inline object PyArray_MultiIterNew3(a, b, c):
4718  */
4719  __Pyx_XDECREF(__pyx_r);
4720  __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)
4721  __Pyx_GOTREF(__pyx_t_1);
4722  __pyx_r = __pyx_t_1;
4723  __pyx_t_1 = 0;
4724  goto __pyx_L0;
4725 
4726  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
4727  * return PyArray_MultiIterNew(1, <void*>a)
4728  *
4729  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4730  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4731  *
4732  */
4733 
4734  /* function exit code */
4735  __pyx_L1_error:;
4736  __Pyx_XDECREF(__pyx_t_1);
4737  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
4738  __pyx_r = 0;
4739  __pyx_L0:;
4740  __Pyx_XGIVEREF(__pyx_r);
4741  __Pyx_RefNannyFinishContext();
4742  return __pyx_r;
4743 }
4744 
4745 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
4746  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4747  *
4748  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4749  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4750  *
4751  */
4752 
4753 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4754  PyObject *__pyx_r = NULL;
4755  __Pyx_RefNannyDeclarations
4756  PyObject *__pyx_t_1 = NULL;
4757  int __pyx_lineno = 0;
4758  const char *__pyx_filename = NULL;
4759  int __pyx_clineno = 0;
4760  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
4761 
4762  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
4763  *
4764  * cdef inline object PyArray_MultiIterNew3(a, b, c):
4765  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
4766  *
4767  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4768  */
4769  __Pyx_XDECREF(__pyx_r);
4770  __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)
4771  __Pyx_GOTREF(__pyx_t_1);
4772  __pyx_r = __pyx_t_1;
4773  __pyx_t_1 = 0;
4774  goto __pyx_L0;
4775 
4776  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
4777  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4778  *
4779  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4780  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4781  *
4782  */
4783 
4784  /* function exit code */
4785  __pyx_L1_error:;
4786  __Pyx_XDECREF(__pyx_t_1);
4787  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4788  __pyx_r = 0;
4789  __pyx_L0:;
4790  __Pyx_XGIVEREF(__pyx_r);
4791  __Pyx_RefNannyFinishContext();
4792  return __pyx_r;
4793 }
4794 
4795 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
4796  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4797  *
4798  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4799  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4800  *
4801  */
4802 
4803 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) {
4804  PyObject *__pyx_r = NULL;
4805  __Pyx_RefNannyDeclarations
4806  PyObject *__pyx_t_1 = NULL;
4807  int __pyx_lineno = 0;
4808  const char *__pyx_filename = NULL;
4809  int __pyx_clineno = 0;
4810  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
4811 
4812  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
4813  *
4814  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4815  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
4816  *
4817  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4818  */
4819  __Pyx_XDECREF(__pyx_r);
4820  __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)
4821  __Pyx_GOTREF(__pyx_t_1);
4822  __pyx_r = __pyx_t_1;
4823  __pyx_t_1 = 0;
4824  goto __pyx_L0;
4825 
4826  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
4827  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4828  *
4829  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4830  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4831  *
4832  */
4833 
4834  /* function exit code */
4835  __pyx_L1_error:;
4836  __Pyx_XDECREF(__pyx_t_1);
4837  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4838  __pyx_r = 0;
4839  __pyx_L0:;
4840  __Pyx_XGIVEREF(__pyx_r);
4841  __Pyx_RefNannyFinishContext();
4842  return __pyx_r;
4843 }
4844 
4845 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
4846  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4847  *
4848  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4849  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4850  *
4851  */
4852 
4853 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) {
4854  PyObject *__pyx_r = NULL;
4855  __Pyx_RefNannyDeclarations
4856  PyObject *__pyx_t_1 = NULL;
4857  int __pyx_lineno = 0;
4858  const char *__pyx_filename = NULL;
4859  int __pyx_clineno = 0;
4860  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
4861 
4862  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
4863  *
4864  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4865  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
4866  *
4867  * cdef inline tuple PyDataType_SHAPE(dtype d):
4868  */
4869  __Pyx_XDECREF(__pyx_r);
4870  __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)
4871  __Pyx_GOTREF(__pyx_t_1);
4872  __pyx_r = __pyx_t_1;
4873  __pyx_t_1 = 0;
4874  goto __pyx_L0;
4875 
4876  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
4877  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4878  *
4879  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4880  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4881  *
4882  */
4883 
4884  /* function exit code */
4885  __pyx_L1_error:;
4886  __Pyx_XDECREF(__pyx_t_1);
4887  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4888  __pyx_r = 0;
4889  __pyx_L0:;
4890  __Pyx_XGIVEREF(__pyx_r);
4891  __Pyx_RefNannyFinishContext();
4892  return __pyx_r;
4893 }
4894 
4895 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
4896  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4897  *
4898  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4899  * if PyDataType_HASSUBARRAY(d):
4900  * return <tuple>d.subarray.shape
4901  */
4902 
4903 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4904  PyObject *__pyx_r = NULL;
4905  __Pyx_RefNannyDeclarations
4906  int __pyx_t_1;
4907  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
4908 
4909  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
4910  *
4911  * cdef inline tuple PyDataType_SHAPE(dtype d):
4912  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4913  * return <tuple>d.subarray.shape
4914  * else:
4915  */
4916  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
4917  if (__pyx_t_1) {
4918 
4919  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
4920  * cdef inline tuple PyDataType_SHAPE(dtype d):
4921  * if PyDataType_HASSUBARRAY(d):
4922  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
4923  * else:
4924  * return ()
4925  */
4926  __Pyx_XDECREF(__pyx_r);
4927  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
4928  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
4929  goto __pyx_L0;
4930 
4931  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
4932  *
4933  * cdef inline tuple PyDataType_SHAPE(dtype d):
4934  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4935  * return <tuple>d.subarray.shape
4936  * else:
4937  */
4938  }
4939 
4940  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
4941  * return <tuple>d.subarray.shape
4942  * else:
4943  * return () # <<<<<<<<<<<<<<
4944  *
4945  *
4946  */
4947  /*else*/ {
4948  __Pyx_XDECREF(__pyx_r);
4949  __Pyx_INCREF(__pyx_empty_tuple);
4950  __pyx_r = __pyx_empty_tuple;
4951  goto __pyx_L0;
4952  }
4953 
4954  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
4955  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4956  *
4957  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4958  * if PyDataType_HASSUBARRAY(d):
4959  * return <tuple>d.subarray.shape
4960  */
4961 
4962  /* function exit code */
4963  __pyx_L0:;
4964  __Pyx_XGIVEREF(__pyx_r);
4965  __Pyx_RefNannyFinishContext();
4966  return __pyx_r;
4967 }
4968 
4969 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
4970  * int _import_umath() except -1
4971  *
4972  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
4973  * Py_INCREF(base) # important to do this before stealing the reference below!
4974  * PyArray_SetBaseObject(arr, base)
4975  */
4976 
4977 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
4978  __Pyx_RefNannyDeclarations
4979  __Pyx_RefNannySetupContext("set_array_base", 0);
4980 
4981  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
4982  *
4983  * cdef inline void set_array_base(ndarray arr, object base):
4984  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
4985  * PyArray_SetBaseObject(arr, base)
4986  *
4987  */
4988  Py_INCREF(__pyx_v_base);
4989 
4990  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
4991  * cdef inline void set_array_base(ndarray arr, object base):
4992  * Py_INCREF(base) # important to do this before stealing the reference below!
4993  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
4994  *
4995  * cdef inline object get_array_base(ndarray arr):
4996  */
4997  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
4998 
4999  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
5000  * int _import_umath() except -1
5001  *
5002  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
5003  * Py_INCREF(base) # important to do this before stealing the reference below!
5004  * PyArray_SetBaseObject(arr, base)
5005  */
5006 
5007  /* function exit code */
5008  __Pyx_RefNannyFinishContext();
5009 }
5010 
5011 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
5012  * PyArray_SetBaseObject(arr, base)
5013  *
5014  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5015  * base = PyArray_BASE(arr)
5016  * if base is NULL:
5017  */
5018 
5019 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
5020  PyObject *__pyx_v_base;
5021  PyObject *__pyx_r = NULL;
5022  __Pyx_RefNannyDeclarations
5023  int __pyx_t_1;
5024  __Pyx_RefNannySetupContext("get_array_base", 0);
5025 
5026  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
5027  *
5028  * cdef inline object get_array_base(ndarray arr):
5029  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
5030  * if base is NULL:
5031  * return None
5032  */
5033  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
5034 
5035  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
5036  * cdef inline object get_array_base(ndarray arr):
5037  * base = PyArray_BASE(arr)
5038  * if base is NULL: # <<<<<<<<<<<<<<
5039  * return None
5040  * return <object>base
5041  */
5042  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
5043  if (__pyx_t_1) {
5044 
5045  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
5046  * base = PyArray_BASE(arr)
5047  * if base is NULL:
5048  * return None # <<<<<<<<<<<<<<
5049  * return <object>base
5050  *
5051  */
5052  __Pyx_XDECREF(__pyx_r);
5053  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5054  goto __pyx_L0;
5055 
5056  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
5057  * cdef inline object get_array_base(ndarray arr):
5058  * base = PyArray_BASE(arr)
5059  * if base is NULL: # <<<<<<<<<<<<<<
5060  * return None
5061  * return <object>base
5062  */
5063  }
5064 
5065  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
5066  * if base is NULL:
5067  * return None
5068  * return <object>base # <<<<<<<<<<<<<<
5069  *
5070  * # Versions of the import_* functions which are more suitable for
5071  */
5072  __Pyx_XDECREF(__pyx_r);
5073  __Pyx_INCREF(((PyObject *)__pyx_v_base));
5074  __pyx_r = ((PyObject *)__pyx_v_base);
5075  goto __pyx_L0;
5076 
5077  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
5078  * PyArray_SetBaseObject(arr, base)
5079  *
5080  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5081  * base = PyArray_BASE(arr)
5082  * if base is NULL:
5083  */
5084 
5085  /* function exit code */
5086  __pyx_L0:;
5087  __Pyx_XGIVEREF(__pyx_r);
5088  __Pyx_RefNannyFinishContext();
5089  return __pyx_r;
5090 }
5091 
5092 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
5093  * # Versions of the import_* functions which are more suitable for
5094  * # Cython code.
5095  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5096  * try:
5097  * __pyx_import_array()
5098  */
5099 
5100 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
5101  int __pyx_r;
5102  __Pyx_RefNannyDeclarations
5103  PyObject *__pyx_t_1 = NULL;
5104  PyObject *__pyx_t_2 = NULL;
5105  PyObject *__pyx_t_3 = NULL;
5106  int __pyx_t_4;
5107  PyObject *__pyx_t_5 = NULL;
5108  PyObject *__pyx_t_6 = NULL;
5109  PyObject *__pyx_t_7 = NULL;
5110  PyObject *__pyx_t_8 = NULL;
5111  int __pyx_lineno = 0;
5112  const char *__pyx_filename = NULL;
5113  int __pyx_clineno = 0;
5114  __Pyx_RefNannySetupContext("import_array", 0);
5115 
5116  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
5117  * # Cython code.
5118  * cdef inline int import_array() except -1:
5119  * try: # <<<<<<<<<<<<<<
5120  * __pyx_import_array()
5121  * except Exception:
5122  */
5123  {
5124  __Pyx_PyThreadState_declare
5125  __Pyx_PyThreadState_assign
5126  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5127  __Pyx_XGOTREF(__pyx_t_1);
5128  __Pyx_XGOTREF(__pyx_t_2);
5129  __Pyx_XGOTREF(__pyx_t_3);
5130  /*try:*/ {
5131 
5132  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
5133  * cdef inline int import_array() except -1:
5134  * try:
5135  * __pyx_import_array() # <<<<<<<<<<<<<<
5136  * except Exception:
5137  * raise ImportError("numpy.core.multiarray failed to import")
5138  */
5139  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)
5140 
5141  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
5142  * # Cython code.
5143  * cdef inline int import_array() except -1:
5144  * try: # <<<<<<<<<<<<<<
5145  * __pyx_import_array()
5146  * except Exception:
5147  */
5148  }
5149  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5150  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5151  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5152  goto __pyx_L8_try_end;
5153  __pyx_L3_error:;
5154 
5155  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
5156  * try:
5157  * __pyx_import_array()
5158  * except Exception: # <<<<<<<<<<<<<<
5159  * raise ImportError("numpy.core.multiarray failed to import")
5160  *
5161  */
5162  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5163  if (__pyx_t_4) {
5164  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5165  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error)
5166  __Pyx_GOTREF(__pyx_t_5);
5167  __Pyx_GOTREF(__pyx_t_6);
5168  __Pyx_GOTREF(__pyx_t_7);
5169 
5170  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
5171  * __pyx_import_array()
5172  * except Exception:
5173  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
5174  *
5175  * cdef inline int import_umath() except -1:
5176  */
5177  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error)
5178  __Pyx_GOTREF(__pyx_t_8);
5179  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5180  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5181  __PYX_ERR(2, 945, __pyx_L5_except_error)
5182  }
5183  goto __pyx_L5_except_error;
5184  __pyx_L5_except_error:;
5185 
5186  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
5187  * # Cython code.
5188  * cdef inline int import_array() except -1:
5189  * try: # <<<<<<<<<<<<<<
5190  * __pyx_import_array()
5191  * except Exception:
5192  */
5193  __Pyx_XGIVEREF(__pyx_t_1);
5194  __Pyx_XGIVEREF(__pyx_t_2);
5195  __Pyx_XGIVEREF(__pyx_t_3);
5196  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5197  goto __pyx_L1_error;
5198  __pyx_L8_try_end:;
5199  }
5200 
5201  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
5202  * # Versions of the import_* functions which are more suitable for
5203  * # Cython code.
5204  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5205  * try:
5206  * __pyx_import_array()
5207  */
5208 
5209  /* function exit code */
5210  __pyx_r = 0;
5211  goto __pyx_L0;
5212  __pyx_L1_error:;
5213  __Pyx_XDECREF(__pyx_t_5);
5214  __Pyx_XDECREF(__pyx_t_6);
5215  __Pyx_XDECREF(__pyx_t_7);
5216  __Pyx_XDECREF(__pyx_t_8);
5217  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5218  __pyx_r = -1;
5219  __pyx_L0:;
5220  __Pyx_RefNannyFinishContext();
5221  return __pyx_r;
5222 }
5223 
5224 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
5225  * raise ImportError("numpy.core.multiarray failed to import")
5226  *
5227  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5228  * try:
5229  * _import_umath()
5230  */
5231 
5232 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
5233  int __pyx_r;
5234  __Pyx_RefNannyDeclarations
5235  PyObject *__pyx_t_1 = NULL;
5236  PyObject *__pyx_t_2 = NULL;
5237  PyObject *__pyx_t_3 = NULL;
5238  int __pyx_t_4;
5239  PyObject *__pyx_t_5 = NULL;
5240  PyObject *__pyx_t_6 = NULL;
5241  PyObject *__pyx_t_7 = NULL;
5242  PyObject *__pyx_t_8 = NULL;
5243  int __pyx_lineno = 0;
5244  const char *__pyx_filename = NULL;
5245  int __pyx_clineno = 0;
5246  __Pyx_RefNannySetupContext("import_umath", 0);
5247 
5248  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
5249  *
5250  * cdef inline int import_umath() except -1:
5251  * try: # <<<<<<<<<<<<<<
5252  * _import_umath()
5253  * except Exception:
5254  */
5255  {
5256  __Pyx_PyThreadState_declare
5257  __Pyx_PyThreadState_assign
5258  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5259  __Pyx_XGOTREF(__pyx_t_1);
5260  __Pyx_XGOTREF(__pyx_t_2);
5261  __Pyx_XGOTREF(__pyx_t_3);
5262  /*try:*/ {
5263 
5264  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
5265  * cdef inline int import_umath() except -1:
5266  * try:
5267  * _import_umath() # <<<<<<<<<<<<<<
5268  * except Exception:
5269  * raise ImportError("numpy.core.umath failed to import")
5270  */
5271  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)
5272 
5273  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
5274  *
5275  * cdef inline int import_umath() except -1:
5276  * try: # <<<<<<<<<<<<<<
5277  * _import_umath()
5278  * except Exception:
5279  */
5280  }
5281  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5282  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5283  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5284  goto __pyx_L8_try_end;
5285  __pyx_L3_error:;
5286 
5287  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
5288  * try:
5289  * _import_umath()
5290  * except Exception: # <<<<<<<<<<<<<<
5291  * raise ImportError("numpy.core.umath failed to import")
5292  *
5293  */
5294  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5295  if (__pyx_t_4) {
5296  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5297  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error)
5298  __Pyx_GOTREF(__pyx_t_5);
5299  __Pyx_GOTREF(__pyx_t_6);
5300  __Pyx_GOTREF(__pyx_t_7);
5301 
5302  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
5303  * _import_umath()
5304  * except Exception:
5305  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
5306  *
5307  * cdef inline int import_ufunc() except -1:
5308  */
5309  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error)
5310  __Pyx_GOTREF(__pyx_t_8);
5311  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5312  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5313  __PYX_ERR(2, 951, __pyx_L5_except_error)
5314  }
5315  goto __pyx_L5_except_error;
5316  __pyx_L5_except_error:;
5317 
5318  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
5319  *
5320  * cdef inline int import_umath() except -1:
5321  * try: # <<<<<<<<<<<<<<
5322  * _import_umath()
5323  * except Exception:
5324  */
5325  __Pyx_XGIVEREF(__pyx_t_1);
5326  __Pyx_XGIVEREF(__pyx_t_2);
5327  __Pyx_XGIVEREF(__pyx_t_3);
5328  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5329  goto __pyx_L1_error;
5330  __pyx_L8_try_end:;
5331  }
5332 
5333  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
5334  * raise ImportError("numpy.core.multiarray failed to import")
5335  *
5336  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5337  * try:
5338  * _import_umath()
5339  */
5340 
5341  /* function exit code */
5342  __pyx_r = 0;
5343  goto __pyx_L0;
5344  __pyx_L1_error:;
5345  __Pyx_XDECREF(__pyx_t_5);
5346  __Pyx_XDECREF(__pyx_t_6);
5347  __Pyx_XDECREF(__pyx_t_7);
5348  __Pyx_XDECREF(__pyx_t_8);
5349  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5350  __pyx_r = -1;
5351  __pyx_L0:;
5352  __Pyx_RefNannyFinishContext();
5353  return __pyx_r;
5354 }
5355 
5356 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
5357  * raise ImportError("numpy.core.umath failed to import")
5358  *
5359  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5360  * try:
5361  * _import_umath()
5362  */
5363 
5364 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
5365  int __pyx_r;
5366  __Pyx_RefNannyDeclarations
5367  PyObject *__pyx_t_1 = NULL;
5368  PyObject *__pyx_t_2 = NULL;
5369  PyObject *__pyx_t_3 = NULL;
5370  int __pyx_t_4;
5371  PyObject *__pyx_t_5 = NULL;
5372  PyObject *__pyx_t_6 = NULL;
5373  PyObject *__pyx_t_7 = NULL;
5374  PyObject *__pyx_t_8 = NULL;
5375  int __pyx_lineno = 0;
5376  const char *__pyx_filename = NULL;
5377  int __pyx_clineno = 0;
5378  __Pyx_RefNannySetupContext("import_ufunc", 0);
5379 
5380  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
5381  *
5382  * cdef inline int import_ufunc() except -1:
5383  * try: # <<<<<<<<<<<<<<
5384  * _import_umath()
5385  * except Exception:
5386  */
5387  {
5388  __Pyx_PyThreadState_declare
5389  __Pyx_PyThreadState_assign
5390  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5391  __Pyx_XGOTREF(__pyx_t_1);
5392  __Pyx_XGOTREF(__pyx_t_2);
5393  __Pyx_XGOTREF(__pyx_t_3);
5394  /*try:*/ {
5395 
5396  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
5397  * cdef inline int import_ufunc() except -1:
5398  * try:
5399  * _import_umath() # <<<<<<<<<<<<<<
5400  * except Exception:
5401  * raise ImportError("numpy.core.umath failed to import")
5402  */
5403  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)
5404 
5405  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
5406  *
5407  * cdef inline int import_ufunc() except -1:
5408  * try: # <<<<<<<<<<<<<<
5409  * _import_umath()
5410  * except Exception:
5411  */
5412  }
5413  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5414  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5415  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5416  goto __pyx_L8_try_end;
5417  __pyx_L3_error:;
5418 
5419  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
5420  * try:
5421  * _import_umath()
5422  * except Exception: # <<<<<<<<<<<<<<
5423  * raise ImportError("numpy.core.umath failed to import")
5424  *
5425  */
5426  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5427  if (__pyx_t_4) {
5428  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5429  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error)
5430  __Pyx_GOTREF(__pyx_t_5);
5431  __Pyx_GOTREF(__pyx_t_6);
5432  __Pyx_GOTREF(__pyx_t_7);
5433 
5434  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
5435  * _import_umath()
5436  * except Exception:
5437  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
5438  *
5439  * cdef extern from *:
5440  */
5441  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error)
5442  __Pyx_GOTREF(__pyx_t_8);
5443  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5444  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5445  __PYX_ERR(2, 957, __pyx_L5_except_error)
5446  }
5447  goto __pyx_L5_except_error;
5448  __pyx_L5_except_error:;
5449 
5450  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
5451  *
5452  * cdef inline int import_ufunc() except -1:
5453  * try: # <<<<<<<<<<<<<<
5454  * _import_umath()
5455  * except Exception:
5456  */
5457  __Pyx_XGIVEREF(__pyx_t_1);
5458  __Pyx_XGIVEREF(__pyx_t_2);
5459  __Pyx_XGIVEREF(__pyx_t_3);
5460  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5461  goto __pyx_L1_error;
5462  __pyx_L8_try_end:;
5463  }
5464 
5465  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
5466  * raise ImportError("numpy.core.umath failed to import")
5467  *
5468  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5469  * try:
5470  * _import_umath()
5471  */
5472 
5473  /* function exit code */
5474  __pyx_r = 0;
5475  goto __pyx_L0;
5476  __pyx_L1_error:;
5477  __Pyx_XDECREF(__pyx_t_5);
5478  __Pyx_XDECREF(__pyx_t_6);
5479  __Pyx_XDECREF(__pyx_t_7);
5480  __Pyx_XDECREF(__pyx_t_8);
5481  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5482  __pyx_r = -1;
5483  __pyx_L0:;
5484  __Pyx_RefNannyFinishContext();
5485  return __pyx_r;
5486 }
5487 
5488 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
5489  *
5490  *
5491  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
5492  * """
5493  * Cython equivalent of `isinstance(obj, np.timedelta64)`
5494  */
5495 
5496 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
5497  int __pyx_r;
5498  __Pyx_RefNannyDeclarations
5499  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
5500 
5501  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
5502  * bool
5503  * """
5504  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
5505  *
5506  *
5507  */
5508  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
5509  goto __pyx_L0;
5510 
5511  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
5512  *
5513  *
5514  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
5515  * """
5516  * Cython equivalent of `isinstance(obj, np.timedelta64)`
5517  */
5518 
5519  /* function exit code */
5520  __pyx_L0:;
5521  __Pyx_RefNannyFinishContext();
5522  return __pyx_r;
5523 }
5524 
5525 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
5526  *
5527  *
5528  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
5529  * """
5530  * Cython equivalent of `isinstance(obj, np.datetime64)`
5531  */
5532 
5533 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
5534  int __pyx_r;
5535  __Pyx_RefNannyDeclarations
5536  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
5537 
5538  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
5539  * bool
5540  * """
5541  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
5542  *
5543  *
5544  */
5545  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
5546  goto __pyx_L0;
5547 
5548  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
5549  *
5550  *
5551  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
5552  * """
5553  * Cython equivalent of `isinstance(obj, np.datetime64)`
5554  */
5555 
5556  /* function exit code */
5557  __pyx_L0:;
5558  __Pyx_RefNannyFinishContext();
5559  return __pyx_r;
5560 }
5561 
5562 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
5563  *
5564  *
5565  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
5566  * """
5567  * returns the int64 value underlying scalar numpy datetime64 object
5568  */
5569 
5570 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
5571  npy_datetime __pyx_r;
5572 
5573  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
5574  * also needed. That can be found using `get_datetime64_unit`.
5575  * """
5576  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
5577  *
5578  *
5579  */
5580  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
5581  goto __pyx_L0;
5582 
5583  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
5584  *
5585  *
5586  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
5587  * """
5588  * returns the int64 value underlying scalar numpy datetime64 object
5589  */
5590 
5591  /* function exit code */
5592  __pyx_L0:;
5593  return __pyx_r;
5594 }
5595 
5596 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
5597  *
5598  *
5599  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
5600  * """
5601  * returns the int64 value underlying scalar numpy timedelta64 object
5602  */
5603 
5604 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
5605  npy_timedelta __pyx_r;
5606 
5607  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
5608  * returns the int64 value underlying scalar numpy timedelta64 object
5609  * """
5610  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
5611  *
5612  *
5613  */
5614  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
5615  goto __pyx_L0;
5616 
5617  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
5618  *
5619  *
5620  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
5621  * """
5622  * returns the int64 value underlying scalar numpy timedelta64 object
5623  */
5624 
5625  /* function exit code */
5626  __pyx_L0:;
5627  return __pyx_r;
5628 }
5629 
5630 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
5631  *
5632  *
5633  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
5634  * """
5635  * returns the unit part of the dtype for a numpy datetime64 object.
5636  */
5637 
5638 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
5639  NPY_DATETIMEUNIT __pyx_r;
5640 
5641  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
5642  * returns the unit part of the dtype for a numpy datetime64 object.
5643  * """
5644  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
5645  */
5646  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
5647  goto __pyx_L0;
5648 
5649  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
5650  *
5651  *
5652  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
5653  * """
5654  * returns the unit part of the dtype for a numpy datetime64 object.
5655  */
5656 
5657  /* function exit code */
5658  __pyx_L0:;
5659  return __pyx_r;
5660 }
5661 
5662 /* "View.MemoryView":122
5663  * cdef bint dtype_is_object
5664  *
5665  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5666  * mode="c", bint allocate_buffer=True):
5667  *
5668  */
5669 
5670 /* Python wrapper */
5671 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5672 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5673  PyObject *__pyx_v_shape = 0;
5674  Py_ssize_t __pyx_v_itemsize;
5675  PyObject *__pyx_v_format = 0;
5676  PyObject *__pyx_v_mode = 0;
5677  int __pyx_v_allocate_buffer;
5678  int __pyx_lineno = 0;
5679  const char *__pyx_filename = NULL;
5680  int __pyx_clineno = 0;
5681  int __pyx_r;
5682  __Pyx_RefNannyDeclarations
5683  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
5684  {
5685  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};
5686  PyObject* values[5] = {0,0,0,0,0};
5687  values[3] = ((PyObject *)__pyx_n_s_c);
5688  if (unlikely(__pyx_kwds)) {
5689  Py_ssize_t kw_args;
5690  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5691  switch (pos_args) {
5692  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5693  CYTHON_FALLTHROUGH;
5694  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5695  CYTHON_FALLTHROUGH;
5696  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5697  CYTHON_FALLTHROUGH;
5698  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5699  CYTHON_FALLTHROUGH;
5700  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5701  CYTHON_FALLTHROUGH;
5702  case 0: break;
5703  default: goto __pyx_L5_argtuple_error;
5704  }
5705  kw_args = PyDict_Size(__pyx_kwds);
5706  switch (pos_args) {
5707  case 0:
5708  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
5709  else goto __pyx_L5_argtuple_error;
5710  CYTHON_FALLTHROUGH;
5711  case 1:
5712  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
5713  else {
5714  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
5715  }
5716  CYTHON_FALLTHROUGH;
5717  case 2:
5718  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
5719  else {
5720  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
5721  }
5722  CYTHON_FALLTHROUGH;
5723  case 3:
5724  if (kw_args > 0) {
5725  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
5726  if (value) { values[3] = value; kw_args--; }
5727  }
5728  CYTHON_FALLTHROUGH;
5729  case 4:
5730  if (kw_args > 0) {
5731  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
5732  if (value) { values[4] = value; kw_args--; }
5733  }
5734  }
5735  if (unlikely(kw_args > 0)) {
5736  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
5737  }
5738  } else {
5739  switch (PyTuple_GET_SIZE(__pyx_args)) {
5740  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5741  CYTHON_FALLTHROUGH;
5742  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5743  CYTHON_FALLTHROUGH;
5744  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5745  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5746  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5747  break;
5748  default: goto __pyx_L5_argtuple_error;
5749  }
5750  }
5751  __pyx_v_shape = ((PyObject*)values[0]);
5752  __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)
5753  __pyx_v_format = values[2];
5754  __pyx_v_mode = values[3];
5755  if (values[4]) {
5756  __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)
5757  } else {
5758 
5759  /* "View.MemoryView":123
5760  *
5761  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
5762  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
5763  *
5764  * cdef int idx
5765  */
5766  __pyx_v_allocate_buffer = ((int)1);
5767  }
5768  }
5769  goto __pyx_L4_argument_unpacking_done;
5770  __pyx_L5_argtuple_error:;
5771  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
5772  __pyx_L3_error:;
5773  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5774  __Pyx_RefNannyFinishContext();
5775  return -1;
5776  __pyx_L4_argument_unpacking_done:;
5777  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
5778  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
5779  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 122, __pyx_L1_error)
5780  }
5781  __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);
5782 
5783  /* "View.MemoryView":122
5784  * cdef bint dtype_is_object
5785  *
5786  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5787  * mode="c", bint allocate_buffer=True):
5788  *
5789  */
5790 
5791  /* function exit code */
5792  goto __pyx_L0;
5793  __pyx_L1_error:;
5794  __pyx_r = -1;
5795  __pyx_L0:;
5796  __Pyx_RefNannyFinishContext();
5797  return __pyx_r;
5798 }
5799 
5800 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) {
5801  int __pyx_v_idx;
5802  Py_ssize_t __pyx_v_i;
5803  Py_ssize_t __pyx_v_dim;
5804  PyObject **__pyx_v_p;
5805  char __pyx_v_order;
5806  int __pyx_r;
5807  __Pyx_RefNannyDeclarations
5808  Py_ssize_t __pyx_t_1;
5809  int __pyx_t_2;
5810  PyObject *__pyx_t_3 = NULL;
5811  int __pyx_t_4;
5812  PyObject *__pyx_t_5 = NULL;
5813  PyObject *__pyx_t_6 = NULL;
5814  char *__pyx_t_7;
5815  int __pyx_t_8;
5816  Py_ssize_t __pyx_t_9;
5817  PyObject *__pyx_t_10 = NULL;
5818  Py_ssize_t __pyx_t_11;
5819  int __pyx_lineno = 0;
5820  const char *__pyx_filename = NULL;
5821  int __pyx_clineno = 0;
5822  __Pyx_RefNannySetupContext("__cinit__", 0);
5823  __Pyx_INCREF(__pyx_v_format);
5824 
5825  /* "View.MemoryView":129
5826  * cdef PyObject **p
5827  *
5828  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
5829  * self.itemsize = itemsize
5830  *
5831  */
5832  if (unlikely(__pyx_v_shape == Py_None)) {
5833  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
5834  __PYX_ERR(0, 129, __pyx_L1_error)
5835  }
5836  __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)
5837  __pyx_v_self->ndim = ((int)__pyx_t_1);
5838 
5839  /* "View.MemoryView":130
5840  *
5841  * self.ndim = <int> len(shape)
5842  * self.itemsize = itemsize # <<<<<<<<<<<<<<
5843  *
5844  * if not self.ndim:
5845  */
5846  __pyx_v_self->itemsize = __pyx_v_itemsize;
5847 
5848  /* "View.MemoryView":132
5849  * self.itemsize = itemsize
5850  *
5851  * if not self.ndim: # <<<<<<<<<<<<<<
5852  * raise ValueError("Empty shape tuple for cython.array")
5853  *
5854  */
5855  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
5856  if (unlikely(__pyx_t_2)) {
5857 
5858  /* "View.MemoryView":133
5859  *
5860  * if not self.ndim:
5861  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
5862  *
5863  * if itemsize <= 0:
5864  */
5865  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
5866  __Pyx_GOTREF(__pyx_t_3);
5867  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5868  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5869  __PYX_ERR(0, 133, __pyx_L1_error)
5870 
5871  /* "View.MemoryView":132
5872  * self.itemsize = itemsize
5873  *
5874  * if not self.ndim: # <<<<<<<<<<<<<<
5875  * raise ValueError("Empty shape tuple for cython.array")
5876  *
5877  */
5878  }
5879 
5880  /* "View.MemoryView":135
5881  * raise ValueError("Empty shape tuple for cython.array")
5882  *
5883  * if itemsize <= 0: # <<<<<<<<<<<<<<
5884  * raise ValueError("itemsize <= 0 for cython.array")
5885  *
5886  */
5887  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
5888  if (unlikely(__pyx_t_2)) {
5889 
5890  /* "View.MemoryView":136
5891  *
5892  * if itemsize <= 0:
5893  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
5894  *
5895  * if not isinstance(format, bytes):
5896  */
5897  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
5898  __Pyx_GOTREF(__pyx_t_3);
5899  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5900  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5901  __PYX_ERR(0, 136, __pyx_L1_error)
5902 
5903  /* "View.MemoryView":135
5904  * raise ValueError("Empty shape tuple for cython.array")
5905  *
5906  * if itemsize <= 0: # <<<<<<<<<<<<<<
5907  * raise ValueError("itemsize <= 0 for cython.array")
5908  *
5909  */
5910  }
5911 
5912  /* "View.MemoryView":138
5913  * raise ValueError("itemsize <= 0 for cython.array")
5914  *
5915  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5916  * format = format.encode('ASCII')
5917  * self._format = format # keep a reference to the byte string
5918  */
5919  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
5920  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
5921  if (__pyx_t_4) {
5922 
5923  /* "View.MemoryView":139
5924  *
5925  * if not isinstance(format, bytes):
5926  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
5927  * self._format = format # keep a reference to the byte string
5928  * self.format = self._format
5929  */
5930  __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)
5931  __Pyx_GOTREF(__pyx_t_5);
5932  __pyx_t_6 = NULL;
5933  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
5934  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
5935  if (likely(__pyx_t_6)) {
5936  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5937  __Pyx_INCREF(__pyx_t_6);
5938  __Pyx_INCREF(function);
5939  __Pyx_DECREF_SET(__pyx_t_5, function);
5940  }
5941  }
5942  __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);
5943  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5944  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
5945  __Pyx_GOTREF(__pyx_t_3);
5946  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5947  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
5948  __pyx_t_3 = 0;
5949 
5950  /* "View.MemoryView":138
5951  * raise ValueError("itemsize <= 0 for cython.array")
5952  *
5953  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5954  * format = format.encode('ASCII')
5955  * self._format = format # keep a reference to the byte string
5956  */
5957  }
5958 
5959  /* "View.MemoryView":140
5960  * if not isinstance(format, bytes):
5961  * format = format.encode('ASCII')
5962  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
5963  * self.format = self._format
5964  *
5965  */
5966  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)
5967  __pyx_t_3 = __pyx_v_format;
5968  __Pyx_INCREF(__pyx_t_3);
5969  __Pyx_GIVEREF(__pyx_t_3);
5970  __Pyx_GOTREF(__pyx_v_self->_format);
5971  __Pyx_DECREF(__pyx_v_self->_format);
5972  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
5973  __pyx_t_3 = 0;
5974 
5975  /* "View.MemoryView":141
5976  * format = format.encode('ASCII')
5977  * self._format = format # keep a reference to the byte string
5978  * self.format = self._format # <<<<<<<<<<<<<<
5979  *
5980  *
5981  */
5982  if (unlikely(__pyx_v_self->_format == Py_None)) {
5983  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
5984  __PYX_ERR(0, 141, __pyx_L1_error)
5985  }
5986  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
5987  __pyx_v_self->format = __pyx_t_7;
5988 
5989  /* "View.MemoryView":144
5990  *
5991  *
5992  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
5993  * self._strides = self._shape + self.ndim
5994  *
5995  */
5996  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
5997 
5998  /* "View.MemoryView":145
5999  *
6000  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
6001  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
6002  *
6003  * if not self._shape:
6004  */
6005  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
6006 
6007  /* "View.MemoryView":147
6008  * self._strides = self._shape + self.ndim
6009  *
6010  * if not self._shape: # <<<<<<<<<<<<<<
6011  * raise MemoryError("unable to allocate shape and strides.")
6012  *
6013  */
6014  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
6015  if (unlikely(__pyx_t_4)) {
6016 
6017  /* "View.MemoryView":148
6018  *
6019  * if not self._shape:
6020  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
6021  *
6022  *
6023  */
6024  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
6025  __Pyx_GOTREF(__pyx_t_3);
6026  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6027  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6028  __PYX_ERR(0, 148, __pyx_L1_error)
6029 
6030  /* "View.MemoryView":147
6031  * self._strides = self._shape + self.ndim
6032  *
6033  * if not self._shape: # <<<<<<<<<<<<<<
6034  * raise MemoryError("unable to allocate shape and strides.")
6035  *
6036  */
6037  }
6038 
6039  /* "View.MemoryView":151
6040  *
6041  *
6042  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
6043  * if dim <= 0:
6044  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6045  */
6046  __pyx_t_8 = 0;
6047  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
6048  for (;;) {
6049  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
6050  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6051  __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)
6052  #else
6053  __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)
6054  __Pyx_GOTREF(__pyx_t_5);
6055  #endif
6056  __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)
6057  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6058  __pyx_v_dim = __pyx_t_9;
6059  __pyx_v_idx = __pyx_t_8;
6060  __pyx_t_8 = (__pyx_t_8 + 1);
6061 
6062  /* "View.MemoryView":152
6063  *
6064  * for idx, dim in enumerate(shape):
6065  * if dim <= 0: # <<<<<<<<<<<<<<
6066  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6067  * self._shape[idx] = dim
6068  */
6069  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
6070  if (unlikely(__pyx_t_4)) {
6071 
6072  /* "View.MemoryView":153
6073  * for idx, dim in enumerate(shape):
6074  * if dim <= 0:
6075  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
6076  * self._shape[idx] = dim
6077  *
6078  */
6079  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
6080  __Pyx_GOTREF(__pyx_t_5);
6081  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
6082  __Pyx_GOTREF(__pyx_t_6);
6083  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
6084  __Pyx_GOTREF(__pyx_t_10);
6085  __Pyx_GIVEREF(__pyx_t_5);
6086  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
6087  __Pyx_GIVEREF(__pyx_t_6);
6088  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
6089  __pyx_t_5 = 0;
6090  __pyx_t_6 = 0;
6091  __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)
6092  __Pyx_GOTREF(__pyx_t_6);
6093  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6094  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
6095  __Pyx_GOTREF(__pyx_t_10);
6096  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6097  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6098  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6099  __PYX_ERR(0, 153, __pyx_L1_error)
6100 
6101  /* "View.MemoryView":152
6102  *
6103  * for idx, dim in enumerate(shape):
6104  * if dim <= 0: # <<<<<<<<<<<<<<
6105  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6106  * self._shape[idx] = dim
6107  */
6108  }
6109 
6110  /* "View.MemoryView":154
6111  * if dim <= 0:
6112  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6113  * self._shape[idx] = dim # <<<<<<<<<<<<<<
6114  *
6115  * cdef char order
6116  */
6117  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
6118 
6119  /* "View.MemoryView":151
6120  *
6121  *
6122  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
6123  * if dim <= 0:
6124  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6125  */
6126  }
6127  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6128 
6129  /* "View.MemoryView":157
6130  *
6131  * cdef char order
6132  * if mode == 'fortran': # <<<<<<<<<<<<<<
6133  * order = b'F'
6134  * self.mode = u'fortran'
6135  */
6136  __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)
6137  if (__pyx_t_4) {
6138 
6139  /* "View.MemoryView":158
6140  * cdef char order
6141  * if mode == 'fortran':
6142  * order = b'F' # <<<<<<<<<<<<<<
6143  * self.mode = u'fortran'
6144  * elif mode == 'c':
6145  */
6146  __pyx_v_order = 'F';
6147 
6148  /* "View.MemoryView":159
6149  * if mode == 'fortran':
6150  * order = b'F'
6151  * self.mode = u'fortran' # <<<<<<<<<<<<<<
6152  * elif mode == 'c':
6153  * order = b'C'
6154  */
6155  __Pyx_INCREF(__pyx_n_u_fortran);
6156  __Pyx_GIVEREF(__pyx_n_u_fortran);
6157  __Pyx_GOTREF(__pyx_v_self->mode);
6158  __Pyx_DECREF(__pyx_v_self->mode);
6159  __pyx_v_self->mode = __pyx_n_u_fortran;
6160 
6161  /* "View.MemoryView":157
6162  *
6163  * cdef char order
6164  * if mode == 'fortran': # <<<<<<<<<<<<<<
6165  * order = b'F'
6166  * self.mode = u'fortran'
6167  */
6168  goto __pyx_L10;
6169  }
6170 
6171  /* "View.MemoryView":160
6172  * order = b'F'
6173  * self.mode = u'fortran'
6174  * elif mode == 'c': # <<<<<<<<<<<<<<
6175  * order = b'C'
6176  * self.mode = u'c'
6177  */
6178  __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)
6179  if (likely(__pyx_t_4)) {
6180 
6181  /* "View.MemoryView":161
6182  * self.mode = u'fortran'
6183  * elif mode == 'c':
6184  * order = b'C' # <<<<<<<<<<<<<<
6185  * self.mode = u'c'
6186  * else:
6187  */
6188  __pyx_v_order = 'C';
6189 
6190  /* "View.MemoryView":162
6191  * elif mode == 'c':
6192  * order = b'C'
6193  * self.mode = u'c' # <<<<<<<<<<<<<<
6194  * else:
6195  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
6196  */
6197  __Pyx_INCREF(__pyx_n_u_c);
6198  __Pyx_GIVEREF(__pyx_n_u_c);
6199  __Pyx_GOTREF(__pyx_v_self->mode);
6200  __Pyx_DECREF(__pyx_v_self->mode);
6201  __pyx_v_self->mode = __pyx_n_u_c;
6202 
6203  /* "View.MemoryView":160
6204  * order = b'F'
6205  * self.mode = u'fortran'
6206  * elif mode == 'c': # <<<<<<<<<<<<<<
6207  * order = b'C'
6208  * self.mode = u'c'
6209  */
6210  goto __pyx_L10;
6211  }
6212 
6213  /* "View.MemoryView":164
6214  * self.mode = u'c'
6215  * else:
6216  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
6217  *
6218  * self.len = fill_contig_strides_array(self._shape, self._strides,
6219  */
6220  /*else*/ {
6221  __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)
6222  __Pyx_GOTREF(__pyx_t_3);
6223  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 164, __pyx_L1_error)
6224  __Pyx_GOTREF(__pyx_t_10);
6225  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6226  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6227  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6228  __PYX_ERR(0, 164, __pyx_L1_error)
6229  }
6230  __pyx_L10:;
6231 
6232  /* "View.MemoryView":166
6233  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
6234  *
6235  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
6236  * itemsize, self.ndim, order)
6237  *
6238  */
6239  __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);
6240 
6241  /* "View.MemoryView":169
6242  * itemsize, self.ndim, order)
6243  *
6244  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
6245  * self.dtype_is_object = format == b'O'
6246  * if allocate_buffer:
6247  */
6248  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
6249 
6250  /* "View.MemoryView":170
6251  *
6252  * self.free_data = allocate_buffer
6253  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
6254  * if allocate_buffer:
6255  *
6256  */
6257  __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)
6258  __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)
6259  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6260  __pyx_v_self->dtype_is_object = __pyx_t_4;
6261 
6262  /* "View.MemoryView":171
6263  * self.free_data = allocate_buffer
6264  * self.dtype_is_object = format == b'O'
6265  * if allocate_buffer: # <<<<<<<<<<<<<<
6266  *
6267  *
6268  */
6269  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
6270  if (__pyx_t_4) {
6271 
6272  /* "View.MemoryView":174
6273  *
6274  *
6275  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
6276  * if not self.data:
6277  * raise MemoryError("unable to allocate array data.")
6278  */
6279  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
6280 
6281  /* "View.MemoryView":175
6282  *
6283  * self.data = <char *>malloc(self.len)
6284  * if not self.data: # <<<<<<<<<<<<<<
6285  * raise MemoryError("unable to allocate array data.")
6286  *
6287  */
6288  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
6289  if (unlikely(__pyx_t_4)) {
6290 
6291  /* "View.MemoryView":176
6292  * self.data = <char *>malloc(self.len)
6293  * if not self.data:
6294  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
6295  *
6296  * if self.dtype_is_object:
6297  */
6298  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error)
6299  __Pyx_GOTREF(__pyx_t_10);
6300  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6301  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6302  __PYX_ERR(0, 176, __pyx_L1_error)
6303 
6304  /* "View.MemoryView":175
6305  *
6306  * self.data = <char *>malloc(self.len)
6307  * if not self.data: # <<<<<<<<<<<<<<
6308  * raise MemoryError("unable to allocate array data.")
6309  *
6310  */
6311  }
6312 
6313  /* "View.MemoryView":178
6314  * raise MemoryError("unable to allocate array data.")
6315  *
6316  * if self.dtype_is_object: # <<<<<<<<<<<<<<
6317  * p = <PyObject **> self.data
6318  * for i in range(self.len / itemsize):
6319  */
6320  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
6321  if (__pyx_t_4) {
6322 
6323  /* "View.MemoryView":179
6324  *
6325  * if self.dtype_is_object:
6326  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
6327  * for i in range(self.len / itemsize):
6328  * p[i] = Py_None
6329  */
6330  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
6331 
6332  /* "View.MemoryView":180
6333  * if self.dtype_is_object:
6334  * p = <PyObject **> self.data
6335  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
6336  * p[i] = Py_None
6337  * Py_INCREF(Py_None)
6338  */
6339  if (unlikely(__pyx_v_itemsize == 0)) {
6340  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
6341  __PYX_ERR(0, 180, __pyx_L1_error)
6342  }
6343  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))) {
6344  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
6345  __PYX_ERR(0, 180, __pyx_L1_error)
6346  }
6347  __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
6348  __pyx_t_9 = __pyx_t_1;
6349  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
6350  __pyx_v_i = __pyx_t_11;
6351 
6352  /* "View.MemoryView":181
6353  * p = <PyObject **> self.data
6354  * for i in range(self.len / itemsize):
6355  * p[i] = Py_None # <<<<<<<<<<<<<<
6356  * Py_INCREF(Py_None)
6357  *
6358  */
6359  (__pyx_v_p[__pyx_v_i]) = Py_None;
6360 
6361  /* "View.MemoryView":182
6362  * for i in range(self.len / itemsize):
6363  * p[i] = Py_None
6364  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
6365  *
6366  * @cname('getbuffer')
6367  */
6368  Py_INCREF(Py_None);
6369  }
6370 
6371  /* "View.MemoryView":178
6372  * raise MemoryError("unable to allocate array data.")
6373  *
6374  * if self.dtype_is_object: # <<<<<<<<<<<<<<
6375  * p = <PyObject **> self.data
6376  * for i in range(self.len / itemsize):
6377  */
6378  }
6379 
6380  /* "View.MemoryView":171
6381  * self.free_data = allocate_buffer
6382  * self.dtype_is_object = format == b'O'
6383  * if allocate_buffer: # <<<<<<<<<<<<<<
6384  *
6385  *
6386  */
6387  }
6388 
6389  /* "View.MemoryView":122
6390  * cdef bint dtype_is_object
6391  *
6392  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6393  * mode="c", bint allocate_buffer=True):
6394  *
6395  */
6396 
6397  /* function exit code */
6398  __pyx_r = 0;
6399  goto __pyx_L0;
6400  __pyx_L1_error:;
6401  __Pyx_XDECREF(__pyx_t_3);
6402  __Pyx_XDECREF(__pyx_t_5);
6403  __Pyx_XDECREF(__pyx_t_6);
6404  __Pyx_XDECREF(__pyx_t_10);
6405  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6406  __pyx_r = -1;
6407  __pyx_L0:;
6408  __Pyx_XDECREF(__pyx_v_format);
6409  __Pyx_RefNannyFinishContext();
6410  return __pyx_r;
6411 }
6412 
6413 /* "View.MemoryView":185
6414  *
6415  * @cname('getbuffer')
6416  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
6417  * cdef int bufmode = -1
6418  * if self.mode == u"c":
6419  */
6420 
6421 /* Python wrapper */
6422 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
6423 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
6424  int __pyx_r;
6425  __Pyx_RefNannyDeclarations
6426  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
6427  __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));
6428 
6429  /* function exit code */
6430  __Pyx_RefNannyFinishContext();
6431  return __pyx_r;
6432 }
6433 
6434 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) {
6435  int __pyx_v_bufmode;
6436  int __pyx_r;
6437  __Pyx_RefNannyDeclarations
6438  int __pyx_t_1;
6439  int __pyx_t_2;
6440  PyObject *__pyx_t_3 = NULL;
6441  char *__pyx_t_4;
6442  Py_ssize_t __pyx_t_5;
6443  int __pyx_t_6;
6444  Py_ssize_t *__pyx_t_7;
6445  int __pyx_lineno = 0;
6446  const char *__pyx_filename = NULL;
6447  int __pyx_clineno = 0;
6448  if (__pyx_v_info == NULL) {
6449  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
6450  return -1;
6451  }
6452  __Pyx_RefNannySetupContext("__getbuffer__", 0);
6453  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
6454  __Pyx_GIVEREF(__pyx_v_info->obj);
6455 
6456  /* "View.MemoryView":186
6457  * @cname('getbuffer')
6458  * def __getbuffer__(self, Py_buffer *info, int flags):
6459  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
6460  * if self.mode == u"c":
6461  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6462  */
6463  __pyx_v_bufmode = -1;
6464 
6465  /* "View.MemoryView":187
6466  * def __getbuffer__(self, Py_buffer *info, int flags):
6467  * cdef int bufmode = -1
6468  * if self.mode == u"c": # <<<<<<<<<<<<<<
6469  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6470  * elif self.mode == u"fortran":
6471  */
6472  __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)
6473  __pyx_t_2 = (__pyx_t_1 != 0);
6474  if (__pyx_t_2) {
6475 
6476  /* "View.MemoryView":188
6477  * cdef int bufmode = -1
6478  * if self.mode == u"c":
6479  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
6480  * elif self.mode == u"fortran":
6481  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6482  */
6483  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
6484 
6485  /* "View.MemoryView":187
6486  * def __getbuffer__(self, Py_buffer *info, int flags):
6487  * cdef int bufmode = -1
6488  * if self.mode == u"c": # <<<<<<<<<<<<<<
6489  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6490  * elif self.mode == u"fortran":
6491  */
6492  goto __pyx_L3;
6493  }
6494 
6495  /* "View.MemoryView":189
6496  * if self.mode == u"c":
6497  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6498  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
6499  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6500  * if not (flags & bufmode):
6501  */
6502  __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)
6503  __pyx_t_1 = (__pyx_t_2 != 0);
6504  if (__pyx_t_1) {
6505 
6506  /* "View.MemoryView":190
6507  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6508  * elif self.mode == u"fortran":
6509  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
6510  * if not (flags & bufmode):
6511  * raise ValueError("Can only create a buffer that is contiguous in memory.")
6512  */
6513  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
6514 
6515  /* "View.MemoryView":189
6516  * if self.mode == u"c":
6517  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6518  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
6519  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6520  * if not (flags & bufmode):
6521  */
6522  }
6523  __pyx_L3:;
6524 
6525  /* "View.MemoryView":191
6526  * elif self.mode == u"fortran":
6527  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6528  * if not (flags & bufmode): # <<<<<<<<<<<<<<
6529  * raise ValueError("Can only create a buffer that is contiguous in memory.")
6530  * info.buf = self.data
6531  */
6532  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
6533  if (unlikely(__pyx_t_1)) {
6534 
6535  /* "View.MemoryView":192
6536  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6537  * if not (flags & bufmode):
6538  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
6539  * info.buf = self.data
6540  * info.len = self.len
6541  */
6542  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
6543  __Pyx_GOTREF(__pyx_t_3);
6544  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6545  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6546  __PYX_ERR(0, 192, __pyx_L1_error)
6547 
6548  /* "View.MemoryView":191
6549  * elif self.mode == u"fortran":
6550  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
6551  * if not (flags & bufmode): # <<<<<<<<<<<<<<
6552  * raise ValueError("Can only create a buffer that is contiguous in memory.")
6553  * info.buf = self.data
6554  */
6555  }
6556 
6557  /* "View.MemoryView":193
6558  * if not (flags & bufmode):
6559  * raise ValueError("Can only create a buffer that is contiguous in memory.")
6560  * info.buf = self.data # <<<<<<<<<<<<<<
6561  * info.len = self.len
6562  * info.ndim = self.ndim
6563  */
6564  __pyx_t_4 = __pyx_v_self->data;
6565  __pyx_v_info->buf = __pyx_t_4;
6566 
6567  /* "View.MemoryView":194
6568  * raise ValueError("Can only create a buffer that is contiguous in memory.")
6569  * info.buf = self.data
6570  * info.len = self.len # <<<<<<<<<<<<<<
6571  * info.ndim = self.ndim
6572  * info.shape = self._shape
6573  */
6574  __pyx_t_5 = __pyx_v_self->len;
6575  __pyx_v_info->len = __pyx_t_5;
6576 
6577  /* "View.MemoryView":195
6578  * info.buf = self.data
6579  * info.len = self.len
6580  * info.ndim = self.ndim # <<<<<<<<<<<<<<
6581  * info.shape = self._shape
6582  * info.strides = self._strides
6583  */
6584  __pyx_t_6 = __pyx_v_self->ndim;
6585  __pyx_v_info->ndim = __pyx_t_6;
6586 
6587  /* "View.MemoryView":196
6588  * info.len = self.len
6589  * info.ndim = self.ndim
6590  * info.shape = self._shape # <<<<<<<<<<<<<<
6591  * info.strides = self._strides
6592  * info.suboffsets = NULL
6593  */
6594  __pyx_t_7 = __pyx_v_self->_shape;
6595  __pyx_v_info->shape = __pyx_t_7;
6596 
6597  /* "View.MemoryView":197
6598  * info.ndim = self.ndim
6599  * info.shape = self._shape
6600  * info.strides = self._strides # <<<<<<<<<<<<<<
6601  * info.suboffsets = NULL
6602  * info.itemsize = self.itemsize
6603  */
6604  __pyx_t_7 = __pyx_v_self->_strides;
6605  __pyx_v_info->strides = __pyx_t_7;
6606 
6607  /* "View.MemoryView":198
6608  * info.shape = self._shape
6609  * info.strides = self._strides
6610  * info.suboffsets = NULL # <<<<<<<<<<<<<<
6611  * info.itemsize = self.itemsize
6612  * info.readonly = 0
6613  */
6614  __pyx_v_info->suboffsets = NULL;
6615 
6616  /* "View.MemoryView":199
6617  * info.strides = self._strides
6618  * info.suboffsets = NULL
6619  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
6620  * info.readonly = 0
6621  *
6622  */
6623  __pyx_t_5 = __pyx_v_self->itemsize;
6624  __pyx_v_info->itemsize = __pyx_t_5;
6625 
6626  /* "View.MemoryView":200
6627  * info.suboffsets = NULL
6628  * info.itemsize = self.itemsize
6629  * info.readonly = 0 # <<<<<<<<<<<<<<
6630  *
6631  * if flags & PyBUF_FORMAT:
6632  */
6633  __pyx_v_info->readonly = 0;
6634 
6635  /* "View.MemoryView":202
6636  * info.readonly = 0
6637  *
6638  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
6639  * info.format = self.format
6640  * else:
6641  */
6642  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
6643  if (__pyx_t_1) {
6644 
6645  /* "View.MemoryView":203
6646  *
6647  * if flags & PyBUF_FORMAT:
6648  * info.format = self.format # <<<<<<<<<<<<<<
6649  * else:
6650  * info.format = NULL
6651  */
6652  __pyx_t_4 = __pyx_v_self->format;
6653  __pyx_v_info->format = __pyx_t_4;
6654 
6655  /* "View.MemoryView":202
6656  * info.readonly = 0
6657  *
6658  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
6659  * info.format = self.format
6660  * else:
6661  */
6662  goto __pyx_L5;
6663  }
6664 
6665  /* "View.MemoryView":205
6666  * info.format = self.format
6667  * else:
6668  * info.format = NULL # <<<<<<<<<<<<<<
6669  *
6670  * info.obj = self
6671  */
6672  /*else*/ {
6673  __pyx_v_info->format = NULL;
6674  }
6675  __pyx_L5:;
6676 
6677  /* "View.MemoryView":207
6678  * info.format = NULL
6679  *
6680  * info.obj = self # <<<<<<<<<<<<<<
6681  *
6682  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
6683  */
6684  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6685  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6686  __Pyx_GOTREF(__pyx_v_info->obj);
6687  __Pyx_DECREF(__pyx_v_info->obj);
6688  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
6689 
6690  /* "View.MemoryView":185
6691  *
6692  * @cname('getbuffer')
6693  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
6694  * cdef int bufmode = -1
6695  * if self.mode == u"c":
6696  */
6697 
6698  /* function exit code */
6699  __pyx_r = 0;
6700  goto __pyx_L0;
6701  __pyx_L1_error:;
6702  __Pyx_XDECREF(__pyx_t_3);
6703  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6704  __pyx_r = -1;
6705  if (__pyx_v_info->obj != NULL) {
6706  __Pyx_GOTREF(__pyx_v_info->obj);
6707  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
6708  }
6709  goto __pyx_L2;
6710  __pyx_L0:;
6711  if (__pyx_v_info->obj == Py_None) {
6712  __Pyx_GOTREF(__pyx_v_info->obj);
6713  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
6714  }
6715  __pyx_L2:;
6716  __Pyx_RefNannyFinishContext();
6717  return __pyx_r;
6718 }
6719 
6720 /* "View.MemoryView":211
6721  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
6722  *
6723  * def __dealloc__(array self): # <<<<<<<<<<<<<<
6724  * if self.callback_free_data != NULL:
6725  * self.callback_free_data(self.data)
6726  */
6727 
6728 /* Python wrapper */
6729 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
6730 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
6731  __Pyx_RefNannyDeclarations
6732  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
6733  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
6734 
6735  /* function exit code */
6736  __Pyx_RefNannyFinishContext();
6737 }
6738 
6739 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
6740  __Pyx_RefNannyDeclarations
6741  int __pyx_t_1;
6742  __Pyx_RefNannySetupContext("__dealloc__", 0);
6743 
6744  /* "View.MemoryView":212
6745  *
6746  * def __dealloc__(array self):
6747  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6748  * self.callback_free_data(self.data)
6749  * elif self.free_data:
6750  */
6751  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
6752  if (__pyx_t_1) {
6753 
6754  /* "View.MemoryView":213
6755  * def __dealloc__(array self):
6756  * if self.callback_free_data != NULL:
6757  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
6758  * elif self.free_data:
6759  * if self.dtype_is_object:
6760  */
6761  __pyx_v_self->callback_free_data(__pyx_v_self->data);
6762 
6763  /* "View.MemoryView":212
6764  *
6765  * def __dealloc__(array self):
6766  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6767  * self.callback_free_data(self.data)
6768  * elif self.free_data:
6769  */
6770  goto __pyx_L3;
6771  }
6772 
6773  /* "View.MemoryView":214
6774  * if self.callback_free_data != NULL:
6775  * self.callback_free_data(self.data)
6776  * elif self.free_data: # <<<<<<<<<<<<<<
6777  * if self.dtype_is_object:
6778  * refcount_objects_in_slice(self.data, self._shape,
6779  */
6780  __pyx_t_1 = (__pyx_v_self->free_data != 0);
6781  if (__pyx_t_1) {
6782 
6783  /* "View.MemoryView":215
6784  * self.callback_free_data(self.data)
6785  * elif self.free_data:
6786  * if self.dtype_is_object: # <<<<<<<<<<<<<<
6787  * refcount_objects_in_slice(self.data, self._shape,
6788  * self._strides, self.ndim, False)
6789  */
6790  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
6791  if (__pyx_t_1) {
6792 
6793  /* "View.MemoryView":216
6794  * elif self.free_data:
6795  * if self.dtype_is_object:
6796  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
6797  * self._strides, self.ndim, False)
6798  * free(self.data)
6799  */
6800  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
6801 
6802  /* "View.MemoryView":215
6803  * self.callback_free_data(self.data)
6804  * elif self.free_data:
6805  * if self.dtype_is_object: # <<<<<<<<<<<<<<
6806  * refcount_objects_in_slice(self.data, self._shape,
6807  * self._strides, self.ndim, False)
6808  */
6809  }
6810 
6811  /* "View.MemoryView":218
6812  * refcount_objects_in_slice(self.data, self._shape,
6813  * self._strides, self.ndim, False)
6814  * free(self.data) # <<<<<<<<<<<<<<
6815  * PyObject_Free(self._shape)
6816  *
6817  */
6818  free(__pyx_v_self->data);
6819 
6820  /* "View.MemoryView":214
6821  * if self.callback_free_data != NULL:
6822  * self.callback_free_data(self.data)
6823  * elif self.free_data: # <<<<<<<<<<<<<<
6824  * if self.dtype_is_object:
6825  * refcount_objects_in_slice(self.data, self._shape,
6826  */
6827  }
6828  __pyx_L3:;
6829 
6830  /* "View.MemoryView":219
6831  * self._strides, self.ndim, False)
6832  * free(self.data)
6833  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
6834  *
6835  * @property
6836  */
6837  PyObject_Free(__pyx_v_self->_shape);
6838 
6839  /* "View.MemoryView":211
6840  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
6841  *
6842  * def __dealloc__(array self): # <<<<<<<<<<<<<<
6843  * if self.callback_free_data != NULL:
6844  * self.callback_free_data(self.data)
6845  */
6846 
6847  /* function exit code */
6848  __Pyx_RefNannyFinishContext();
6849 }
6850 
6851 /* "View.MemoryView":222
6852  *
6853  * @property
6854  * def memview(self): # <<<<<<<<<<<<<<
6855  * return self.get_memview()
6856  *
6857  */
6858 
6859 /* Python wrapper */
6860 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
6861 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
6862  PyObject *__pyx_r = 0;
6863  __Pyx_RefNannyDeclarations
6864  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6865  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
6866 
6867  /* function exit code */
6868  __Pyx_RefNannyFinishContext();
6869  return __pyx_r;
6870 }
6871 
6872 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
6873  PyObject *__pyx_r = NULL;
6874  __Pyx_RefNannyDeclarations
6875  PyObject *__pyx_t_1 = NULL;
6876  int __pyx_lineno = 0;
6877  const char *__pyx_filename = NULL;
6878  int __pyx_clineno = 0;
6879  __Pyx_RefNannySetupContext("__get__", 0);
6880 
6881  /* "View.MemoryView":223
6882  * @property
6883  * def memview(self):
6884  * return self.get_memview() # <<<<<<<<<<<<<<
6885  *
6886  * @cname('get_memview')
6887  */
6888  __Pyx_XDECREF(__pyx_r);
6889  __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)
6890  __Pyx_GOTREF(__pyx_t_1);
6891  __pyx_r = __pyx_t_1;
6892  __pyx_t_1 = 0;
6893  goto __pyx_L0;
6894 
6895  /* "View.MemoryView":222
6896  *
6897  * @property
6898  * def memview(self): # <<<<<<<<<<<<<<
6899  * return self.get_memview()
6900  *
6901  */
6902 
6903  /* function exit code */
6904  __pyx_L1_error:;
6905  __Pyx_XDECREF(__pyx_t_1);
6906  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6907  __pyx_r = NULL;
6908  __pyx_L0:;
6909  __Pyx_XGIVEREF(__pyx_r);
6910  __Pyx_RefNannyFinishContext();
6911  return __pyx_r;
6912 }
6913 
6914 /* "View.MemoryView":226
6915  *
6916  * @cname('get_memview')
6917  * cdef get_memview(self): # <<<<<<<<<<<<<<
6918  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6919  * return memoryview(self, flags, self.dtype_is_object)
6920  */
6921 
6922 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
6923  int __pyx_v_flags;
6924  PyObject *__pyx_r = NULL;
6925  __Pyx_RefNannyDeclarations
6926  PyObject *__pyx_t_1 = NULL;
6927  PyObject *__pyx_t_2 = NULL;
6928  PyObject *__pyx_t_3 = NULL;
6929  int __pyx_lineno = 0;
6930  const char *__pyx_filename = NULL;
6931  int __pyx_clineno = 0;
6932  __Pyx_RefNannySetupContext("get_memview", 0);
6933 
6934  /* "View.MemoryView":227
6935  * @cname('get_memview')
6936  * cdef get_memview(self):
6937  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
6938  * return memoryview(self, flags, self.dtype_is_object)
6939  *
6940  */
6941  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
6942 
6943  /* "View.MemoryView":228
6944  * cdef get_memview(self):
6945  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6946  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
6947  *
6948  * def __len__(self):
6949  */
6950  __Pyx_XDECREF(__pyx_r);
6951  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
6952  __Pyx_GOTREF(__pyx_t_1);
6953  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
6954  __Pyx_GOTREF(__pyx_t_2);
6955  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
6956  __Pyx_GOTREF(__pyx_t_3);
6957  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6958  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6959  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
6960  __Pyx_GIVEREF(__pyx_t_1);
6961  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
6962  __Pyx_GIVEREF(__pyx_t_2);
6963  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
6964  __pyx_t_1 = 0;
6965  __pyx_t_2 = 0;
6966  __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)
6967  __Pyx_GOTREF(__pyx_t_2);
6968  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6969  __pyx_r = __pyx_t_2;
6970  __pyx_t_2 = 0;
6971  goto __pyx_L0;
6972 
6973  /* "View.MemoryView":226
6974  *
6975  * @cname('get_memview')
6976  * cdef get_memview(self): # <<<<<<<<<<<<<<
6977  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6978  * return memoryview(self, flags, self.dtype_is_object)
6979  */
6980 
6981  /* function exit code */
6982  __pyx_L1_error:;
6983  __Pyx_XDECREF(__pyx_t_1);
6984  __Pyx_XDECREF(__pyx_t_2);
6985  __Pyx_XDECREF(__pyx_t_3);
6986  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
6987  __pyx_r = 0;
6988  __pyx_L0:;
6989  __Pyx_XGIVEREF(__pyx_r);
6990  __Pyx_RefNannyFinishContext();
6991  return __pyx_r;
6992 }
6993 
6994 /* "View.MemoryView":230
6995  * return memoryview(self, flags, self.dtype_is_object)
6996  *
6997  * def __len__(self): # <<<<<<<<<<<<<<
6998  * return self._shape[0]
6999  *
7000  */
7001 
7002 /* Python wrapper */
7003 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
7004 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
7005  Py_ssize_t __pyx_r;
7006  __Pyx_RefNannyDeclarations
7007  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
7008  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
7009 
7010  /* function exit code */
7011  __Pyx_RefNannyFinishContext();
7012  return __pyx_r;
7013 }
7014 
7015 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
7016  Py_ssize_t __pyx_r;
7017  __Pyx_RefNannyDeclarations
7018  __Pyx_RefNannySetupContext("__len__", 0);
7019 
7020  /* "View.MemoryView":231
7021  *
7022  * def __len__(self):
7023  * return self._shape[0] # <<<<<<<<<<<<<<
7024  *
7025  * def __getattr__(self, attr):
7026  */
7027  __pyx_r = (__pyx_v_self->_shape[0]);
7028  goto __pyx_L0;
7029 
7030  /* "View.MemoryView":230
7031  * return memoryview(self, flags, self.dtype_is_object)
7032  *
7033  * def __len__(self): # <<<<<<<<<<<<<<
7034  * return self._shape[0]
7035  *
7036  */
7037 
7038  /* function exit code */
7039  __pyx_L0:;
7040  __Pyx_RefNannyFinishContext();
7041  return __pyx_r;
7042 }
7043 
7044 /* "View.MemoryView":233
7045  * return self._shape[0]
7046  *
7047  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
7048  * return getattr(self.memview, attr)
7049  *
7050  */
7051 
7052 /* Python wrapper */
7053 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
7054 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
7055  PyObject *__pyx_r = 0;
7056  __Pyx_RefNannyDeclarations
7057  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
7058  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
7059 
7060  /* function exit code */
7061  __Pyx_RefNannyFinishContext();
7062  return __pyx_r;
7063 }
7064 
7065 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
7066  PyObject *__pyx_r = NULL;
7067  __Pyx_RefNannyDeclarations
7068  PyObject *__pyx_t_1 = NULL;
7069  PyObject *__pyx_t_2 = NULL;
7070  int __pyx_lineno = 0;
7071  const char *__pyx_filename = NULL;
7072  int __pyx_clineno = 0;
7073  __Pyx_RefNannySetupContext("__getattr__", 0);
7074 
7075  /* "View.MemoryView":234
7076  *
7077  * def __getattr__(self, attr):
7078  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
7079  *
7080  * def __getitem__(self, item):
7081  */
7082  __Pyx_XDECREF(__pyx_r);
7083  __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)
7084  __Pyx_GOTREF(__pyx_t_1);
7085  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
7086  __Pyx_GOTREF(__pyx_t_2);
7087  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7088  __pyx_r = __pyx_t_2;
7089  __pyx_t_2 = 0;
7090  goto __pyx_L0;
7091 
7092  /* "View.MemoryView":233
7093  * return self._shape[0]
7094  *
7095  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
7096  * return getattr(self.memview, attr)
7097  *
7098  */
7099 
7100  /* function exit code */
7101  __pyx_L1_error:;
7102  __Pyx_XDECREF(__pyx_t_1);
7103  __Pyx_XDECREF(__pyx_t_2);
7104  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7105  __pyx_r = NULL;
7106  __pyx_L0:;
7107  __Pyx_XGIVEREF(__pyx_r);
7108  __Pyx_RefNannyFinishContext();
7109  return __pyx_r;
7110 }
7111 
7112 /* "View.MemoryView":236
7113  * return getattr(self.memview, attr)
7114  *
7115  * def __getitem__(self, item): # <<<<<<<<<<<<<<
7116  * return self.memview[item]
7117  *
7118  */
7119 
7120 /* Python wrapper */
7121 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
7122 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
7123  PyObject *__pyx_r = 0;
7124  __Pyx_RefNannyDeclarations
7125  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7126  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
7127 
7128  /* function exit code */
7129  __Pyx_RefNannyFinishContext();
7130  return __pyx_r;
7131 }
7132 
7133 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
7134  PyObject *__pyx_r = NULL;
7135  __Pyx_RefNannyDeclarations
7136  PyObject *__pyx_t_1 = NULL;
7137  PyObject *__pyx_t_2 = NULL;
7138  int __pyx_lineno = 0;
7139  const char *__pyx_filename = NULL;
7140  int __pyx_clineno = 0;
7141  __Pyx_RefNannySetupContext("__getitem__", 0);
7142 
7143  /* "View.MemoryView":237
7144  *
7145  * def __getitem__(self, item):
7146  * return self.memview[item] # <<<<<<<<<<<<<<
7147  *
7148  * def __setitem__(self, item, value):
7149  */
7150  __Pyx_XDECREF(__pyx_r);
7151  __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)
7152  __Pyx_GOTREF(__pyx_t_1);
7153  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
7154  __Pyx_GOTREF(__pyx_t_2);
7155  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7156  __pyx_r = __pyx_t_2;
7157  __pyx_t_2 = 0;
7158  goto __pyx_L0;
7159 
7160  /* "View.MemoryView":236
7161  * return getattr(self.memview, attr)
7162  *
7163  * def __getitem__(self, item): # <<<<<<<<<<<<<<
7164  * return self.memview[item]
7165  *
7166  */
7167 
7168  /* function exit code */
7169  __pyx_L1_error:;
7170  __Pyx_XDECREF(__pyx_t_1);
7171  __Pyx_XDECREF(__pyx_t_2);
7172  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7173  __pyx_r = NULL;
7174  __pyx_L0:;
7175  __Pyx_XGIVEREF(__pyx_r);
7176  __Pyx_RefNannyFinishContext();
7177  return __pyx_r;
7178 }
7179 
7180 /* "View.MemoryView":239
7181  * return self.memview[item]
7182  *
7183  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
7184  * self.memview[item] = value
7185  *
7186  */
7187 
7188 /* Python wrapper */
7189 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
7190 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
7191  int __pyx_r;
7192  __Pyx_RefNannyDeclarations
7193  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
7194  __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));
7195 
7196  /* function exit code */
7197  __Pyx_RefNannyFinishContext();
7198  return __pyx_r;
7199 }
7200 
7201 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) {
7202  int __pyx_r;
7203  __Pyx_RefNannyDeclarations
7204  PyObject *__pyx_t_1 = NULL;
7205  int __pyx_lineno = 0;
7206  const char *__pyx_filename = NULL;
7207  int __pyx_clineno = 0;
7208  __Pyx_RefNannySetupContext("__setitem__", 0);
7209 
7210  /* "View.MemoryView":240
7211  *
7212  * def __setitem__(self, item, value):
7213  * self.memview[item] = value # <<<<<<<<<<<<<<
7214  *
7215  *
7216  */
7217  __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)
7218  __Pyx_GOTREF(__pyx_t_1);
7219  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
7220  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7221 
7222  /* "View.MemoryView":239
7223  * return self.memview[item]
7224  *
7225  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
7226  * self.memview[item] = value
7227  *
7228  */
7229 
7230  /* function exit code */
7231  __pyx_r = 0;
7232  goto __pyx_L0;
7233  __pyx_L1_error:;
7234  __Pyx_XDECREF(__pyx_t_1);
7235  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7236  __pyx_r = -1;
7237  __pyx_L0:;
7238  __Pyx_RefNannyFinishContext();
7239  return __pyx_r;
7240 }
7241 
7242 /* "(tree fragment)":1
7243  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7244  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7245  * def __setstate_cython__(self, __pyx_state):
7246  */
7247 
7248 /* Python wrapper */
7249 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7250 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7251  PyObject *__pyx_r = 0;
7252  __Pyx_RefNannyDeclarations
7253  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7254  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
7255 
7256  /* function exit code */
7257  __Pyx_RefNannyFinishContext();
7258  return __pyx_r;
7259 }
7260 
7261 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
7262  PyObject *__pyx_r = NULL;
7263  __Pyx_RefNannyDeclarations
7264  PyObject *__pyx_t_1 = NULL;
7265  int __pyx_lineno = 0;
7266  const char *__pyx_filename = NULL;
7267  int __pyx_clineno = 0;
7268  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
7269 
7270  /* "(tree fragment)":2
7271  * def __reduce_cython__(self):
7272  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
7273  * def __setstate_cython__(self, __pyx_state):
7274  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7275  */
7276  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
7277  __Pyx_GOTREF(__pyx_t_1);
7278  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7279  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7280  __PYX_ERR(0, 2, __pyx_L1_error)
7281 
7282  /* "(tree fragment)":1
7283  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7284  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7285  * def __setstate_cython__(self, __pyx_state):
7286  */
7287 
7288  /* function exit code */
7289  __pyx_L1_error:;
7290  __Pyx_XDECREF(__pyx_t_1);
7291  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7292  __pyx_r = NULL;
7293  __Pyx_XGIVEREF(__pyx_r);
7294  __Pyx_RefNannyFinishContext();
7295  return __pyx_r;
7296 }
7297 
7298 /* "(tree fragment)":3
7299  * def __reduce_cython__(self):
7300  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7301  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7302  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7303  */
7304 
7305 /* Python wrapper */
7306 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
7307 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7308  PyObject *__pyx_r = 0;
7309  __Pyx_RefNannyDeclarations
7310  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7311  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
7312 
7313  /* function exit code */
7314  __Pyx_RefNannyFinishContext();
7315  return __pyx_r;
7316 }
7317 
7318 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) {
7319  PyObject *__pyx_r = NULL;
7320  __Pyx_RefNannyDeclarations
7321  PyObject *__pyx_t_1 = NULL;
7322  int __pyx_lineno = 0;
7323  const char *__pyx_filename = NULL;
7324  int __pyx_clineno = 0;
7325  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7326 
7327  /* "(tree fragment)":4
7328  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7329  * def __setstate_cython__(self, __pyx_state):
7330  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
7331  */
7332  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
7333  __Pyx_GOTREF(__pyx_t_1);
7334  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7335  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7336  __PYX_ERR(0, 4, __pyx_L1_error)
7337 
7338  /* "(tree fragment)":3
7339  * def __reduce_cython__(self):
7340  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7341  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7342  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7343  */
7344 
7345  /* function exit code */
7346  __pyx_L1_error:;
7347  __Pyx_XDECREF(__pyx_t_1);
7348  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7349  __pyx_r = NULL;
7350  __Pyx_XGIVEREF(__pyx_r);
7351  __Pyx_RefNannyFinishContext();
7352  return __pyx_r;
7353 }
7354 
7355 /* "View.MemoryView":244
7356  *
7357  * @cname("__pyx_array_new")
7358  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
7359  * char *mode, char *buf):
7360  * cdef array result
7361  */
7362 
7363 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
7364  struct __pyx_array_obj *__pyx_v_result = 0;
7365  struct __pyx_array_obj *__pyx_r = NULL;
7366  __Pyx_RefNannyDeclarations
7367  int __pyx_t_1;
7368  PyObject *__pyx_t_2 = NULL;
7369  PyObject *__pyx_t_3 = NULL;
7370  PyObject *__pyx_t_4 = NULL;
7371  PyObject *__pyx_t_5 = NULL;
7372  int __pyx_lineno = 0;
7373  const char *__pyx_filename = NULL;
7374  int __pyx_clineno = 0;
7375  __Pyx_RefNannySetupContext("array_cwrapper", 0);
7376 
7377  /* "View.MemoryView":248
7378  * cdef array result
7379  *
7380  * if buf == NULL: # <<<<<<<<<<<<<<
7381  * result = array(shape, itemsize, format, mode.decode('ASCII'))
7382  * else:
7383  */
7384  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
7385  if (__pyx_t_1) {
7386 
7387  /* "View.MemoryView":249
7388  *
7389  * if buf == NULL:
7390  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
7391  * else:
7392  * result = array(shape, itemsize, format, mode.decode('ASCII'),
7393  */
7394  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
7395  __Pyx_GOTREF(__pyx_t_2);
7396  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
7397  __Pyx_GOTREF(__pyx_t_3);
7398  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
7399  __Pyx_GOTREF(__pyx_t_4);
7400  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
7401  __Pyx_GOTREF(__pyx_t_5);
7402  __Pyx_INCREF(__pyx_v_shape);
7403  __Pyx_GIVEREF(__pyx_v_shape);
7404  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
7405  __Pyx_GIVEREF(__pyx_t_2);
7406  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
7407  __Pyx_GIVEREF(__pyx_t_3);
7408  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
7409  __Pyx_GIVEREF(__pyx_t_4);
7410  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
7411  __pyx_t_2 = 0;
7412  __pyx_t_3 = 0;
7413  __pyx_t_4 = 0;
7414  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
7415  __Pyx_GOTREF(__pyx_t_4);
7416  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7417  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
7418  __pyx_t_4 = 0;
7419 
7420  /* "View.MemoryView":248
7421  * cdef array result
7422  *
7423  * if buf == NULL: # <<<<<<<<<<<<<<
7424  * result = array(shape, itemsize, format, mode.decode('ASCII'))
7425  * else:
7426  */
7427  goto __pyx_L3;
7428  }
7429 
7430  /* "View.MemoryView":251
7431  * result = array(shape, itemsize, format, mode.decode('ASCII'))
7432  * else:
7433  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
7434  * allocate_buffer=False)
7435  * result.data = buf
7436  */
7437  /*else*/ {
7438  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
7439  __Pyx_GOTREF(__pyx_t_4);
7440  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
7441  __Pyx_GOTREF(__pyx_t_5);
7442  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
7443  __Pyx_GOTREF(__pyx_t_3);
7444  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
7445  __Pyx_GOTREF(__pyx_t_2);
7446  __Pyx_INCREF(__pyx_v_shape);
7447  __Pyx_GIVEREF(__pyx_v_shape);
7448  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
7449  __Pyx_GIVEREF(__pyx_t_4);
7450  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
7451  __Pyx_GIVEREF(__pyx_t_5);
7452  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
7453  __Pyx_GIVEREF(__pyx_t_3);
7454  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
7455  __pyx_t_4 = 0;
7456  __pyx_t_5 = 0;
7457  __pyx_t_3 = 0;
7458 
7459  /* "View.MemoryView":252
7460  * else:
7461  * result = array(shape, itemsize, format, mode.decode('ASCII'),
7462  * allocate_buffer=False) # <<<<<<<<<<<<<<
7463  * result.data = buf
7464  *
7465  */
7466  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
7467  __Pyx_GOTREF(__pyx_t_3);
7468  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
7469 
7470  /* "View.MemoryView":251
7471  * result = array(shape, itemsize, format, mode.decode('ASCII'))
7472  * else:
7473  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
7474  * allocate_buffer=False)
7475  * result.data = buf
7476  */
7477  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
7478  __Pyx_GOTREF(__pyx_t_5);
7479  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7480  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7481  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
7482  __pyx_t_5 = 0;
7483 
7484  /* "View.MemoryView":253
7485  * result = array(shape, itemsize, format, mode.decode('ASCII'),
7486  * allocate_buffer=False)
7487  * result.data = buf # <<<<<<<<<<<<<<
7488  *
7489  * return result
7490  */
7491  __pyx_v_result->data = __pyx_v_buf;
7492  }
7493  __pyx_L3:;
7494 
7495  /* "View.MemoryView":255
7496  * result.data = buf
7497  *
7498  * return result # <<<<<<<<<<<<<<
7499  *
7500  *
7501  */
7502  __Pyx_XDECREF(((PyObject *)__pyx_r));
7503  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7504  __pyx_r = __pyx_v_result;
7505  goto __pyx_L0;
7506 
7507  /* "View.MemoryView":244
7508  *
7509  * @cname("__pyx_array_new")
7510  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
7511  * char *mode, char *buf):
7512  * cdef array result
7513  */
7514 
7515  /* function exit code */
7516  __pyx_L1_error:;
7517  __Pyx_XDECREF(__pyx_t_2);
7518  __Pyx_XDECREF(__pyx_t_3);
7519  __Pyx_XDECREF(__pyx_t_4);
7520  __Pyx_XDECREF(__pyx_t_5);
7521  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
7522  __pyx_r = 0;
7523  __pyx_L0:;
7524  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7525  __Pyx_XGIVEREF((PyObject *)__pyx_r);
7526  __Pyx_RefNannyFinishContext();
7527  return __pyx_r;
7528 }
7529 
7530 /* "View.MemoryView":281
7531  * cdef class Enum(object):
7532  * cdef object name
7533  * def __init__(self, name): # <<<<<<<<<<<<<<
7534  * self.name = name
7535  * def __repr__(self):
7536  */
7537 
7538 /* Python wrapper */
7539 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7540 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7541  PyObject *__pyx_v_name = 0;
7542  int __pyx_lineno = 0;
7543  const char *__pyx_filename = NULL;
7544  int __pyx_clineno = 0;
7545  int __pyx_r;
7546  __Pyx_RefNannyDeclarations
7547  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7548  {
7549  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
7550  PyObject* values[1] = {0};
7551  if (unlikely(__pyx_kwds)) {
7552  Py_ssize_t kw_args;
7553  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7554  switch (pos_args) {
7555  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7556  CYTHON_FALLTHROUGH;
7557  case 0: break;
7558  default: goto __pyx_L5_argtuple_error;
7559  }
7560  kw_args = PyDict_Size(__pyx_kwds);
7561  switch (pos_args) {
7562  case 0:
7563  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
7564  else goto __pyx_L5_argtuple_error;
7565  }
7566  if (unlikely(kw_args > 0)) {
7567  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 281, __pyx_L3_error)
7568  }
7569  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
7570  goto __pyx_L5_argtuple_error;
7571  } else {
7572  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7573  }
7574  __pyx_v_name = values[0];
7575  }
7576  goto __pyx_L4_argument_unpacking_done;
7577  __pyx_L5_argtuple_error:;
7578  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 281, __pyx_L3_error)
7579  __pyx_L3_error:;
7580  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7581  __Pyx_RefNannyFinishContext();
7582  return -1;
7583  __pyx_L4_argument_unpacking_done:;
7584  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
7585 
7586  /* function exit code */
7587  __Pyx_RefNannyFinishContext();
7588  return __pyx_r;
7589 }
7590 
7591 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
7592  int __pyx_r;
7593  __Pyx_RefNannyDeclarations
7594  __Pyx_RefNannySetupContext("__init__", 0);
7595 
7596  /* "View.MemoryView":282
7597  * cdef object name
7598  * def __init__(self, name):
7599  * self.name = name # <<<<<<<<<<<<<<
7600  * def __repr__(self):
7601  * return self.name
7602  */
7603  __Pyx_INCREF(__pyx_v_name);
7604  __Pyx_GIVEREF(__pyx_v_name);
7605  __Pyx_GOTREF(__pyx_v_self->name);
7606  __Pyx_DECREF(__pyx_v_self->name);
7607  __pyx_v_self->name = __pyx_v_name;
7608 
7609  /* "View.MemoryView":281
7610  * cdef class Enum(object):
7611  * cdef object name
7612  * def __init__(self, name): # <<<<<<<<<<<<<<
7613  * self.name = name
7614  * def __repr__(self):
7615  */
7616 
7617  /* function exit code */
7618  __pyx_r = 0;
7619  __Pyx_RefNannyFinishContext();
7620  return __pyx_r;
7621 }
7622 
7623 /* "View.MemoryView":283
7624  * def __init__(self, name):
7625  * self.name = name
7626  * def __repr__(self): # <<<<<<<<<<<<<<
7627  * return self.name
7628  *
7629  */
7630 
7631 /* Python wrapper */
7632 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
7633 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
7634  PyObject *__pyx_r = 0;
7635  __Pyx_RefNannyDeclarations
7636  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
7637  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
7638 
7639  /* function exit code */
7640  __Pyx_RefNannyFinishContext();
7641  return __pyx_r;
7642 }
7643 
7644 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
7645  PyObject *__pyx_r = NULL;
7646  __Pyx_RefNannyDeclarations
7647  __Pyx_RefNannySetupContext("__repr__", 0);
7648 
7649  /* "View.MemoryView":284
7650  * self.name = name
7651  * def __repr__(self):
7652  * return self.name # <<<<<<<<<<<<<<
7653  *
7654  * cdef generic = Enum("<strided and direct or indirect>")
7655  */
7656  __Pyx_XDECREF(__pyx_r);
7657  __Pyx_INCREF(__pyx_v_self->name);
7658  __pyx_r = __pyx_v_self->name;
7659  goto __pyx_L0;
7660 
7661  /* "View.MemoryView":283
7662  * def __init__(self, name):
7663  * self.name = name
7664  * def __repr__(self): # <<<<<<<<<<<<<<
7665  * return self.name
7666  *
7667  */
7668 
7669  /* function exit code */
7670  __pyx_L0:;
7671  __Pyx_XGIVEREF(__pyx_r);
7672  __Pyx_RefNannyFinishContext();
7673  return __pyx_r;
7674 }
7675 
7676 /* "(tree fragment)":1
7677  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7678  * cdef tuple state
7679  * cdef object _dict
7680  */
7681 
7682 /* Python wrapper */
7683 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7684 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7685  PyObject *__pyx_r = 0;
7686  __Pyx_RefNannyDeclarations
7687  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7688  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
7689 
7690  /* function exit code */
7691  __Pyx_RefNannyFinishContext();
7692  return __pyx_r;
7693 }
7694 
7695 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
7696  PyObject *__pyx_v_state = 0;
7697  PyObject *__pyx_v__dict = 0;
7698  int __pyx_v_use_setstate;
7699  PyObject *__pyx_r = NULL;
7700  __Pyx_RefNannyDeclarations
7701  PyObject *__pyx_t_1 = NULL;
7702  int __pyx_t_2;
7703  int __pyx_t_3;
7704  PyObject *__pyx_t_4 = NULL;
7705  PyObject *__pyx_t_5 = NULL;
7706  int __pyx_lineno = 0;
7707  const char *__pyx_filename = NULL;
7708  int __pyx_clineno = 0;
7709  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
7710 
7711  /* "(tree fragment)":5
7712  * cdef object _dict
7713  * cdef bint use_setstate
7714  * state = (self.name,) # <<<<<<<<<<<<<<
7715  * _dict = getattr(self, '__dict__', None)
7716  * if _dict is not None:
7717  */
7718  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
7719  __Pyx_GOTREF(__pyx_t_1);
7720  __Pyx_INCREF(__pyx_v_self->name);
7721  __Pyx_GIVEREF(__pyx_v_self->name);
7722  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
7723  __pyx_v_state = ((PyObject*)__pyx_t_1);
7724  __pyx_t_1 = 0;
7725 
7726  /* "(tree fragment)":6
7727  * cdef bint use_setstate
7728  * state = (self.name,)
7729  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
7730  * if _dict is not None:
7731  * state += (_dict,)
7732  */
7733  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
7734  __Pyx_GOTREF(__pyx_t_1);
7735  __pyx_v__dict = __pyx_t_1;
7736  __pyx_t_1 = 0;
7737 
7738  /* "(tree fragment)":7
7739  * state = (self.name,)
7740  * _dict = getattr(self, '__dict__', None)
7741  * if _dict is not None: # <<<<<<<<<<<<<<
7742  * state += (_dict,)
7743  * use_setstate = True
7744  */
7745  __pyx_t_2 = (__pyx_v__dict != Py_None);
7746  __pyx_t_3 = (__pyx_t_2 != 0);
7747  if (__pyx_t_3) {
7748 
7749  /* "(tree fragment)":8
7750  * _dict = getattr(self, '__dict__', None)
7751  * if _dict is not None:
7752  * state += (_dict,) # <<<<<<<<<<<<<<
7753  * use_setstate = True
7754  * else:
7755  */
7756  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
7757  __Pyx_GOTREF(__pyx_t_1);
7758  __Pyx_INCREF(__pyx_v__dict);
7759  __Pyx_GIVEREF(__pyx_v__dict);
7760  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
7761  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
7762  __Pyx_GOTREF(__pyx_t_4);
7763  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7764  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
7765  __pyx_t_4 = 0;
7766 
7767  /* "(tree fragment)":9
7768  * if _dict is not None:
7769  * state += (_dict,)
7770  * use_setstate = True # <<<<<<<<<<<<<<
7771  * else:
7772  * use_setstate = self.name is not None
7773  */
7774  __pyx_v_use_setstate = 1;
7775 
7776  /* "(tree fragment)":7
7777  * state = (self.name,)
7778  * _dict = getattr(self, '__dict__', None)
7779  * if _dict is not None: # <<<<<<<<<<<<<<
7780  * state += (_dict,)
7781  * use_setstate = True
7782  */
7783  goto __pyx_L3;
7784  }
7785 
7786  /* "(tree fragment)":11
7787  * use_setstate = True
7788  * else:
7789  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
7790  * if use_setstate:
7791  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
7792  */
7793  /*else*/ {
7794  __pyx_t_3 = (__pyx_v_self->name != Py_None);
7795  __pyx_v_use_setstate = __pyx_t_3;
7796  }
7797  __pyx_L3:;
7798 
7799  /* "(tree fragment)":12
7800  * else:
7801  * use_setstate = self.name is not None
7802  * if use_setstate: # <<<<<<<<<<<<<<
7803  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
7804  * else:
7805  */
7806  __pyx_t_3 = (__pyx_v_use_setstate != 0);
7807  if (__pyx_t_3) {
7808 
7809  /* "(tree fragment)":13
7810  * use_setstate = self.name is not None
7811  * if use_setstate:
7812  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
7813  * else:
7814  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
7815  */
7816  __Pyx_XDECREF(__pyx_r);
7817  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
7818  __Pyx_GOTREF(__pyx_t_4);
7819  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
7820  __Pyx_GOTREF(__pyx_t_1);
7821  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7822  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7823  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7824  __Pyx_INCREF(__pyx_int_184977713);
7825  __Pyx_GIVEREF(__pyx_int_184977713);
7826  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
7827  __Pyx_INCREF(Py_None);
7828  __Pyx_GIVEREF(Py_None);
7829  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
7830  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error)
7831  __Pyx_GOTREF(__pyx_t_5);
7832  __Pyx_GIVEREF(__pyx_t_4);
7833  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
7834  __Pyx_GIVEREF(__pyx_t_1);
7835  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
7836  __Pyx_INCREF(__pyx_v_state);
7837  __Pyx_GIVEREF(__pyx_v_state);
7838  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
7839  __pyx_t_4 = 0;
7840  __pyx_t_1 = 0;
7841  __pyx_r = __pyx_t_5;
7842  __pyx_t_5 = 0;
7843  goto __pyx_L0;
7844 
7845  /* "(tree fragment)":12
7846  * else:
7847  * use_setstate = self.name is not None
7848  * if use_setstate: # <<<<<<<<<<<<<<
7849  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
7850  * else:
7851  */
7852  }
7853 
7854  /* "(tree fragment)":15
7855  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
7856  * else:
7857  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
7858  * def __setstate_cython__(self, __pyx_state):
7859  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7860  */
7861  /*else*/ {
7862  __Pyx_XDECREF(__pyx_r);
7863  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)
7864  __Pyx_GOTREF(__pyx_t_5);
7865  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
7866  __Pyx_GOTREF(__pyx_t_1);
7867  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7868  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7869  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7870  __Pyx_INCREF(__pyx_int_184977713);
7871  __Pyx_GIVEREF(__pyx_int_184977713);
7872  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
7873  __Pyx_INCREF(__pyx_v_state);
7874  __Pyx_GIVEREF(__pyx_v_state);
7875  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
7876  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
7877  __Pyx_GOTREF(__pyx_t_4);
7878  __Pyx_GIVEREF(__pyx_t_5);
7879  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
7880  __Pyx_GIVEREF(__pyx_t_1);
7881  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
7882  __pyx_t_5 = 0;
7883  __pyx_t_1 = 0;
7884  __pyx_r = __pyx_t_4;
7885  __pyx_t_4 = 0;
7886  goto __pyx_L0;
7887  }
7888 
7889  /* "(tree fragment)":1
7890  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7891  * cdef tuple state
7892  * cdef object _dict
7893  */
7894 
7895  /* function exit code */
7896  __pyx_L1_error:;
7897  __Pyx_XDECREF(__pyx_t_1);
7898  __Pyx_XDECREF(__pyx_t_4);
7899  __Pyx_XDECREF(__pyx_t_5);
7900  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7901  __pyx_r = NULL;
7902  __pyx_L0:;
7903  __Pyx_XDECREF(__pyx_v_state);
7904  __Pyx_XDECREF(__pyx_v__dict);
7905  __Pyx_XGIVEREF(__pyx_r);
7906  __Pyx_RefNannyFinishContext();
7907  return __pyx_r;
7908 }
7909 
7910 /* "(tree fragment)":16
7911  * else:
7912  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
7913  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7914  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7915  */
7916 
7917 /* Python wrapper */
7918 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
7919 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7920  PyObject *__pyx_r = 0;
7921  __Pyx_RefNannyDeclarations
7922  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7923  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
7924 
7925  /* function exit code */
7926  __Pyx_RefNannyFinishContext();
7927  return __pyx_r;
7928 }
7929 
7930 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7931  PyObject *__pyx_r = NULL;
7932  __Pyx_RefNannyDeclarations
7933  PyObject *__pyx_t_1 = NULL;
7934  int __pyx_lineno = 0;
7935  const char *__pyx_filename = NULL;
7936  int __pyx_clineno = 0;
7937  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7938 
7939  /* "(tree fragment)":17
7940  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
7941  * def __setstate_cython__(self, __pyx_state):
7942  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
7943  */
7944  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 17, __pyx_L1_error)
7945  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
7946  __Pyx_GOTREF(__pyx_t_1);
7947  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7948 
7949  /* "(tree fragment)":16
7950  * else:
7951  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
7952  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7953  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7954  */
7955 
7956  /* function exit code */
7957  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7958  goto __pyx_L0;
7959  __pyx_L1_error:;
7960  __Pyx_XDECREF(__pyx_t_1);
7961  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7962  __pyx_r = NULL;
7963  __pyx_L0:;
7964  __Pyx_XGIVEREF(__pyx_r);
7965  __Pyx_RefNannyFinishContext();
7966  return __pyx_r;
7967 }
7968 
7969 /* "View.MemoryView":298
7970  *
7971  * @cname('__pyx_align_pointer')
7972  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
7973  * "Align pointer memory on a given boundary"
7974  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
7975  */
7976 
7977 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
7978  Py_intptr_t __pyx_v_aligned_p;
7979  size_t __pyx_v_offset;
7980  void *__pyx_r;
7981  int __pyx_t_1;
7982 
7983  /* "View.MemoryView":300
7984  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
7985  * "Align pointer memory on a given boundary"
7986  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
7987  * cdef size_t offset
7988  *
7989  */
7990  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
7991 
7992  /* "View.MemoryView":304
7993  *
7994  * with cython.cdivision(True):
7995  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
7996  *
7997  * if offset > 0:
7998  */
7999  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
8000 
8001  /* "View.MemoryView":306
8002  * offset = aligned_p % alignment
8003  *
8004  * if offset > 0: # <<<<<<<<<<<<<<
8005  * aligned_p += alignment - offset
8006  *
8007  */
8008  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
8009  if (__pyx_t_1) {
8010 
8011  /* "View.MemoryView":307
8012  *
8013  * if offset > 0:
8014  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
8015  *
8016  * return <void *> aligned_p
8017  */
8018  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
8019 
8020  /* "View.MemoryView":306
8021  * offset = aligned_p % alignment
8022  *
8023  * if offset > 0: # <<<<<<<<<<<<<<
8024  * aligned_p += alignment - offset
8025  *
8026  */
8027  }
8028 
8029  /* "View.MemoryView":309
8030  * aligned_p += alignment - offset
8031  *
8032  * return <void *> aligned_p # <<<<<<<<<<<<<<
8033  *
8034  *
8035  */
8036  __pyx_r = ((void *)__pyx_v_aligned_p);
8037  goto __pyx_L0;
8038 
8039  /* "View.MemoryView":298
8040  *
8041  * @cname('__pyx_align_pointer')
8042  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
8043  * "Align pointer memory on a given boundary"
8044  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
8045  */
8046 
8047  /* function exit code */
8048  __pyx_L0:;
8049  return __pyx_r;
8050 }
8051 
8052 /* "View.MemoryView":345
8053  * cdef __Pyx_TypeInfo *typeinfo
8054  *
8055  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8056  * self.obj = obj
8057  * self.flags = flags
8058  */
8059 
8060 /* Python wrapper */
8061 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8062 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8063  PyObject *__pyx_v_obj = 0;
8064  int __pyx_v_flags;
8065  int __pyx_v_dtype_is_object;
8066  int __pyx_lineno = 0;
8067  const char *__pyx_filename = NULL;
8068  int __pyx_clineno = 0;
8069  int __pyx_r;
8070  __Pyx_RefNannyDeclarations
8071  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
8072  {
8073  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
8074  PyObject* values[3] = {0,0,0};
8075  if (unlikely(__pyx_kwds)) {
8076  Py_ssize_t kw_args;
8077  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8078  switch (pos_args) {
8079  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8080  CYTHON_FALLTHROUGH;
8081  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8082  CYTHON_FALLTHROUGH;
8083  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8084  CYTHON_FALLTHROUGH;
8085  case 0: break;
8086  default: goto __pyx_L5_argtuple_error;
8087  }
8088  kw_args = PyDict_Size(__pyx_kwds);
8089  switch (pos_args) {
8090  case 0:
8091  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
8092  else goto __pyx_L5_argtuple_error;
8093  CYTHON_FALLTHROUGH;
8094  case 1:
8095  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
8096  else {
8097  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 345, __pyx_L3_error)
8098  }
8099  CYTHON_FALLTHROUGH;
8100  case 2:
8101  if (kw_args > 0) {
8102  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
8103  if (value) { values[2] = value; kw_args--; }
8104  }
8105  }
8106  if (unlikely(kw_args > 0)) {
8107  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 345, __pyx_L3_error)
8108  }
8109  } else {
8110  switch (PyTuple_GET_SIZE(__pyx_args)) {
8111  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8112  CYTHON_FALLTHROUGH;
8113  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8114  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8115  break;
8116  default: goto __pyx_L5_argtuple_error;
8117  }
8118  }
8119  __pyx_v_obj = values[0];
8120  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
8121  if (values[2]) {
8122  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
8123  } else {
8124  __pyx_v_dtype_is_object = ((int)0);
8125  }
8126  }
8127  goto __pyx_L4_argument_unpacking_done;
8128  __pyx_L5_argtuple_error:;
8129  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error)
8130  __pyx_L3_error:;
8131  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8132  __Pyx_RefNannyFinishContext();
8133  return -1;
8134  __pyx_L4_argument_unpacking_done:;
8135  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
8136 
8137  /* function exit code */
8138  __Pyx_RefNannyFinishContext();
8139  return __pyx_r;
8140 }
8141 
8142 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) {
8143  int __pyx_r;
8144  __Pyx_RefNannyDeclarations
8145  int __pyx_t_1;
8146  int __pyx_t_2;
8147  int __pyx_t_3;
8148  int __pyx_t_4;
8149  int __pyx_lineno = 0;
8150  const char *__pyx_filename = NULL;
8151  int __pyx_clineno = 0;
8152  __Pyx_RefNannySetupContext("__cinit__", 0);
8153 
8154  /* "View.MemoryView":346
8155  *
8156  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
8157  * self.obj = obj # <<<<<<<<<<<<<<
8158  * self.flags = flags
8159  * if type(self) is memoryview or obj is not None:
8160  */
8161  __Pyx_INCREF(__pyx_v_obj);
8162  __Pyx_GIVEREF(__pyx_v_obj);
8163  __Pyx_GOTREF(__pyx_v_self->obj);
8164  __Pyx_DECREF(__pyx_v_self->obj);
8165  __pyx_v_self->obj = __pyx_v_obj;
8166 
8167  /* "View.MemoryView":347
8168  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
8169  * self.obj = obj
8170  * self.flags = flags # <<<<<<<<<<<<<<
8171  * if type(self) is memoryview or obj is not None:
8172  * __Pyx_GetBuffer(obj, &self.view, flags)
8173  */
8174  __pyx_v_self->flags = __pyx_v_flags;
8175 
8176  /* "View.MemoryView":348
8177  * self.obj = obj
8178  * self.flags = flags
8179  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
8180  * __Pyx_GetBuffer(obj, &self.view, flags)
8181  * if <PyObject *> self.view.obj == NULL:
8182  */
8183  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
8184  __pyx_t_3 = (__pyx_t_2 != 0);
8185  if (!__pyx_t_3) {
8186  } else {
8187  __pyx_t_1 = __pyx_t_3;
8188  goto __pyx_L4_bool_binop_done;
8189  }
8190  __pyx_t_3 = (__pyx_v_obj != Py_None);
8191  __pyx_t_2 = (__pyx_t_3 != 0);
8192  __pyx_t_1 = __pyx_t_2;
8193  __pyx_L4_bool_binop_done:;
8194  if (__pyx_t_1) {
8195 
8196  /* "View.MemoryView":349
8197  * self.flags = flags
8198  * if type(self) is memoryview or obj is not None:
8199  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
8200  * if <PyObject *> self.view.obj == NULL:
8201  * (<__pyx_buffer *> &self.view).obj = Py_None
8202  */
8203  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error)
8204 
8205  /* "View.MemoryView":350
8206  * if type(self) is memoryview or obj is not None:
8207  * __Pyx_GetBuffer(obj, &self.view, flags)
8208  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
8209  * (<__pyx_buffer *> &self.view).obj = Py_None
8210  * Py_INCREF(Py_None)
8211  */
8212  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
8213  if (__pyx_t_1) {
8214 
8215  /* "View.MemoryView":351
8216  * __Pyx_GetBuffer(obj, &self.view, flags)
8217  * if <PyObject *> self.view.obj == NULL:
8218  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
8219  * Py_INCREF(Py_None)
8220  *
8221  */
8222  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
8223 
8224  /* "View.MemoryView":352
8225  * if <PyObject *> self.view.obj == NULL:
8226  * (<__pyx_buffer *> &self.view).obj = Py_None
8227  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
8228  *
8229  * global __pyx_memoryview_thread_locks_used
8230  */
8231  Py_INCREF(Py_None);
8232 
8233  /* "View.MemoryView":350
8234  * if type(self) is memoryview or obj is not None:
8235  * __Pyx_GetBuffer(obj, &self.view, flags)
8236  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
8237  * (<__pyx_buffer *> &self.view).obj = Py_None
8238  * Py_INCREF(Py_None)
8239  */
8240  }
8241 
8242  /* "View.MemoryView":348
8243  * self.obj = obj
8244  * self.flags = flags
8245  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
8246  * __Pyx_GetBuffer(obj, &self.view, flags)
8247  * if <PyObject *> self.view.obj == NULL:
8248  */
8249  }
8250 
8251  /* "View.MemoryView":355
8252  *
8253  * global __pyx_memoryview_thread_locks_used
8254  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
8255  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8256  * __pyx_memoryview_thread_locks_used += 1
8257  */
8258  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
8259  if (__pyx_t_1) {
8260 
8261  /* "View.MemoryView":356
8262  * global __pyx_memoryview_thread_locks_used
8263  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
8264  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
8265  * __pyx_memoryview_thread_locks_used += 1
8266  * if self.lock is NULL:
8267  */
8268  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8269 
8270  /* "View.MemoryView":357
8271  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
8272  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8273  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
8274  * if self.lock is NULL:
8275  * self.lock = PyThread_allocate_lock()
8276  */
8277  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
8278 
8279  /* "View.MemoryView":355
8280  *
8281  * global __pyx_memoryview_thread_locks_used
8282  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
8283  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8284  * __pyx_memoryview_thread_locks_used += 1
8285  */
8286  }
8287 
8288  /* "View.MemoryView":358
8289  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8290  * __pyx_memoryview_thread_locks_used += 1
8291  * if self.lock is NULL: # <<<<<<<<<<<<<<
8292  * self.lock = PyThread_allocate_lock()
8293  * if self.lock is NULL:
8294  */
8295  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
8296  if (__pyx_t_1) {
8297 
8298  /* "View.MemoryView":359
8299  * __pyx_memoryview_thread_locks_used += 1
8300  * if self.lock is NULL:
8301  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
8302  * if self.lock is NULL:
8303  * raise MemoryError
8304  */
8305  __pyx_v_self->lock = PyThread_allocate_lock();
8306 
8307  /* "View.MemoryView":360
8308  * if self.lock is NULL:
8309  * self.lock = PyThread_allocate_lock()
8310  * if self.lock is NULL: # <<<<<<<<<<<<<<
8311  * raise MemoryError
8312  *
8313  */
8314  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
8315  if (unlikely(__pyx_t_1)) {
8316 
8317  /* "View.MemoryView":361
8318  * self.lock = PyThread_allocate_lock()
8319  * if self.lock is NULL:
8320  * raise MemoryError # <<<<<<<<<<<<<<
8321  *
8322  * if flags & PyBUF_FORMAT:
8323  */
8324  PyErr_NoMemory(); __PYX_ERR(0, 361, __pyx_L1_error)
8325 
8326  /* "View.MemoryView":360
8327  * if self.lock is NULL:
8328  * self.lock = PyThread_allocate_lock()
8329  * if self.lock is NULL: # <<<<<<<<<<<<<<
8330  * raise MemoryError
8331  *
8332  */
8333  }
8334 
8335  /* "View.MemoryView":358
8336  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8337  * __pyx_memoryview_thread_locks_used += 1
8338  * if self.lock is NULL: # <<<<<<<<<<<<<<
8339  * self.lock = PyThread_allocate_lock()
8340  * if self.lock is NULL:
8341  */
8342  }
8343 
8344  /* "View.MemoryView":363
8345  * raise MemoryError
8346  *
8347  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
8348  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8349  * else:
8350  */
8351  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
8352  if (__pyx_t_1) {
8353 
8354  /* "View.MemoryView":364
8355  *
8356  * if flags & PyBUF_FORMAT:
8357  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
8358  * else:
8359  * self.dtype_is_object = dtype_is_object
8360  */
8361  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
8362  if (__pyx_t_2) {
8363  } else {
8364  __pyx_t_1 = __pyx_t_2;
8365  goto __pyx_L11_bool_binop_done;
8366  }
8367  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
8368  __pyx_t_1 = __pyx_t_2;
8369  __pyx_L11_bool_binop_done:;
8370  __pyx_v_self->dtype_is_object = __pyx_t_1;
8371 
8372  /* "View.MemoryView":363
8373  * raise MemoryError
8374  *
8375  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
8376  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8377  * else:
8378  */
8379  goto __pyx_L10;
8380  }
8381 
8382  /* "View.MemoryView":366
8383  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8384  * else:
8385  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
8386  *
8387  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
8388  */
8389  /*else*/ {
8390  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
8391  }
8392  __pyx_L10:;
8393 
8394  /* "View.MemoryView":368
8395  * self.dtype_is_object = dtype_is_object
8396  *
8397  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
8398  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
8399  * self.typeinfo = NULL
8400  */
8401  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
8402 
8403  /* "View.MemoryView":370
8404  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
8405  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
8406  * self.typeinfo = NULL # <<<<<<<<<<<<<<
8407  *
8408  * def __dealloc__(memoryview self):
8409  */
8410  __pyx_v_self->typeinfo = NULL;
8411 
8412  /* "View.MemoryView":345
8413  * cdef __Pyx_TypeInfo *typeinfo
8414  *
8415  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8416  * self.obj = obj
8417  * self.flags = flags
8418  */
8419 
8420  /* function exit code */
8421  __pyx_r = 0;
8422  goto __pyx_L0;
8423  __pyx_L1_error:;
8424  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8425  __pyx_r = -1;
8426  __pyx_L0:;
8427  __Pyx_RefNannyFinishContext();
8428  return __pyx_r;
8429 }
8430 
8431 /* "View.MemoryView":372
8432  * self.typeinfo = NULL
8433  *
8434  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
8435  * if self.obj is not None:
8436  * __Pyx_ReleaseBuffer(&self.view)
8437  */
8438 
8439 /* Python wrapper */
8440 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
8441 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
8442  __Pyx_RefNannyDeclarations
8443  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
8444  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
8445 
8446  /* function exit code */
8447  __Pyx_RefNannyFinishContext();
8448 }
8449 
8450 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
8451  int __pyx_v_i;
8452  __Pyx_RefNannyDeclarations
8453  int __pyx_t_1;
8454  int __pyx_t_2;
8455  int __pyx_t_3;
8456  int __pyx_t_4;
8457  int __pyx_t_5;
8458  PyThread_type_lock __pyx_t_6;
8459  PyThread_type_lock __pyx_t_7;
8460  __Pyx_RefNannySetupContext("__dealloc__", 0);
8461 
8462  /* "View.MemoryView":373
8463  *
8464  * def __dealloc__(memoryview self):
8465  * if self.obj is not None: # <<<<<<<<<<<<<<
8466  * __Pyx_ReleaseBuffer(&self.view)
8467  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8468  */
8469  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
8470  __pyx_t_2 = (__pyx_t_1 != 0);
8471  if (__pyx_t_2) {
8472 
8473  /* "View.MemoryView":374
8474  * def __dealloc__(memoryview self):
8475  * if self.obj is not None:
8476  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
8477  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8478  *
8479  */
8480  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
8481 
8482  /* "View.MemoryView":373
8483  *
8484  * def __dealloc__(memoryview self):
8485  * if self.obj is not None: # <<<<<<<<<<<<<<
8486  * __Pyx_ReleaseBuffer(&self.view)
8487  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8488  */
8489  goto __pyx_L3;
8490  }
8491 
8492  /* "View.MemoryView":375
8493  * if self.obj is not None:
8494  * __Pyx_ReleaseBuffer(&self.view)
8495  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
8496  *
8497  * (<__pyx_buffer *> &self.view).obj = NULL
8498  */
8499  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
8500  if (__pyx_t_2) {
8501 
8502  /* "View.MemoryView":377
8503  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8504  *
8505  * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
8506  * Py_DECREF(Py_None)
8507  *
8508  */
8509  ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
8510 
8511  /* "View.MemoryView":378
8512  *
8513  * (<__pyx_buffer *> &self.view).obj = NULL
8514  * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
8515  *
8516  * cdef int i
8517  */
8518  Py_DECREF(Py_None);
8519 
8520  /* "View.MemoryView":375
8521  * if self.obj is not None:
8522  * __Pyx_ReleaseBuffer(&self.view)
8523  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
8524  *
8525  * (<__pyx_buffer *> &self.view).obj = NULL
8526  */
8527  }
8528  __pyx_L3:;
8529 
8530  /* "View.MemoryView":382
8531  * cdef int i
8532  * global __pyx_memoryview_thread_locks_used
8533  * if self.lock != NULL: # <<<<<<<<<<<<<<
8534  * for i in range(__pyx_memoryview_thread_locks_used):
8535  * if __pyx_memoryview_thread_locks[i] is self.lock:
8536  */
8537  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
8538  if (__pyx_t_2) {
8539 
8540  /* "View.MemoryView":383
8541  * global __pyx_memoryview_thread_locks_used
8542  * if self.lock != NULL:
8543  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
8544  * if __pyx_memoryview_thread_locks[i] is self.lock:
8545  * __pyx_memoryview_thread_locks_used -= 1
8546  */
8547  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
8548  __pyx_t_4 = __pyx_t_3;
8549  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
8550  __pyx_v_i = __pyx_t_5;
8551 
8552  /* "View.MemoryView":384
8553  * if self.lock != NULL:
8554  * for i in range(__pyx_memoryview_thread_locks_used):
8555  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
8556  * __pyx_memoryview_thread_locks_used -= 1
8557  * if i != __pyx_memoryview_thread_locks_used:
8558  */
8559  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
8560  if (__pyx_t_2) {
8561 
8562  /* "View.MemoryView":385
8563  * for i in range(__pyx_memoryview_thread_locks_used):
8564  * if __pyx_memoryview_thread_locks[i] is self.lock:
8565  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
8566  * if i != __pyx_memoryview_thread_locks_used:
8567  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8568  */
8569  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
8570 
8571  /* "View.MemoryView":386
8572  * if __pyx_memoryview_thread_locks[i] is self.lock:
8573  * __pyx_memoryview_thread_locks_used -= 1
8574  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
8575  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8576  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8577  */
8578  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
8579  if (__pyx_t_2) {
8580 
8581  /* "View.MemoryView":388
8582  * if i != __pyx_memoryview_thread_locks_used:
8583  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8584  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
8585  * break
8586  * else:
8587  */
8588  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8589  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
8590 
8591  /* "View.MemoryView":387
8592  * __pyx_memoryview_thread_locks_used -= 1
8593  * if i != __pyx_memoryview_thread_locks_used:
8594  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
8595  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8596  * break
8597  */
8598  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
8599  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
8600 
8601  /* "View.MemoryView":386
8602  * if __pyx_memoryview_thread_locks[i] is self.lock:
8603  * __pyx_memoryview_thread_locks_used -= 1
8604  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
8605  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8606  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8607  */
8608  }
8609 
8610  /* "View.MemoryView":389
8611  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8612  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8613  * break # <<<<<<<<<<<<<<
8614  * else:
8615  * PyThread_free_lock(self.lock)
8616  */
8617  goto __pyx_L6_break;
8618 
8619  /* "View.MemoryView":384
8620  * if self.lock != NULL:
8621  * for i in range(__pyx_memoryview_thread_locks_used):
8622  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
8623  * __pyx_memoryview_thread_locks_used -= 1
8624  * if i != __pyx_memoryview_thread_locks_used:
8625  */
8626  }
8627  }
8628  /*else*/ {
8629 
8630  /* "View.MemoryView":391
8631  * break
8632  * else:
8633  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
8634  *
8635  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
8636  */
8637  PyThread_free_lock(__pyx_v_self->lock);
8638  }
8639  __pyx_L6_break:;
8640 
8641  /* "View.MemoryView":382
8642  * cdef int i
8643  * global __pyx_memoryview_thread_locks_used
8644  * if self.lock != NULL: # <<<<<<<<<<<<<<
8645  * for i in range(__pyx_memoryview_thread_locks_used):
8646  * if __pyx_memoryview_thread_locks[i] is self.lock:
8647  */
8648  }
8649 
8650  /* "View.MemoryView":372
8651  * self.typeinfo = NULL
8652  *
8653  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
8654  * if self.obj is not None:
8655  * __Pyx_ReleaseBuffer(&self.view)
8656  */
8657 
8658  /* function exit code */
8659  __Pyx_RefNannyFinishContext();
8660 }
8661 
8662 /* "View.MemoryView":393
8663  * PyThread_free_lock(self.lock)
8664  *
8665  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
8666  * cdef Py_ssize_t dim
8667  * cdef char *itemp = <char *> self.view.buf
8668  */
8669 
8670 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
8671  Py_ssize_t __pyx_v_dim;
8672  char *__pyx_v_itemp;
8673  PyObject *__pyx_v_idx = NULL;
8674  char *__pyx_r;
8675  __Pyx_RefNannyDeclarations
8676  Py_ssize_t __pyx_t_1;
8677  PyObject *__pyx_t_2 = NULL;
8678  Py_ssize_t __pyx_t_3;
8679  PyObject *(*__pyx_t_4)(PyObject *);
8680  PyObject *__pyx_t_5 = NULL;
8681  Py_ssize_t __pyx_t_6;
8682  char *__pyx_t_7;
8683  int __pyx_lineno = 0;
8684  const char *__pyx_filename = NULL;
8685  int __pyx_clineno = 0;
8686  __Pyx_RefNannySetupContext("get_item_pointer", 0);
8687 
8688  /* "View.MemoryView":395
8689  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
8690  * cdef Py_ssize_t dim
8691  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
8692  *
8693  * for dim, idx in enumerate(index):
8694  */
8695  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
8696 
8697  /* "View.MemoryView":397
8698  * cdef char *itemp = <char *> self.view.buf
8699  *
8700  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
8701  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8702  *
8703  */
8704  __pyx_t_1 = 0;
8705  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
8706  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
8707  __pyx_t_4 = NULL;
8708  } else {
8709  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
8710  __Pyx_GOTREF(__pyx_t_2);
8711  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
8712  }
8713  for (;;) {
8714  if (likely(!__pyx_t_4)) {
8715  if (likely(PyList_CheckExact(__pyx_t_2))) {
8716  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
8717  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8718  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
8719  #else
8720  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
8721  __Pyx_GOTREF(__pyx_t_5);
8722  #endif
8723  } else {
8724  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
8725  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8726  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
8727  #else
8728  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
8729  __Pyx_GOTREF(__pyx_t_5);
8730  #endif
8731  }
8732  } else {
8733  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
8734  if (unlikely(!__pyx_t_5)) {
8735  PyObject* exc_type = PyErr_Occurred();
8736  if (exc_type) {
8737  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8738  else __PYX_ERR(0, 397, __pyx_L1_error)
8739  }
8740  break;
8741  }
8742  __Pyx_GOTREF(__pyx_t_5);
8743  }
8744  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
8745  __pyx_t_5 = 0;
8746  __pyx_v_dim = __pyx_t_1;
8747  __pyx_t_1 = (__pyx_t_1 + 1);
8748 
8749  /* "View.MemoryView":398
8750  *
8751  * for dim, idx in enumerate(index):
8752  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
8753  *
8754  * return itemp
8755  */
8756  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 398, __pyx_L1_error)
8757  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 398, __pyx_L1_error)
8758  __pyx_v_itemp = __pyx_t_7;
8759 
8760  /* "View.MemoryView":397
8761  * cdef char *itemp = <char *> self.view.buf
8762  *
8763  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
8764  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8765  *
8766  */
8767  }
8768  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8769 
8770  /* "View.MemoryView":400
8771  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8772  *
8773  * return itemp # <<<<<<<<<<<<<<
8774  *
8775  *
8776  */
8777  __pyx_r = __pyx_v_itemp;
8778  goto __pyx_L0;
8779 
8780  /* "View.MemoryView":393
8781  * PyThread_free_lock(self.lock)
8782  *
8783  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
8784  * cdef Py_ssize_t dim
8785  * cdef char *itemp = <char *> self.view.buf
8786  */
8787 
8788  /* function exit code */
8789  __pyx_L1_error:;
8790  __Pyx_XDECREF(__pyx_t_2);
8791  __Pyx_XDECREF(__pyx_t_5);
8792  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
8793  __pyx_r = NULL;
8794  __pyx_L0:;
8795  __Pyx_XDECREF(__pyx_v_idx);
8796  __Pyx_RefNannyFinishContext();
8797  return __pyx_r;
8798 }
8799 
8800 /* "View.MemoryView":403
8801  *
8802  *
8803  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
8804  * if index is Ellipsis:
8805  * return self
8806  */
8807 
8808 /* Python wrapper */
8809 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
8810 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
8811  PyObject *__pyx_r = 0;
8812  __Pyx_RefNannyDeclarations
8813  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8814  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
8815 
8816  /* function exit code */
8817  __Pyx_RefNannyFinishContext();
8818  return __pyx_r;
8819 }
8820 
8821 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
8822  PyObject *__pyx_v_have_slices = NULL;
8823  PyObject *__pyx_v_indices = NULL;
8824  char *__pyx_v_itemp;
8825  PyObject *__pyx_r = NULL;
8826  __Pyx_RefNannyDeclarations
8827  int __pyx_t_1;
8828  int __pyx_t_2;
8829  PyObject *__pyx_t_3 = NULL;
8830  PyObject *__pyx_t_4 = NULL;
8831  PyObject *__pyx_t_5 = NULL;
8832  char *__pyx_t_6;
8833  int __pyx_lineno = 0;
8834  const char *__pyx_filename = NULL;
8835  int __pyx_clineno = 0;
8836  __Pyx_RefNannySetupContext("__getitem__", 0);
8837 
8838  /* "View.MemoryView":404
8839  *
8840  * def __getitem__(memoryview self, object index):
8841  * if index is Ellipsis: # <<<<<<<<<<<<<<
8842  * return self
8843  *
8844  */
8845  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
8846  __pyx_t_2 = (__pyx_t_1 != 0);
8847  if (__pyx_t_2) {
8848 
8849  /* "View.MemoryView":405
8850  * def __getitem__(memoryview self, object index):
8851  * if index is Ellipsis:
8852  * return self # <<<<<<<<<<<<<<
8853  *
8854  * have_slices, indices = _unellipsify(index, self.view.ndim)
8855  */
8856  __Pyx_XDECREF(__pyx_r);
8857  __Pyx_INCREF(((PyObject *)__pyx_v_self));
8858  __pyx_r = ((PyObject *)__pyx_v_self);
8859  goto __pyx_L0;
8860 
8861  /* "View.MemoryView":404
8862  *
8863  * def __getitem__(memoryview self, object index):
8864  * if index is Ellipsis: # <<<<<<<<<<<<<<
8865  * return self
8866  *
8867  */
8868  }
8869 
8870  /* "View.MemoryView":407
8871  * return self
8872  *
8873  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
8874  *
8875  * cdef char *itemp
8876  */
8877  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
8878  __Pyx_GOTREF(__pyx_t_3);
8879  if (likely(__pyx_t_3 != Py_None)) {
8880  PyObject* sequence = __pyx_t_3;
8881  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
8882  if (unlikely(size != 2)) {
8883  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
8884  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
8885  __PYX_ERR(0, 407, __pyx_L1_error)
8886  }
8887  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8888  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
8889  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
8890  __Pyx_INCREF(__pyx_t_4);
8891  __Pyx_INCREF(__pyx_t_5);
8892  #else
8893  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
8894  __Pyx_GOTREF(__pyx_t_4);
8895  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error)
8896  __Pyx_GOTREF(__pyx_t_5);
8897  #endif
8898  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8899  } else {
8900  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 407, __pyx_L1_error)
8901  }
8902  __pyx_v_have_slices = __pyx_t_4;
8903  __pyx_t_4 = 0;
8904  __pyx_v_indices = __pyx_t_5;
8905  __pyx_t_5 = 0;
8906 
8907  /* "View.MemoryView":410
8908  *
8909  * cdef char *itemp
8910  * if have_slices: # <<<<<<<<<<<<<<
8911  * return memview_slice(self, indices)
8912  * else:
8913  */
8914  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
8915  if (__pyx_t_2) {
8916 
8917  /* "View.MemoryView":411
8918  * cdef char *itemp
8919  * if have_slices:
8920  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
8921  * else:
8922  * itemp = self.get_item_pointer(indices)
8923  */
8924  __Pyx_XDECREF(__pyx_r);
8925  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
8926  __Pyx_GOTREF(__pyx_t_3);
8927  __pyx_r = __pyx_t_3;
8928  __pyx_t_3 = 0;
8929  goto __pyx_L0;
8930 
8931  /* "View.MemoryView":410
8932  *
8933  * cdef char *itemp
8934  * if have_slices: # <<<<<<<<<<<<<<
8935  * return memview_slice(self, indices)
8936  * else:
8937  */
8938  }
8939 
8940  /* "View.MemoryView":413
8941  * return memview_slice(self, indices)
8942  * else:
8943  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
8944  * return self.convert_item_to_object(itemp)
8945  *
8946  */
8947  /*else*/ {
8948  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 413, __pyx_L1_error)
8949  __pyx_v_itemp = __pyx_t_6;
8950 
8951  /* "View.MemoryView":414
8952  * else:
8953  * itemp = self.get_item_pointer(indices)
8954  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
8955  *
8956  * def __setitem__(memoryview self, object index, object value):
8957  */
8958  __Pyx_XDECREF(__pyx_r);
8959  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
8960  __Pyx_GOTREF(__pyx_t_3);
8961  __pyx_r = __pyx_t_3;
8962  __pyx_t_3 = 0;
8963  goto __pyx_L0;
8964  }
8965 
8966  /* "View.MemoryView":403
8967  *
8968  *
8969  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
8970  * if index is Ellipsis:
8971  * return self
8972  */
8973 
8974  /* function exit code */
8975  __pyx_L1_error:;
8976  __Pyx_XDECREF(__pyx_t_3);
8977  __Pyx_XDECREF(__pyx_t_4);
8978  __Pyx_XDECREF(__pyx_t_5);
8979  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8980  __pyx_r = NULL;
8981  __pyx_L0:;
8982  __Pyx_XDECREF(__pyx_v_have_slices);
8983  __Pyx_XDECREF(__pyx_v_indices);
8984  __Pyx_XGIVEREF(__pyx_r);
8985  __Pyx_RefNannyFinishContext();
8986  return __pyx_r;
8987 }
8988 
8989 /* "View.MemoryView":416
8990  * return self.convert_item_to_object(itemp)
8991  *
8992  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
8993  * if self.view.readonly:
8994  * raise TypeError("Cannot assign to read-only memoryview")
8995  */
8996 
8997 /* Python wrapper */
8998 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
8999 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9000  int __pyx_r;
9001  __Pyx_RefNannyDeclarations
9002  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
9003  __pyx_r = __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));
9004 
9005  /* function exit code */
9006  __Pyx_RefNannyFinishContext();
9007  return __pyx_r;
9008 }
9009 
9010 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) {
9011  PyObject *__pyx_v_have_slices = NULL;
9012  PyObject *__pyx_v_obj = NULL;
9013  int __pyx_r;
9014  __Pyx_RefNannyDeclarations
9015  int __pyx_t_1;
9016  PyObject *__pyx_t_2 = NULL;
9017  PyObject *__pyx_t_3 = NULL;
9018  PyObject *__pyx_t_4 = NULL;
9019  int __pyx_lineno = 0;
9020  const char *__pyx_filename = NULL;
9021  int __pyx_clineno = 0;
9022  __Pyx_RefNannySetupContext("__setitem__", 0);
9023  __Pyx_INCREF(__pyx_v_index);
9024 
9025  /* "View.MemoryView":417
9026  *
9027  * def __setitem__(memoryview self, object index, object value):
9028  * if self.view.readonly: # <<<<<<<<<<<<<<
9029  * raise TypeError("Cannot assign to read-only memoryview")
9030  *
9031  */
9032  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
9033  if (unlikely(__pyx_t_1)) {
9034 
9035  /* "View.MemoryView":418
9036  * def __setitem__(memoryview self, object index, object value):
9037  * if self.view.readonly:
9038  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
9039  *
9040  * have_slices, index = _unellipsify(index, self.view.ndim)
9041  */
9042  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
9043  __Pyx_GOTREF(__pyx_t_2);
9044  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
9045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9046  __PYX_ERR(0, 418, __pyx_L1_error)
9047 
9048  /* "View.MemoryView":417
9049  *
9050  * def __setitem__(memoryview self, object index, object value):
9051  * if self.view.readonly: # <<<<<<<<<<<<<<
9052  * raise TypeError("Cannot assign to read-only memoryview")
9053  *
9054  */
9055  }
9056 
9057  /* "View.MemoryView":420
9058  * raise TypeError("Cannot assign to read-only memoryview")
9059  *
9060  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
9061  *
9062  * if have_slices:
9063  */
9064  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
9065  __Pyx_GOTREF(__pyx_t_2);
9066  if (likely(__pyx_t_2 != Py_None)) {
9067  PyObject* sequence = __pyx_t_2;
9068  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
9069  if (unlikely(size != 2)) {
9070  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9071  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9072  __PYX_ERR(0, 420, __pyx_L1_error)
9073  }
9074  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9075  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
9076  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
9077  __Pyx_INCREF(__pyx_t_3);
9078  __Pyx_INCREF(__pyx_t_4);
9079  #else
9080  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
9081  __Pyx_GOTREF(__pyx_t_3);
9082  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
9083  __Pyx_GOTREF(__pyx_t_4);
9084  #endif
9085  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9086  } else {
9087  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 420, __pyx_L1_error)
9088  }
9089  __pyx_v_have_slices = __pyx_t_3;
9090  __pyx_t_3 = 0;
9091  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
9092  __pyx_t_4 = 0;
9093 
9094  /* "View.MemoryView":422
9095  * have_slices, index = _unellipsify(index, self.view.ndim)
9096  *
9097  * if have_slices: # <<<<<<<<<<<<<<
9098  * obj = self.is_slice(value)
9099  * if obj:
9100  */
9101  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
9102  if (__pyx_t_1) {
9103 
9104  /* "View.MemoryView":423
9105  *
9106  * if have_slices:
9107  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
9108  * if obj:
9109  * self.setitem_slice_assignment(self[index], obj)
9110  */
9111  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
9112  __Pyx_GOTREF(__pyx_t_2);
9113  __pyx_v_obj = __pyx_t_2;
9114  __pyx_t_2 = 0;
9115 
9116  /* "View.MemoryView":424
9117  * if have_slices:
9118  * obj = self.is_slice(value)
9119  * if obj: # <<<<<<<<<<<<<<
9120  * self.setitem_slice_assignment(self[index], obj)
9121  * else:
9122  */
9123  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
9124  if (__pyx_t_1) {
9125 
9126  /* "View.MemoryView":425
9127  * obj = self.is_slice(value)
9128  * if obj:
9129  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
9130  * else:
9131  * self.setitem_slice_assign_scalar(self[index], value)
9132  */
9133  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
9134  __Pyx_GOTREF(__pyx_t_2);
9135  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
9136  __Pyx_GOTREF(__pyx_t_4);
9137  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9138  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9139 
9140  /* "View.MemoryView":424
9141  * if have_slices:
9142  * obj = self.is_slice(value)
9143  * if obj: # <<<<<<<<<<<<<<
9144  * self.setitem_slice_assignment(self[index], obj)
9145  * else:
9146  */
9147  goto __pyx_L5;
9148  }
9149 
9150  /* "View.MemoryView":427
9151  * self.setitem_slice_assignment(self[index], obj)
9152  * else:
9153  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
9154  * else:
9155  * self.setitem_indexed(index, value)
9156  */
9157  /*else*/ {
9158  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
9159  __Pyx_GOTREF(__pyx_t_4);
9160  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(0, 427, __pyx_L1_error)
9161  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
9162  __Pyx_GOTREF(__pyx_t_2);
9163  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9164  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9165  }
9166  __pyx_L5:;
9167 
9168  /* "View.MemoryView":422
9169  * have_slices, index = _unellipsify(index, self.view.ndim)
9170  *
9171  * if have_slices: # <<<<<<<<<<<<<<
9172  * obj = self.is_slice(value)
9173  * if obj:
9174  */
9175  goto __pyx_L4;
9176  }
9177 
9178  /* "View.MemoryView":429
9179  * self.setitem_slice_assign_scalar(self[index], value)
9180  * else:
9181  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
9182  *
9183  * cdef is_slice(self, obj):
9184  */
9185  /*else*/ {
9186  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
9187  __Pyx_GOTREF(__pyx_t_2);
9188  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9189  }
9190  __pyx_L4:;
9191 
9192  /* "View.MemoryView":416
9193  * return self.convert_item_to_object(itemp)
9194  *
9195  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
9196  * if self.view.readonly:
9197  * raise TypeError("Cannot assign to read-only memoryview")
9198  */
9199 
9200  /* function exit code */
9201  __pyx_r = 0;
9202  goto __pyx_L0;
9203  __pyx_L1_error:;
9204  __Pyx_XDECREF(__pyx_t_2);
9205  __Pyx_XDECREF(__pyx_t_3);
9206  __Pyx_XDECREF(__pyx_t_4);
9207  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9208  __pyx_r = -1;
9209  __pyx_L0:;
9210  __Pyx_XDECREF(__pyx_v_have_slices);
9211  __Pyx_XDECREF(__pyx_v_obj);
9212  __Pyx_XDECREF(__pyx_v_index);
9213  __Pyx_RefNannyFinishContext();
9214  return __pyx_r;
9215 }
9216 
9217 /* "View.MemoryView":431
9218  * self.setitem_indexed(index, value)
9219  *
9220  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
9221  * if not isinstance(obj, memoryview):
9222  * try:
9223  */
9224 
9225 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
9226  PyObject *__pyx_r = NULL;
9227  __Pyx_RefNannyDeclarations
9228  int __pyx_t_1;
9229  int __pyx_t_2;
9230  PyObject *__pyx_t_3 = NULL;
9231  PyObject *__pyx_t_4 = NULL;
9232  PyObject *__pyx_t_5 = NULL;
9233  PyObject *__pyx_t_6 = NULL;
9234  PyObject *__pyx_t_7 = NULL;
9235  PyObject *__pyx_t_8 = NULL;
9236  int __pyx_t_9;
9237  int __pyx_lineno = 0;
9238  const char *__pyx_filename = NULL;
9239  int __pyx_clineno = 0;
9240  __Pyx_RefNannySetupContext("is_slice", 0);
9241  __Pyx_INCREF(__pyx_v_obj);
9242 
9243  /* "View.MemoryView":432
9244  *
9245  * cdef is_slice(self, obj):
9246  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
9247  * try:
9248  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9249  */
9250  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
9251  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
9252  if (__pyx_t_2) {
9253 
9254  /* "View.MemoryView":433
9255  * cdef is_slice(self, obj):
9256  * if not isinstance(obj, memoryview):
9257  * try: # <<<<<<<<<<<<<<
9258  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9259  * self.dtype_is_object)
9260  */
9261  {
9262  __Pyx_PyThreadState_declare
9263  __Pyx_PyThreadState_assign
9264  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
9265  __Pyx_XGOTREF(__pyx_t_3);
9266  __Pyx_XGOTREF(__pyx_t_4);
9267  __Pyx_XGOTREF(__pyx_t_5);
9268  /*try:*/ {
9269 
9270  /* "View.MemoryView":434
9271  * if not isinstance(obj, memoryview):
9272  * try:
9273  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
9274  * self.dtype_is_object)
9275  * except TypeError:
9276  */
9277  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L4_error)
9278  __Pyx_GOTREF(__pyx_t_6);
9279 
9280  /* "View.MemoryView":435
9281  * try:
9282  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9283  * self.dtype_is_object) # <<<<<<<<<<<<<<
9284  * except TypeError:
9285  * return None
9286  */
9287  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L4_error)
9288  __Pyx_GOTREF(__pyx_t_7);
9289 
9290  /* "View.MemoryView":434
9291  * if not isinstance(obj, memoryview):
9292  * try:
9293  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
9294  * self.dtype_is_object)
9295  * except TypeError:
9296  */
9297  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 434, __pyx_L4_error)
9298  __Pyx_GOTREF(__pyx_t_8);
9299  __Pyx_INCREF(__pyx_v_obj);
9300  __Pyx_GIVEREF(__pyx_v_obj);
9301  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
9302  __Pyx_GIVEREF(__pyx_t_6);
9303  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
9304  __Pyx_GIVEREF(__pyx_t_7);
9305  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
9306  __pyx_t_6 = 0;
9307  __pyx_t_7 = 0;
9308  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L4_error)
9309  __Pyx_GOTREF(__pyx_t_7);
9310  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9311  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
9312  __pyx_t_7 = 0;
9313 
9314  /* "View.MemoryView":433
9315  * cdef is_slice(self, obj):
9316  * if not isinstance(obj, memoryview):
9317  * try: # <<<<<<<<<<<<<<
9318  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9319  * self.dtype_is_object)
9320  */
9321  }
9322  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9323  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9324  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9325  goto __pyx_L9_try_end;
9326  __pyx_L4_error:;
9327  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9328  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9329  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9330 
9331  /* "View.MemoryView":436
9332  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9333  * self.dtype_is_object)
9334  * except TypeError: # <<<<<<<<<<<<<<
9335  * return None
9336  *
9337  */
9338  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
9339  if (__pyx_t_9) {
9340  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9341  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 436, __pyx_L6_except_error)
9342  __Pyx_GOTREF(__pyx_t_7);
9343  __Pyx_GOTREF(__pyx_t_8);
9344  __Pyx_GOTREF(__pyx_t_6);
9345 
9346  /* "View.MemoryView":437
9347  * self.dtype_is_object)
9348  * except TypeError:
9349  * return None # <<<<<<<<<<<<<<
9350  *
9351  * return obj
9352  */
9353  __Pyx_XDECREF(__pyx_r);
9354  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9355  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9356  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9357  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9358  goto __pyx_L7_except_return;
9359  }
9360  goto __pyx_L6_except_error;
9361  __pyx_L6_except_error:;
9362 
9363  /* "View.MemoryView":433
9364  * cdef is_slice(self, obj):
9365  * if not isinstance(obj, memoryview):
9366  * try: # <<<<<<<<<<<<<<
9367  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9368  * self.dtype_is_object)
9369  */
9370  __Pyx_XGIVEREF(__pyx_t_3);
9371  __Pyx_XGIVEREF(__pyx_t_4);
9372  __Pyx_XGIVEREF(__pyx_t_5);
9373  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
9374  goto __pyx_L1_error;
9375  __pyx_L7_except_return:;
9376  __Pyx_XGIVEREF(__pyx_t_3);
9377  __Pyx_XGIVEREF(__pyx_t_4);
9378  __Pyx_XGIVEREF(__pyx_t_5);
9379  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
9380  goto __pyx_L0;
9381  __pyx_L9_try_end:;
9382  }
9383 
9384  /* "View.MemoryView":432
9385  *
9386  * cdef is_slice(self, obj):
9387  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
9388  * try:
9389  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9390  */
9391  }
9392 
9393  /* "View.MemoryView":439
9394  * return None
9395  *
9396  * return obj # <<<<<<<<<<<<<<
9397  *
9398  * cdef setitem_slice_assignment(self, dst, src):
9399  */
9400  __Pyx_XDECREF(__pyx_r);
9401  __Pyx_INCREF(__pyx_v_obj);
9402  __pyx_r = __pyx_v_obj;
9403  goto __pyx_L0;
9404 
9405  /* "View.MemoryView":431
9406  * self.setitem_indexed(index, value)
9407  *
9408  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
9409  * if not isinstance(obj, memoryview):
9410  * try:
9411  */
9412 
9413  /* function exit code */
9414  __pyx_L1_error:;
9415  __Pyx_XDECREF(__pyx_t_6);
9416  __Pyx_XDECREF(__pyx_t_7);
9417  __Pyx_XDECREF(__pyx_t_8);
9418  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9419  __pyx_r = 0;
9420  __pyx_L0:;
9421  __Pyx_XDECREF(__pyx_v_obj);
9422  __Pyx_XGIVEREF(__pyx_r);
9423  __Pyx_RefNannyFinishContext();
9424  return __pyx_r;
9425 }
9426 
9427 /* "View.MemoryView":441
9428  * return obj
9429  *
9430  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
9431  * cdef __Pyx_memviewslice dst_slice
9432  * cdef __Pyx_memviewslice src_slice
9433  */
9434 
9435 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
9436  __Pyx_memviewslice __pyx_v_dst_slice;
9437  __Pyx_memviewslice __pyx_v_src_slice;
9438  PyObject *__pyx_r = NULL;
9439  __Pyx_RefNannyDeclarations
9440  __Pyx_memviewslice *__pyx_t_1;
9441  __Pyx_memviewslice *__pyx_t_2;
9442  PyObject *__pyx_t_3 = NULL;
9443  int __pyx_t_4;
9444  int __pyx_t_5;
9445  int __pyx_t_6;
9446  int __pyx_lineno = 0;
9447  const char *__pyx_filename = NULL;
9448  int __pyx_clineno = 0;
9449  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
9450 
9451  /* "View.MemoryView":445
9452  * cdef __Pyx_memviewslice src_slice
9453  *
9454  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
9455  * get_slice_from_memview(dst, &dst_slice)[0],
9456  * src.ndim, dst.ndim, self.dtype_is_object)
9457  */
9458  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 445, __pyx_L1_error)
9459  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 445, __pyx_L1_error)
9460 
9461  /* "View.MemoryView":446
9462  *
9463  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
9464  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
9465  * src.ndim, dst.ndim, self.dtype_is_object)
9466  *
9467  */
9468  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 446, __pyx_L1_error)
9469  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 446, __pyx_L1_error)
9470 
9471  /* "View.MemoryView":447
9472  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
9473  * get_slice_from_memview(dst, &dst_slice)[0],
9474  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
9475  *
9476  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
9477  */
9478  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
9479  __Pyx_GOTREF(__pyx_t_3);
9480  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
9481  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9482  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
9483  __Pyx_GOTREF(__pyx_t_3);
9484  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
9485  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9486 
9487  /* "View.MemoryView":445
9488  * cdef __Pyx_memviewslice src_slice
9489  *
9490  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
9491  * get_slice_from_memview(dst, &dst_slice)[0],
9492  * src.ndim, dst.ndim, self.dtype_is_object)
9493  */
9494  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 445, __pyx_L1_error)
9495 
9496  /* "View.MemoryView":441
9497  * return obj
9498  *
9499  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
9500  * cdef __Pyx_memviewslice dst_slice
9501  * cdef __Pyx_memviewslice src_slice
9502  */
9503 
9504  /* function exit code */
9505  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9506  goto __pyx_L0;
9507  __pyx_L1_error:;
9508  __Pyx_XDECREF(__pyx_t_3);
9509  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
9510  __pyx_r = 0;
9511  __pyx_L0:;
9512  __Pyx_XGIVEREF(__pyx_r);
9513  __Pyx_RefNannyFinishContext();
9514  return __pyx_r;
9515 }
9516 
9517 /* "View.MemoryView":449
9518  * src.ndim, dst.ndim, self.dtype_is_object)
9519  *
9520  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
9521  * cdef int array[128]
9522  * cdef void *tmp = NULL
9523  */
9524 
9525 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) {
9526  int __pyx_v_array[0x80];
9527  void *__pyx_v_tmp;
9528  void *__pyx_v_item;
9529  __Pyx_memviewslice *__pyx_v_dst_slice;
9530  __Pyx_memviewslice __pyx_v_tmp_slice;
9531  PyObject *__pyx_r = NULL;
9532  __Pyx_RefNannyDeclarations
9533  __Pyx_memviewslice *__pyx_t_1;
9534  int __pyx_t_2;
9535  PyObject *__pyx_t_3 = NULL;
9536  int __pyx_t_4;
9537  int __pyx_t_5;
9538  char const *__pyx_t_6;
9539  PyObject *__pyx_t_7 = NULL;
9540  PyObject *__pyx_t_8 = NULL;
9541  PyObject *__pyx_t_9 = NULL;
9542  PyObject *__pyx_t_10 = NULL;
9543  PyObject *__pyx_t_11 = NULL;
9544  PyObject *__pyx_t_12 = NULL;
9545  int __pyx_lineno = 0;
9546  const char *__pyx_filename = NULL;
9547  int __pyx_clineno = 0;
9548  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
9549 
9550  /* "View.MemoryView":451
9551  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
9552  * cdef int array[128]
9553  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
9554  * cdef void *item
9555  *
9556  */
9557  __pyx_v_tmp = NULL;
9558 
9559  /* "View.MemoryView":456
9560  * cdef __Pyx_memviewslice *dst_slice
9561  * cdef __Pyx_memviewslice tmp_slice
9562  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
9563  *
9564  * if <size_t>self.view.itemsize > sizeof(array):
9565  */
9566  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 456, __pyx_L1_error)
9567  __pyx_v_dst_slice = __pyx_t_1;
9568 
9569  /* "View.MemoryView":458
9570  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
9571  *
9572  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
9573  * tmp = PyMem_Malloc(self.view.itemsize)
9574  * if tmp == NULL:
9575  */
9576  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
9577  if (__pyx_t_2) {
9578 
9579  /* "View.MemoryView":459
9580  *
9581  * if <size_t>self.view.itemsize > sizeof(array):
9582  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
9583  * if tmp == NULL:
9584  * raise MemoryError
9585  */
9586  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
9587 
9588  /* "View.MemoryView":460
9589  * if <size_t>self.view.itemsize > sizeof(array):
9590  * tmp = PyMem_Malloc(self.view.itemsize)
9591  * if tmp == NULL: # <<<<<<<<<<<<<<
9592  * raise MemoryError
9593  * item = tmp
9594  */
9595  __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
9596  if (unlikely(__pyx_t_2)) {
9597 
9598  /* "View.MemoryView":461
9599  * tmp = PyMem_Malloc(self.view.itemsize)
9600  * if tmp == NULL:
9601  * raise MemoryError # <<<<<<<<<<<<<<
9602  * item = tmp
9603  * else:
9604  */
9605  PyErr_NoMemory(); __PYX_ERR(0, 461, __pyx_L1_error)
9606 
9607  /* "View.MemoryView":460
9608  * if <size_t>self.view.itemsize > sizeof(array):
9609  * tmp = PyMem_Malloc(self.view.itemsize)
9610  * if tmp == NULL: # <<<<<<<<<<<<<<
9611  * raise MemoryError
9612  * item = tmp
9613  */
9614  }
9615 
9616  /* "View.MemoryView":462
9617  * if tmp == NULL:
9618  * raise MemoryError
9619  * item = tmp # <<<<<<<<<<<<<<
9620  * else:
9621  * item = <void *> array
9622  */
9623  __pyx_v_item = __pyx_v_tmp;
9624 
9625  /* "View.MemoryView":458
9626  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
9627  *
9628  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
9629  * tmp = PyMem_Malloc(self.view.itemsize)
9630  * if tmp == NULL:
9631  */
9632  goto __pyx_L3;
9633  }
9634 
9635  /* "View.MemoryView":464
9636  * item = tmp
9637  * else:
9638  * item = <void *> array # <<<<<<<<<<<<<<
9639  *
9640  * try:
9641  */
9642  /*else*/ {
9643  __pyx_v_item = ((void *)__pyx_v_array);
9644  }
9645  __pyx_L3:;
9646 
9647  /* "View.MemoryView":466
9648  * item = <void *> array
9649  *
9650  * try: # <<<<<<<<<<<<<<
9651  * if self.dtype_is_object:
9652  * (<PyObject **> item)[0] = <PyObject *> value
9653  */
9654  /*try:*/ {
9655 
9656  /* "View.MemoryView":467
9657  *
9658  * try:
9659  * if self.dtype_is_object: # <<<<<<<<<<<<<<
9660  * (<PyObject **> item)[0] = <PyObject *> value
9661  * else:
9662  */
9663  __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
9664  if (__pyx_t_2) {
9665 
9666  /* "View.MemoryView":468
9667  * try:
9668  * if self.dtype_is_object:
9669  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
9670  * else:
9671  * self.assign_item_from_object(<char *> item, value)
9672  */
9673  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
9674 
9675  /* "View.MemoryView":467
9676  *
9677  * try:
9678  * if self.dtype_is_object: # <<<<<<<<<<<<<<
9679  * (<PyObject **> item)[0] = <PyObject *> value
9680  * else:
9681  */
9682  goto __pyx_L8;
9683  }
9684 
9685  /* "View.MemoryView":470
9686  * (<PyObject **> item)[0] = <PyObject *> value
9687  * else:
9688  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
9689  *
9690  *
9691  */
9692  /*else*/ {
9693  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L6_error)
9694  __Pyx_GOTREF(__pyx_t_3);
9695  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9696  }
9697  __pyx_L8:;
9698 
9699  /* "View.MemoryView":474
9700  *
9701  *
9702  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
9703  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9704  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
9705  */
9706  __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
9707  if (__pyx_t_2) {
9708 
9709  /* "View.MemoryView":475
9710  *
9711  * if self.view.suboffsets != NULL:
9712  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
9713  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
9714  * item, self.dtype_is_object)
9715  */
9716  __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L6_error)
9717  __Pyx_GOTREF(__pyx_t_3);
9718  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9719 
9720  /* "View.MemoryView":474
9721  *
9722  *
9723  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
9724  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9725  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
9726  */
9727  }
9728 
9729  /* "View.MemoryView":476
9730  * if self.view.suboffsets != NULL:
9731  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9732  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
9733  * item, self.dtype_is_object)
9734  * finally:
9735  */
9736  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
9737  }
9738 
9739  /* "View.MemoryView":479
9740  * item, self.dtype_is_object)
9741  * finally:
9742  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
9743  *
9744  * cdef setitem_indexed(self, index, value):
9745  */
9746  /*finally:*/ {
9747  /*normal exit:*/{
9748  PyMem_Free(__pyx_v_tmp);
9749  goto __pyx_L7;
9750  }
9751  __pyx_L6_error:;
9752  /*exception exit:*/{
9753  __Pyx_PyThreadState_declare
9754  __Pyx_PyThreadState_assign
9755  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
9756  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9757  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
9758  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
9759  __Pyx_XGOTREF(__pyx_t_7);
9760  __Pyx_XGOTREF(__pyx_t_8);
9761  __Pyx_XGOTREF(__pyx_t_9);
9762  __Pyx_XGOTREF(__pyx_t_10);
9763  __Pyx_XGOTREF(__pyx_t_11);
9764  __Pyx_XGOTREF(__pyx_t_12);
9765  __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
9766  {
9767  PyMem_Free(__pyx_v_tmp);
9768  }
9769  if (PY_MAJOR_VERSION >= 3) {
9770  __Pyx_XGIVEREF(__pyx_t_10);
9771  __Pyx_XGIVEREF(__pyx_t_11);
9772  __Pyx_XGIVEREF(__pyx_t_12);
9773  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
9774  }
9775  __Pyx_XGIVEREF(__pyx_t_7);
9776  __Pyx_XGIVEREF(__pyx_t_8);
9777  __Pyx_XGIVEREF(__pyx_t_9);
9778  __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
9779  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
9780  __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
9781  goto __pyx_L1_error;
9782  }
9783  __pyx_L7:;
9784  }
9785 
9786  /* "View.MemoryView":449
9787  * src.ndim, dst.ndim, self.dtype_is_object)
9788  *
9789  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
9790  * cdef int array[128]
9791  * cdef void *tmp = NULL
9792  */
9793 
9794  /* function exit code */
9795  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9796  goto __pyx_L0;
9797  __pyx_L1_error:;
9798  __Pyx_XDECREF(__pyx_t_3);
9799  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9800  __pyx_r = 0;
9801  __pyx_L0:;
9802  __Pyx_XGIVEREF(__pyx_r);
9803  __Pyx_RefNannyFinishContext();
9804  return __pyx_r;
9805 }
9806 
9807 /* "View.MemoryView":481
9808  * PyMem_Free(tmp)
9809  *
9810  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
9811  * cdef char *itemp = self.get_item_pointer(index)
9812  * self.assign_item_from_object(itemp, value)
9813  */
9814 
9815 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9816  char *__pyx_v_itemp;
9817  PyObject *__pyx_r = NULL;
9818  __Pyx_RefNannyDeclarations
9819  char *__pyx_t_1;
9820  PyObject *__pyx_t_2 = NULL;
9821  int __pyx_lineno = 0;
9822  const char *__pyx_filename = NULL;
9823  int __pyx_clineno = 0;
9824  __Pyx_RefNannySetupContext("setitem_indexed", 0);
9825 
9826  /* "View.MemoryView":482
9827  *
9828  * cdef setitem_indexed(self, index, value):
9829  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
9830  * self.assign_item_from_object(itemp, value)
9831  *
9832  */
9833  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 482, __pyx_L1_error)
9834  __pyx_v_itemp = __pyx_t_1;
9835 
9836  /* "View.MemoryView":483
9837  * cdef setitem_indexed(self, index, value):
9838  * cdef char *itemp = self.get_item_pointer(index)
9839  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
9840  *
9841  * cdef convert_item_to_object(self, char *itemp):
9842  */
9843  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
9844  __Pyx_GOTREF(__pyx_t_2);
9845  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9846 
9847  /* "View.MemoryView":481
9848  * PyMem_Free(tmp)
9849  *
9850  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
9851  * cdef char *itemp = self.get_item_pointer(index)
9852  * self.assign_item_from_object(itemp, value)
9853  */
9854 
9855  /* function exit code */
9856  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9857  goto __pyx_L0;
9858  __pyx_L1_error:;
9859  __Pyx_XDECREF(__pyx_t_2);
9860  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
9861  __pyx_r = 0;
9862  __pyx_L0:;
9863  __Pyx_XGIVEREF(__pyx_r);
9864  __Pyx_RefNannyFinishContext();
9865  return __pyx_r;
9866 }
9867 
9868 /* "View.MemoryView":485
9869  * self.assign_item_from_object(itemp, value)
9870  *
9871  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
9872  * """Only used if instantiated manually by the user, or if Cython doesn't
9873  * know how to convert the type"""
9874  */
9875 
9876 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
9877  PyObject *__pyx_v_struct = NULL;
9878  PyObject *__pyx_v_bytesitem = 0;
9879  PyObject *__pyx_v_result = NULL;
9880  PyObject *__pyx_r = NULL;
9881  __Pyx_RefNannyDeclarations
9882  PyObject *__pyx_t_1 = NULL;
9883  PyObject *__pyx_t_2 = NULL;
9884  PyObject *__pyx_t_3 = NULL;
9885  PyObject *__pyx_t_4 = NULL;
9886  PyObject *__pyx_t_5 = NULL;
9887  PyObject *__pyx_t_6 = NULL;
9888  PyObject *__pyx_t_7 = NULL;
9889  int __pyx_t_8;
9890  PyObject *__pyx_t_9 = NULL;
9891  size_t __pyx_t_10;
9892  int __pyx_t_11;
9893  int __pyx_lineno = 0;
9894  const char *__pyx_filename = NULL;
9895  int __pyx_clineno = 0;
9896  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
9897 
9898  /* "View.MemoryView":488
9899  * """Only used if instantiated manually by the user, or if Cython doesn't
9900  * know how to convert the type"""
9901  * import struct # <<<<<<<<<<<<<<
9902  * cdef bytes bytesitem
9903  *
9904  */
9905  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
9906  __Pyx_GOTREF(__pyx_t_1);
9907  __pyx_v_struct = __pyx_t_1;
9908  __pyx_t_1 = 0;
9909 
9910  /* "View.MemoryView":491
9911  * cdef bytes bytesitem
9912  *
9913  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
9914  * try:
9915  * result = struct.unpack(self.view.format, bytesitem)
9916  */
9917  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
9918  __Pyx_GOTREF(__pyx_t_1);
9919  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
9920  __pyx_t_1 = 0;
9921 
9922  /* "View.MemoryView":492
9923  *
9924  * bytesitem = itemp[:self.view.itemsize]
9925  * try: # <<<<<<<<<<<<<<
9926  * result = struct.unpack(self.view.format, bytesitem)
9927  * except struct.error:
9928  */
9929  {
9930  __Pyx_PyThreadState_declare
9931  __Pyx_PyThreadState_assign
9932  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
9933  __Pyx_XGOTREF(__pyx_t_2);
9934  __Pyx_XGOTREF(__pyx_t_3);
9935  __Pyx_XGOTREF(__pyx_t_4);
9936  /*try:*/ {
9937 
9938  /* "View.MemoryView":493
9939  * bytesitem = itemp[:self.view.itemsize]
9940  * try:
9941  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
9942  * except struct.error:
9943  * raise ValueError("Unable to convert item to object")
9944  */
9945  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L3_error)
9946  __Pyx_GOTREF(__pyx_t_5);
9947  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L3_error)
9948  __Pyx_GOTREF(__pyx_t_6);
9949  __pyx_t_7 = NULL;
9950  __pyx_t_8 = 0;
9951  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
9952  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
9953  if (likely(__pyx_t_7)) {
9954  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9955  __Pyx_INCREF(__pyx_t_7);
9956  __Pyx_INCREF(function);
9957  __Pyx_DECREF_SET(__pyx_t_5, function);
9958  __pyx_t_8 = 1;
9959  }
9960  }
9961  #if CYTHON_FAST_PYCALL
9962  if (PyFunction_Check(__pyx_t_5)) {
9963  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
9964  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
9965  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9966  __Pyx_GOTREF(__pyx_t_1);
9967  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9968  } else
9969  #endif
9970  #if CYTHON_FAST_PYCCALL
9971  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
9972  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
9973  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
9974  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9975  __Pyx_GOTREF(__pyx_t_1);
9976  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9977  } else
9978  #endif
9979  {
9980  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 493, __pyx_L3_error)
9981  __Pyx_GOTREF(__pyx_t_9);
9982  if (__pyx_t_7) {
9983  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
9984  }
9985  __Pyx_GIVEREF(__pyx_t_6);
9986  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
9987  __Pyx_INCREF(__pyx_v_bytesitem);
9988  __Pyx_GIVEREF(__pyx_v_bytesitem);
9989  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
9990  __pyx_t_6 = 0;
9991  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
9992  __Pyx_GOTREF(__pyx_t_1);
9993  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9994  }
9995  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9996  __pyx_v_result = __pyx_t_1;
9997  __pyx_t_1 = 0;
9998 
9999  /* "View.MemoryView":492
10000  *
10001  * bytesitem = itemp[:self.view.itemsize]
10002  * try: # <<<<<<<<<<<<<<
10003  * result = struct.unpack(self.view.format, bytesitem)
10004  * except struct.error:
10005  */
10006  }
10007 
10008  /* "View.MemoryView":497
10009  * raise ValueError("Unable to convert item to object")
10010  * else:
10011  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
10012  * return result[0]
10013  * return result
10014  */
10015  /*else:*/ {
10016  __pyx_t_10 = strlen(__pyx_v_self->view.format);
10017  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
10018  if (__pyx_t_11) {
10019 
10020  /* "View.MemoryView":498
10021  * else:
10022  * if len(self.view.format) == 1:
10023  * return result[0] # <<<<<<<<<<<<<<
10024  * return result
10025  *
10026  */
10027  __Pyx_XDECREF(__pyx_r);
10028  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L5_except_error)
10029  __Pyx_GOTREF(__pyx_t_1);
10030  __pyx_r = __pyx_t_1;
10031  __pyx_t_1 = 0;
10032  goto __pyx_L6_except_return;
10033 
10034  /* "View.MemoryView":497
10035  * raise ValueError("Unable to convert item to object")
10036  * else:
10037  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
10038  * return result[0]
10039  * return result
10040  */
10041  }
10042 
10043  /* "View.MemoryView":499
10044  * if len(self.view.format) == 1:
10045  * return result[0]
10046  * return result # <<<<<<<<<<<<<<
10047  *
10048  * cdef assign_item_from_object(self, char *itemp, object value):
10049  */
10050  __Pyx_XDECREF(__pyx_r);
10051  __Pyx_INCREF(__pyx_v_result);
10052  __pyx_r = __pyx_v_result;
10053  goto __pyx_L6_except_return;
10054  }
10055  __pyx_L3_error:;
10056  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10057  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10058  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10059  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10060  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
10061 
10062  /* "View.MemoryView":494
10063  * try:
10064  * result = struct.unpack(self.view.format, bytesitem)
10065  * except struct.error: # <<<<<<<<<<<<<<
10066  * raise ValueError("Unable to convert item to object")
10067  * else:
10068  */
10069  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
10070  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L5_except_error)
10071  __Pyx_GOTREF(__pyx_t_6);
10072  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
10073  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10074  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
10075  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
10076  if (__pyx_t_8) {
10077  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10078  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 494, __pyx_L5_except_error)
10079  __Pyx_GOTREF(__pyx_t_9);
10080  __Pyx_GOTREF(__pyx_t_5);
10081  __Pyx_GOTREF(__pyx_t_1);
10082 
10083  /* "View.MemoryView":495
10084  * result = struct.unpack(self.view.format, bytesitem)
10085  * except struct.error:
10086  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
10087  * else:
10088  * if len(self.view.format) == 1:
10089  */
10090  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L5_except_error)
10091  __Pyx_GOTREF(__pyx_t_6);
10092  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
10093  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10094  __PYX_ERR(0, 495, __pyx_L5_except_error)
10095  }
10096  goto __pyx_L5_except_error;
10097  __pyx_L5_except_error:;
10098 
10099  /* "View.MemoryView":492
10100  *
10101  * bytesitem = itemp[:self.view.itemsize]
10102  * try: # <<<<<<<<<<<<<<
10103  * result = struct.unpack(self.view.format, bytesitem)
10104  * except struct.error:
10105  */
10106  __Pyx_XGIVEREF(__pyx_t_2);
10107  __Pyx_XGIVEREF(__pyx_t_3);
10108  __Pyx_XGIVEREF(__pyx_t_4);
10109  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
10110  goto __pyx_L1_error;
10111  __pyx_L6_except_return:;
10112  __Pyx_XGIVEREF(__pyx_t_2);
10113  __Pyx_XGIVEREF(__pyx_t_3);
10114  __Pyx_XGIVEREF(__pyx_t_4);
10115  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
10116  goto __pyx_L0;
10117  }
10118 
10119  /* "View.MemoryView":485
10120  * self.assign_item_from_object(itemp, value)
10121  *
10122  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
10123  * """Only used if instantiated manually by the user, or if Cython doesn't
10124  * know how to convert the type"""
10125  */
10126 
10127  /* function exit code */
10128  __pyx_L1_error:;
10129  __Pyx_XDECREF(__pyx_t_1);
10130  __Pyx_XDECREF(__pyx_t_5);
10131  __Pyx_XDECREF(__pyx_t_6);
10132  __Pyx_XDECREF(__pyx_t_7);
10133  __Pyx_XDECREF(__pyx_t_9);
10134  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10135  __pyx_r = 0;
10136  __pyx_L0:;
10137  __Pyx_XDECREF(__pyx_v_struct);
10138  __Pyx_XDECREF(__pyx_v_bytesitem);
10139  __Pyx_XDECREF(__pyx_v_result);
10140  __Pyx_XGIVEREF(__pyx_r);
10141  __Pyx_RefNannyFinishContext();
10142  return __pyx_r;
10143 }
10144 
10145 /* "View.MemoryView":501
10146  * return result
10147  *
10148  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
10149  * """Only used if instantiated manually by the user, or if Cython doesn't
10150  * know how to convert the type"""
10151  */
10152 
10153 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
10154  PyObject *__pyx_v_struct = NULL;
10155  char __pyx_v_c;
10156  PyObject *__pyx_v_bytesvalue = 0;
10157  Py_ssize_t __pyx_v_i;
10158  PyObject *__pyx_r = NULL;
10159  __Pyx_RefNannyDeclarations
10160  PyObject *__pyx_t_1 = NULL;
10161  int __pyx_t_2;
10162  int __pyx_t_3;
10163  PyObject *__pyx_t_4 = NULL;
10164  PyObject *__pyx_t_5 = NULL;
10165  PyObject *__pyx_t_6 = NULL;
10166  int __pyx_t_7;
10167  PyObject *__pyx_t_8 = NULL;
10168  Py_ssize_t __pyx_t_9;
10169  PyObject *__pyx_t_10 = NULL;
10170  char *__pyx_t_11;
10171  char *__pyx_t_12;
10172  char *__pyx_t_13;
10173  char *__pyx_t_14;
10174  int __pyx_lineno = 0;
10175  const char *__pyx_filename = NULL;
10176  int __pyx_clineno = 0;
10177  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
10178 
10179  /* "View.MemoryView":504
10180  * """Only used if instantiated manually by the user, or if Cython doesn't
10181  * know how to convert the type"""
10182  * import struct # <<<<<<<<<<<<<<
10183  * cdef char c
10184  * cdef bytes bytesvalue
10185  */
10186  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
10187  __Pyx_GOTREF(__pyx_t_1);
10188  __pyx_v_struct = __pyx_t_1;
10189  __pyx_t_1 = 0;
10190 
10191  /* "View.MemoryView":509
10192  * cdef Py_ssize_t i
10193  *
10194  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
10195  * bytesvalue = struct.pack(self.view.format, *value)
10196  * else:
10197  */
10198  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
10199  __pyx_t_3 = (__pyx_t_2 != 0);
10200  if (__pyx_t_3) {
10201 
10202  /* "View.MemoryView":510
10203  *
10204  * if isinstance(value, tuple):
10205  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
10206  * else:
10207  * bytesvalue = struct.pack(self.view.format, value)
10208  */
10209  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
10210  __Pyx_GOTREF(__pyx_t_1);
10211  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
10212  __Pyx_GOTREF(__pyx_t_4);
10213  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error)
10214  __Pyx_GOTREF(__pyx_t_5);
10215  __Pyx_GIVEREF(__pyx_t_4);
10216  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
10217  __pyx_t_4 = 0;
10218  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
10219  __Pyx_GOTREF(__pyx_t_4);
10220  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error)
10221  __Pyx_GOTREF(__pyx_t_6);
10222  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10223  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10224  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
10225  __Pyx_GOTREF(__pyx_t_4);
10226  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10227  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10228  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 510, __pyx_L1_error)
10229  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
10230  __pyx_t_4 = 0;
10231 
10232  /* "View.MemoryView":509
10233  * cdef Py_ssize_t i
10234  *
10235  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
10236  * bytesvalue = struct.pack(self.view.format, *value)
10237  * else:
10238  */
10239  goto __pyx_L3;
10240  }
10241 
10242  /* "View.MemoryView":512
10243  * bytesvalue = struct.pack(self.view.format, *value)
10244  * else:
10245  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
10246  *
10247  * for i, c in enumerate(bytesvalue):
10248  */
10249  /*else*/ {
10250  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
10251  __Pyx_GOTREF(__pyx_t_6);
10252  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
10253  __Pyx_GOTREF(__pyx_t_1);
10254  __pyx_t_5 = NULL;
10255  __pyx_t_7 = 0;
10256  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
10257  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
10258  if (likely(__pyx_t_5)) {
10259  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
10260  __Pyx_INCREF(__pyx_t_5);
10261  __Pyx_INCREF(function);
10262  __Pyx_DECREF_SET(__pyx_t_6, function);
10263  __pyx_t_7 = 1;
10264  }
10265  }
10266  #if CYTHON_FAST_PYCALL
10267  if (PyFunction_Check(__pyx_t_6)) {
10268  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
10269  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
10270  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10271  __Pyx_GOTREF(__pyx_t_4);
10272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10273  } else
10274  #endif
10275  #if CYTHON_FAST_PYCCALL
10276  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
10277  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
10278  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
10279  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10280  __Pyx_GOTREF(__pyx_t_4);
10281  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10282  } else
10283  #endif
10284  {
10285  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
10286  __Pyx_GOTREF(__pyx_t_8);
10287  if (__pyx_t_5) {
10288  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
10289  }
10290  __Pyx_GIVEREF(__pyx_t_1);
10291  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
10292  __Pyx_INCREF(__pyx_v_value);
10293  __Pyx_GIVEREF(__pyx_v_value);
10294  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
10295  __pyx_t_1 = 0;
10296  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
10297  __Pyx_GOTREF(__pyx_t_4);
10298  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10299  }
10300  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10301  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 512, __pyx_L1_error)
10302  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
10303  __pyx_t_4 = 0;
10304  }
10305  __pyx_L3:;
10306 
10307  /* "View.MemoryView":514
10308  * bytesvalue = struct.pack(self.view.format, value)
10309  *
10310  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
10311  * itemp[i] = c
10312  *
10313  */
10314  __pyx_t_9 = 0;
10315  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
10316  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
10317  __PYX_ERR(0, 514, __pyx_L1_error)
10318  }
10319  __Pyx_INCREF(__pyx_v_bytesvalue);
10320  __pyx_t_10 = __pyx_v_bytesvalue;
10321  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
10322  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
10323  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
10324  __pyx_t_11 = __pyx_t_14;
10325  __pyx_v_c = (__pyx_t_11[0]);
10326 
10327  /* "View.MemoryView":515
10328  *
10329  * for i, c in enumerate(bytesvalue):
10330  * itemp[i] = c # <<<<<<<<<<<<<<
10331  *
10332  * @cname('getbuffer')
10333  */
10334  __pyx_v_i = __pyx_t_9;
10335 
10336  /* "View.MemoryView":514
10337  * bytesvalue = struct.pack(self.view.format, value)
10338  *
10339  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
10340  * itemp[i] = c
10341  *
10342  */
10343  __pyx_t_9 = (__pyx_t_9 + 1);
10344 
10345  /* "View.MemoryView":515
10346  *
10347  * for i, c in enumerate(bytesvalue):
10348  * itemp[i] = c # <<<<<<<<<<<<<<
10349  *
10350  * @cname('getbuffer')
10351  */
10352  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
10353  }
10354  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10355 
10356  /* "View.MemoryView":501
10357  * return result
10358  *
10359  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
10360  * """Only used if instantiated manually by the user, or if Cython doesn't
10361  * know how to convert the type"""
10362  */
10363 
10364  /* function exit code */
10365  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10366  goto __pyx_L0;
10367  __pyx_L1_error:;
10368  __Pyx_XDECREF(__pyx_t_1);
10369  __Pyx_XDECREF(__pyx_t_4);
10370  __Pyx_XDECREF(__pyx_t_5);
10371  __Pyx_XDECREF(__pyx_t_6);
10372  __Pyx_XDECREF(__pyx_t_8);
10373  __Pyx_XDECREF(__pyx_t_10);
10374  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10375  __pyx_r = 0;
10376  __pyx_L0:;
10377  __Pyx_XDECREF(__pyx_v_struct);
10378  __Pyx_XDECREF(__pyx_v_bytesvalue);
10379  __Pyx_XGIVEREF(__pyx_r);
10380  __Pyx_RefNannyFinishContext();
10381  return __pyx_r;
10382 }
10383 
10384 /* "View.MemoryView":518
10385  *
10386  * @cname('getbuffer')
10387  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
10388  * if flags & PyBUF_WRITABLE and self.view.readonly:
10389  * raise ValueError("Cannot create writable memory view from read-only memoryview")
10390  */
10391 
10392 /* Python wrapper */
10393 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
10394 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
10395  int __pyx_r;
10396  __Pyx_RefNannyDeclarations
10397  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
10398  __pyx_r = __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));
10399 
10400  /* function exit code */
10401  __Pyx_RefNannyFinishContext();
10402  return __pyx_r;
10403 }
10404 
10405 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) {
10406  int __pyx_r;
10407  __Pyx_RefNannyDeclarations
10408  int __pyx_t_1;
10409  int __pyx_t_2;
10410  PyObject *__pyx_t_3 = NULL;
10411  Py_ssize_t *__pyx_t_4;
10412  char *__pyx_t_5;
10413  void *__pyx_t_6;
10414  int __pyx_t_7;
10415  Py_ssize_t __pyx_t_8;
10416  int __pyx_lineno = 0;
10417  const char *__pyx_filename = NULL;
10418  int __pyx_clineno = 0;
10419  if (__pyx_v_info == NULL) {
10420  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
10421  return -1;
10422  }
10423  __Pyx_RefNannySetupContext("__getbuffer__", 0);
10424  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
10425  __Pyx_GIVEREF(__pyx_v_info->obj);
10426 
10427  /* "View.MemoryView":519
10428  * @cname('getbuffer')
10429  * def __getbuffer__(self, Py_buffer *info, int flags):
10430  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
10431  * raise ValueError("Cannot create writable memory view from read-only memoryview")
10432  *
10433  */
10434  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
10435  if (__pyx_t_2) {
10436  } else {
10437  __pyx_t_1 = __pyx_t_2;
10438  goto __pyx_L4_bool_binop_done;
10439  }
10440  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
10441  __pyx_t_1 = __pyx_t_2;
10442  __pyx_L4_bool_binop_done:;
10443  if (unlikely(__pyx_t_1)) {
10444 
10445  /* "View.MemoryView":520
10446  * def __getbuffer__(self, Py_buffer *info, int flags):
10447  * if flags & PyBUF_WRITABLE and self.view.readonly:
10448  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
10449  *
10450  * if flags & PyBUF_ND:
10451  */
10452  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
10453  __Pyx_GOTREF(__pyx_t_3);
10454  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
10455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10456  __PYX_ERR(0, 520, __pyx_L1_error)
10457 
10458  /* "View.MemoryView":519
10459  * @cname('getbuffer')
10460  * def __getbuffer__(self, Py_buffer *info, int flags):
10461  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
10462  * raise ValueError("Cannot create writable memory view from read-only memoryview")
10463  *
10464  */
10465  }
10466 
10467  /* "View.MemoryView":522
10468  * raise ValueError("Cannot create writable memory view from read-only memoryview")
10469  *
10470  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
10471  * info.shape = self.view.shape
10472  * else:
10473  */
10474  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
10475  if (__pyx_t_1) {
10476 
10477  /* "View.MemoryView":523
10478  *
10479  * if flags & PyBUF_ND:
10480  * info.shape = self.view.shape # <<<<<<<<<<<<<<
10481  * else:
10482  * info.shape = NULL
10483  */
10484  __pyx_t_4 = __pyx_v_self->view.shape;
10485  __pyx_v_info->shape = __pyx_t_4;
10486 
10487  /* "View.MemoryView":522
10488  * raise ValueError("Cannot create writable memory view from read-only memoryview")
10489  *
10490  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
10491  * info.shape = self.view.shape
10492  * else:
10493  */
10494  goto __pyx_L6;
10495  }
10496 
10497  /* "View.MemoryView":525
10498  * info.shape = self.view.shape
10499  * else:
10500  * info.shape = NULL # <<<<<<<<<<<<<<
10501  *
10502  * if flags & PyBUF_STRIDES:
10503  */
10504  /*else*/ {
10505  __pyx_v_info->shape = NULL;
10506  }
10507  __pyx_L6:;
10508 
10509  /* "View.MemoryView":527
10510  * info.shape = NULL
10511  *
10512  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
10513  * info.strides = self.view.strides
10514  * else:
10515  */
10516  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
10517  if (__pyx_t_1) {
10518 
10519  /* "View.MemoryView":528
10520  *
10521  * if flags & PyBUF_STRIDES:
10522  * info.strides = self.view.strides # <<<<<<<<<<<<<<
10523  * else:
10524  * info.strides = NULL
10525  */
10526  __pyx_t_4 = __pyx_v_self->view.strides;
10527  __pyx_v_info->strides = __pyx_t_4;
10528 
10529  /* "View.MemoryView":527
10530  * info.shape = NULL
10531  *
10532  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
10533  * info.strides = self.view.strides
10534  * else:
10535  */
10536  goto __pyx_L7;
10537  }
10538 
10539  /* "View.MemoryView":530
10540  * info.strides = self.view.strides
10541  * else:
10542  * info.strides = NULL # <<<<<<<<<<<<<<
10543  *
10544  * if flags & PyBUF_INDIRECT:
10545  */
10546  /*else*/ {
10547  __pyx_v_info->strides = NULL;
10548  }
10549  __pyx_L7:;
10550 
10551  /* "View.MemoryView":532
10552  * info.strides = NULL
10553  *
10554  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
10555  * info.suboffsets = self.view.suboffsets
10556  * else:
10557  */
10558  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
10559  if (__pyx_t_1) {
10560 
10561  /* "View.MemoryView":533
10562  *
10563  * if flags & PyBUF_INDIRECT:
10564  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
10565  * else:
10566  * info.suboffsets = NULL
10567  */
10568  __pyx_t_4 = __pyx_v_self->view.suboffsets;
10569  __pyx_v_info->suboffsets = __pyx_t_4;
10570 
10571  /* "View.MemoryView":532
10572  * info.strides = NULL
10573  *
10574  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
10575  * info.suboffsets = self.view.suboffsets
10576  * else:
10577  */
10578  goto __pyx_L8;
10579  }
10580 
10581  /* "View.MemoryView":535
10582  * info.suboffsets = self.view.suboffsets
10583  * else:
10584  * info.suboffsets = NULL # <<<<<<<<<<<<<<
10585  *
10586  * if flags & PyBUF_FORMAT:
10587  */
10588  /*else*/ {
10589  __pyx_v_info->suboffsets = NULL;
10590  }
10591  __pyx_L8:;
10592 
10593  /* "View.MemoryView":537
10594  * info.suboffsets = NULL
10595  *
10596  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
10597  * info.format = self.view.format
10598  * else:
10599  */
10600  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
10601  if (__pyx_t_1) {
10602 
10603  /* "View.MemoryView":538
10604  *
10605  * if flags & PyBUF_FORMAT:
10606  * info.format = self.view.format # <<<<<<<<<<<<<<
10607  * else:
10608  * info.format = NULL
10609  */
10610  __pyx_t_5 = __pyx_v_self->view.format;
10611  __pyx_v_info->format = __pyx_t_5;
10612 
10613  /* "View.MemoryView":537
10614  * info.suboffsets = NULL
10615  *
10616  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
10617  * info.format = self.view.format
10618  * else:
10619  */
10620  goto __pyx_L9;
10621  }
10622 
10623  /* "View.MemoryView":540
10624  * info.format = self.view.format
10625  * else:
10626  * info.format = NULL # <<<<<<<<<<<<<<
10627  *
10628  * info.buf = self.view.buf
10629  */
10630  /*else*/ {
10631  __pyx_v_info->format = NULL;
10632  }
10633  __pyx_L9:;
10634 
10635  /* "View.MemoryView":542
10636  * info.format = NULL
10637  *
10638  * info.buf = self.view.buf # <<<<<<<<<<<<<<
10639  * info.ndim = self.view.ndim
10640  * info.itemsize = self.view.itemsize
10641  */
10642  __pyx_t_6 = __pyx_v_self->view.buf;
10643  __pyx_v_info->buf = __pyx_t_6;
10644 
10645  /* "View.MemoryView":543
10646  *
10647  * info.buf = self.view.buf
10648  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
10649  * info.itemsize = self.view.itemsize
10650  * info.len = self.view.len
10651  */
10652  __pyx_t_7 = __pyx_v_self->view.ndim;
10653  __pyx_v_info->ndim = __pyx_t_7;
10654 
10655  /* "View.MemoryView":544
10656  * info.buf = self.view.buf
10657  * info.ndim = self.view.ndim
10658  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
10659  * info.len = self.view.len
10660  * info.readonly = self.view.readonly
10661  */
10662  __pyx_t_8 = __pyx_v_self->view.itemsize;
10663  __pyx_v_info->itemsize = __pyx_t_8;
10664 
10665  /* "View.MemoryView":545
10666  * info.ndim = self.view.ndim
10667  * info.itemsize = self.view.itemsize
10668  * info.len = self.view.len # <<<<<<<<<<<<<<
10669  * info.readonly = self.view.readonly
10670  * info.obj = self
10671  */
10672  __pyx_t_8 = __pyx_v_self->view.len;
10673  __pyx_v_info->len = __pyx_t_8;
10674 
10675  /* "View.MemoryView":546
10676  * info.itemsize = self.view.itemsize
10677  * info.len = self.view.len
10678  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
10679  * info.obj = self
10680  *
10681  */
10682  __pyx_t_1 = __pyx_v_self->view.readonly;
10683  __pyx_v_info->readonly = __pyx_t_1;
10684 
10685  /* "View.MemoryView":547
10686  * info.len = self.view.len
10687  * info.readonly = self.view.readonly
10688  * info.obj = self # <<<<<<<<<<<<<<
10689  *
10690  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
10691  */
10692  __Pyx_INCREF(((PyObject *)__pyx_v_self));
10693  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
10694  __Pyx_GOTREF(__pyx_v_info->obj);
10695  __Pyx_DECREF(__pyx_v_info->obj);
10696  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
10697 
10698  /* "View.MemoryView":518
10699  *
10700  * @cname('getbuffer')
10701  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
10702  * if flags & PyBUF_WRITABLE and self.view.readonly:
10703  * raise ValueError("Cannot create writable memory view from read-only memoryview")
10704  */
10705 
10706  /* function exit code */
10707  __pyx_r = 0;
10708  goto __pyx_L0;
10709  __pyx_L1_error:;
10710  __Pyx_XDECREF(__pyx_t_3);
10711  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10712  __pyx_r = -1;
10713  if (__pyx_v_info->obj != NULL) {
10714  __Pyx_GOTREF(__pyx_v_info->obj);
10715  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
10716  }
10717  goto __pyx_L2;
10718  __pyx_L0:;
10719  if (__pyx_v_info->obj == Py_None) {
10720  __Pyx_GOTREF(__pyx_v_info->obj);
10721  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
10722  }
10723  __pyx_L2:;
10724  __Pyx_RefNannyFinishContext();
10725  return __pyx_r;
10726 }
10727 
10728 /* "View.MemoryView":553
10729  *
10730  * @property
10731  * def T(self): # <<<<<<<<<<<<<<
10732  * cdef _memoryviewslice result = memoryview_copy(self)
10733  * transpose_memslice(&result.from_slice)
10734  */
10735 
10736 /* Python wrapper */
10737 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
10738 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
10739  PyObject *__pyx_r = 0;
10740  __Pyx_RefNannyDeclarations
10741  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10742  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10743 
10744  /* function exit code */
10745  __Pyx_RefNannyFinishContext();
10746  return __pyx_r;
10747 }
10748 
10749 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10750  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
10751  PyObject *__pyx_r = NULL;
10752  __Pyx_RefNannyDeclarations
10753  PyObject *__pyx_t_1 = NULL;
10754  int __pyx_t_2;
10755  int __pyx_lineno = 0;
10756  const char *__pyx_filename = NULL;
10757  int __pyx_clineno = 0;
10758  __Pyx_RefNannySetupContext("__get__", 0);
10759 
10760  /* "View.MemoryView":554
10761  * @property
10762  * def T(self):
10763  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
10764  * transpose_memslice(&result.from_slice)
10765  * return result
10766  */
10767  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
10768  __Pyx_GOTREF(__pyx_t_1);
10769  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 554, __pyx_L1_error)
10770  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
10771  __pyx_t_1 = 0;
10772 
10773  /* "View.MemoryView":555
10774  * def T(self):
10775  * cdef _memoryviewslice result = memoryview_copy(self)
10776  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
10777  * return result
10778  *
10779  */
10780  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 555, __pyx_L1_error)
10781 
10782  /* "View.MemoryView":556
10783  * cdef _memoryviewslice result = memoryview_copy(self)
10784  * transpose_memslice(&result.from_slice)
10785  * return result # <<<<<<<<<<<<<<
10786  *
10787  * @property
10788  */
10789  __Pyx_XDECREF(__pyx_r);
10790  __Pyx_INCREF(((PyObject *)__pyx_v_result));
10791  __pyx_r = ((PyObject *)__pyx_v_result);
10792  goto __pyx_L0;
10793 
10794  /* "View.MemoryView":553
10795  *
10796  * @property
10797  * def T(self): # <<<<<<<<<<<<<<
10798  * cdef _memoryviewslice result = memoryview_copy(self)
10799  * transpose_memslice(&result.from_slice)
10800  */
10801 
10802  /* function exit code */
10803  __pyx_L1_error:;
10804  __Pyx_XDECREF(__pyx_t_1);
10805  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10806  __pyx_r = NULL;
10807  __pyx_L0:;
10808  __Pyx_XDECREF((PyObject *)__pyx_v_result);
10809  __Pyx_XGIVEREF(__pyx_r);
10810  __Pyx_RefNannyFinishContext();
10811  return __pyx_r;
10812 }
10813 
10814 /* "View.MemoryView":559
10815  *
10816  * @property
10817  * def base(self): # <<<<<<<<<<<<<<
10818  * return self.obj
10819  *
10820  */
10821 
10822 /* Python wrapper */
10823 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
10824 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
10825  PyObject *__pyx_r = 0;
10826  __Pyx_RefNannyDeclarations
10827  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10828  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10829 
10830  /* function exit code */
10831  __Pyx_RefNannyFinishContext();
10832  return __pyx_r;
10833 }
10834 
10835 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10836  PyObject *__pyx_r = NULL;
10837  __Pyx_RefNannyDeclarations
10838  __Pyx_RefNannySetupContext("__get__", 0);
10839 
10840  /* "View.MemoryView":560
10841  * @property
10842  * def base(self):
10843  * return self.obj # <<<<<<<<<<<<<<
10844  *
10845  * @property
10846  */
10847  __Pyx_XDECREF(__pyx_r);
10848  __Pyx_INCREF(__pyx_v_self->obj);
10849  __pyx_r = __pyx_v_self->obj;
10850  goto __pyx_L0;
10851 
10852  /* "View.MemoryView":559
10853  *
10854  * @property
10855  * def base(self): # <<<<<<<<<<<<<<
10856  * return self.obj
10857  *
10858  */
10859 
10860  /* function exit code */
10861  __pyx_L0:;
10862  __Pyx_XGIVEREF(__pyx_r);
10863  __Pyx_RefNannyFinishContext();
10864  return __pyx_r;
10865 }
10866 
10867 /* "View.MemoryView":563
10868  *
10869  * @property
10870  * def shape(self): # <<<<<<<<<<<<<<
10871  * return tuple([length for length in self.view.shape[:self.view.ndim]])
10872  *
10873  */
10874 
10875 /* Python wrapper */
10876 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
10877 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
10878  PyObject *__pyx_r = 0;
10879  __Pyx_RefNannyDeclarations
10880  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10881  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10882 
10883  /* function exit code */
10884  __Pyx_RefNannyFinishContext();
10885  return __pyx_r;
10886 }
10887 
10888 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10889  Py_ssize_t __pyx_v_length;
10890  PyObject *__pyx_r = NULL;
10891  __Pyx_RefNannyDeclarations
10892  PyObject *__pyx_t_1 = NULL;
10893  Py_ssize_t *__pyx_t_2;
10894  Py_ssize_t *__pyx_t_3;
10895  Py_ssize_t *__pyx_t_4;
10896  PyObject *__pyx_t_5 = NULL;
10897  int __pyx_lineno = 0;
10898  const char *__pyx_filename = NULL;
10899  int __pyx_clineno = 0;
10900  __Pyx_RefNannySetupContext("__get__", 0);
10901 
10902  /* "View.MemoryView":564
10903  * @property
10904  * def shape(self):
10905  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
10906  *
10907  * @property
10908  */
10909  __Pyx_XDECREF(__pyx_r);
10910  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
10911  __Pyx_GOTREF(__pyx_t_1);
10912  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
10913  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
10914  __pyx_t_2 = __pyx_t_4;
10915  __pyx_v_length = (__pyx_t_2[0]);
10916  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
10917  __Pyx_GOTREF(__pyx_t_5);
10918  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 564, __pyx_L1_error)
10919  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10920  }
10921  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
10922  __Pyx_GOTREF(__pyx_t_5);
10923  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10924  __pyx_r = __pyx_t_5;
10925  __pyx_t_5 = 0;
10926  goto __pyx_L0;
10927 
10928  /* "View.MemoryView":563
10929  *
10930  * @property
10931  * def shape(self): # <<<<<<<<<<<<<<
10932  * return tuple([length for length in self.view.shape[:self.view.ndim]])
10933  *
10934  */
10935 
10936  /* function exit code */
10937  __pyx_L1_error:;
10938  __Pyx_XDECREF(__pyx_t_1);
10939  __Pyx_XDECREF(__pyx_t_5);
10940  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10941  __pyx_r = NULL;
10942  __pyx_L0:;
10943  __Pyx_XGIVEREF(__pyx_r);
10944  __Pyx_RefNannyFinishContext();
10945  return __pyx_r;
10946 }
10947 
10948 /* "View.MemoryView":567
10949  *
10950  * @property
10951  * def strides(self): # <<<<<<<<<<<<<<
10952  * if self.view.strides == NULL:
10953  *
10954  */
10955 
10956 /* Python wrapper */
10957 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
10958 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
10959  PyObject *__pyx_r = 0;
10960  __Pyx_RefNannyDeclarations
10961  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10962  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10963 
10964  /* function exit code */
10965  __Pyx_RefNannyFinishContext();
10966  return __pyx_r;
10967 }
10968 
10969 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10970  Py_ssize_t __pyx_v_stride;
10971  PyObject *__pyx_r = NULL;
10972  __Pyx_RefNannyDeclarations
10973  int __pyx_t_1;
10974  PyObject *__pyx_t_2 = NULL;
10975  Py_ssize_t *__pyx_t_3;
10976  Py_ssize_t *__pyx_t_4;
10977  Py_ssize_t *__pyx_t_5;
10978  PyObject *__pyx_t_6 = NULL;
10979  int __pyx_lineno = 0;
10980  const char *__pyx_filename = NULL;
10981  int __pyx_clineno = 0;
10982  __Pyx_RefNannySetupContext("__get__", 0);
10983 
10984  /* "View.MemoryView":568
10985  * @property
10986  * def strides(self):
10987  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
10988  *
10989  * raise ValueError("Buffer view does not expose strides")
10990  */
10991  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
10992  if (unlikely(__pyx_t_1)) {
10993 
10994  /* "View.MemoryView":570
10995  * if self.view.strides == NULL:
10996  *
10997  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
10998  *
10999  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
11000  */
11001  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
11002  __Pyx_GOTREF(__pyx_t_2);
11003  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
11004  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11005  __PYX_ERR(0, 570, __pyx_L1_error)
11006 
11007  /* "View.MemoryView":568
11008  * @property
11009  * def strides(self):
11010  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
11011  *
11012  * raise ValueError("Buffer view does not expose strides")
11013  */
11014  }
11015 
11016  /* "View.MemoryView":572
11017  * raise ValueError("Buffer view does not expose strides")
11018  *
11019  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
11020  *
11021  * @property
11022  */
11023  __Pyx_XDECREF(__pyx_r);
11024  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
11025  __Pyx_GOTREF(__pyx_t_2);
11026  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
11027  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
11028  __pyx_t_3 = __pyx_t_5;
11029  __pyx_v_stride = (__pyx_t_3[0]);
11030  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
11031  __Pyx_GOTREF(__pyx_t_6);
11032  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 572, __pyx_L1_error)
11033  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11034  }
11035  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
11036  __Pyx_GOTREF(__pyx_t_6);
11037  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11038  __pyx_r = __pyx_t_6;
11039  __pyx_t_6 = 0;
11040  goto __pyx_L0;
11041 
11042  /* "View.MemoryView":567
11043  *
11044  * @property
11045  * def strides(self): # <<<<<<<<<<<<<<
11046  * if self.view.strides == NULL:
11047  *
11048  */
11049 
11050  /* function exit code */
11051  __pyx_L1_error:;
11052  __Pyx_XDECREF(__pyx_t_2);
11053  __Pyx_XDECREF(__pyx_t_6);
11054  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11055  __pyx_r = NULL;
11056  __pyx_L0:;
11057  __Pyx_XGIVEREF(__pyx_r);
11058  __Pyx_RefNannyFinishContext();
11059  return __pyx_r;
11060 }
11061 
11062 /* "View.MemoryView":575
11063  *
11064  * @property
11065  * def suboffsets(self): # <<<<<<<<<<<<<<
11066  * if self.view.suboffsets == NULL:
11067  * return (-1,) * self.view.ndim
11068  */
11069 
11070 /* Python wrapper */
11071 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
11072 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
11073  PyObject *__pyx_r = 0;
11074  __Pyx_RefNannyDeclarations
11075  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11076  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11077 
11078  /* function exit code */
11079  __Pyx_RefNannyFinishContext();
11080  return __pyx_r;
11081 }
11082 
11083 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11084  Py_ssize_t __pyx_v_suboffset;
11085  PyObject *__pyx_r = NULL;
11086  __Pyx_RefNannyDeclarations
11087  int __pyx_t_1;
11088  PyObject *__pyx_t_2 = NULL;
11089  PyObject *__pyx_t_3 = NULL;
11090  Py_ssize_t *__pyx_t_4;
11091  Py_ssize_t *__pyx_t_5;
11092  Py_ssize_t *__pyx_t_6;
11093  int __pyx_lineno = 0;
11094  const char *__pyx_filename = NULL;
11095  int __pyx_clineno = 0;
11096  __Pyx_RefNannySetupContext("__get__", 0);
11097 
11098  /* "View.MemoryView":576
11099  * @property
11100  * def suboffsets(self):
11101  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
11102  * return (-1,) * self.view.ndim
11103  *
11104  */
11105  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
11106  if (__pyx_t_1) {
11107 
11108  /* "View.MemoryView":577
11109  * def suboffsets(self):
11110  * if self.view.suboffsets == NULL:
11111  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
11112  *
11113  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
11114  */
11115  __Pyx_XDECREF(__pyx_r);
11116  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
11117  __Pyx_GOTREF(__pyx_t_2);
11118  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__17, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
11119  __Pyx_GOTREF(__pyx_t_3);
11120  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11121  __pyx_r = __pyx_t_3;
11122  __pyx_t_3 = 0;
11123  goto __pyx_L0;
11124 
11125  /* "View.MemoryView":576
11126  * @property
11127  * def suboffsets(self):
11128  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
11129  * return (-1,) * self.view.ndim
11130  *
11131  */
11132  }
11133 
11134  /* "View.MemoryView":579
11135  * return (-1,) * self.view.ndim
11136  *
11137  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
11138  *
11139  * @property
11140  */
11141  __Pyx_XDECREF(__pyx_r);
11142  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
11143  __Pyx_GOTREF(__pyx_t_3);
11144  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
11145  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
11146  __pyx_t_4 = __pyx_t_6;
11147  __pyx_v_suboffset = (__pyx_t_4[0]);
11148  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
11149  __Pyx_GOTREF(__pyx_t_2);
11150  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 579, __pyx_L1_error)
11151  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11152  }
11153  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
11154  __Pyx_GOTREF(__pyx_t_2);
11155  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11156  __pyx_r = __pyx_t_2;
11157  __pyx_t_2 = 0;
11158  goto __pyx_L0;
11159 
11160  /* "View.MemoryView":575
11161  *
11162  * @property
11163  * def suboffsets(self): # <<<<<<<<<<<<<<
11164  * if self.view.suboffsets == NULL:
11165  * return (-1,) * self.view.ndim
11166  */
11167 
11168  /* function exit code */
11169  __pyx_L1_error:;
11170  __Pyx_XDECREF(__pyx_t_2);
11171  __Pyx_XDECREF(__pyx_t_3);
11172  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11173  __pyx_r = NULL;
11174  __pyx_L0:;
11175  __Pyx_XGIVEREF(__pyx_r);
11176  __Pyx_RefNannyFinishContext();
11177  return __pyx_r;
11178 }
11179 
11180 /* "View.MemoryView":582
11181  *
11182  * @property
11183  * def ndim(self): # <<<<<<<<<<<<<<
11184  * return self.view.ndim
11185  *
11186  */
11187 
11188 /* Python wrapper */
11189 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
11190 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
11191  PyObject *__pyx_r = 0;
11192  __Pyx_RefNannyDeclarations
11193  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11194  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11195 
11196  /* function exit code */
11197  __Pyx_RefNannyFinishContext();
11198  return __pyx_r;
11199 }
11200 
11201 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11202  PyObject *__pyx_r = NULL;
11203  __Pyx_RefNannyDeclarations
11204  PyObject *__pyx_t_1 = NULL;
11205  int __pyx_lineno = 0;
11206  const char *__pyx_filename = NULL;
11207  int __pyx_clineno = 0;
11208  __Pyx_RefNannySetupContext("__get__", 0);
11209 
11210  /* "View.MemoryView":583
11211  * @property
11212  * def ndim(self):
11213  * return self.view.ndim # <<<<<<<<<<<<<<
11214  *
11215  * @property
11216  */
11217  __Pyx_XDECREF(__pyx_r);
11218  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
11219  __Pyx_GOTREF(__pyx_t_1);
11220  __pyx_r = __pyx_t_1;
11221  __pyx_t_1 = 0;
11222  goto __pyx_L0;
11223 
11224  /* "View.MemoryView":582
11225  *
11226  * @property
11227  * def ndim(self): # <<<<<<<<<<<<<<
11228  * return self.view.ndim
11229  *
11230  */
11231 
11232  /* function exit code */
11233  __pyx_L1_error:;
11234  __Pyx_XDECREF(__pyx_t_1);
11235  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11236  __pyx_r = NULL;
11237  __pyx_L0:;
11238  __Pyx_XGIVEREF(__pyx_r);
11239  __Pyx_RefNannyFinishContext();
11240  return __pyx_r;
11241 }
11242 
11243 /* "View.MemoryView":586
11244  *
11245  * @property
11246  * def itemsize(self): # <<<<<<<<<<<<<<
11247  * return self.view.itemsize
11248  *
11249  */
11250 
11251 /* Python wrapper */
11252 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
11253 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
11254  PyObject *__pyx_r = 0;
11255  __Pyx_RefNannyDeclarations
11256  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11257  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11258 
11259  /* function exit code */
11260  __Pyx_RefNannyFinishContext();
11261  return __pyx_r;
11262 }
11263 
11264 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11265  PyObject *__pyx_r = NULL;
11266  __Pyx_RefNannyDeclarations
11267  PyObject *__pyx_t_1 = NULL;
11268  int __pyx_lineno = 0;
11269  const char *__pyx_filename = NULL;
11270  int __pyx_clineno = 0;
11271  __Pyx_RefNannySetupContext("__get__", 0);
11272 
11273  /* "View.MemoryView":587
11274  * @property
11275  * def itemsize(self):
11276  * return self.view.itemsize # <<<<<<<<<<<<<<
11277  *
11278  * @property
11279  */
11280  __Pyx_XDECREF(__pyx_r);
11281  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
11282  __Pyx_GOTREF(__pyx_t_1);
11283  __pyx_r = __pyx_t_1;
11284  __pyx_t_1 = 0;
11285  goto __pyx_L0;
11286 
11287  /* "View.MemoryView":586
11288  *
11289  * @property
11290  * def itemsize(self): # <<<<<<<<<<<<<<
11291  * return self.view.itemsize
11292  *
11293  */
11294 
11295  /* function exit code */
11296  __pyx_L1_error:;
11297  __Pyx_XDECREF(__pyx_t_1);
11298  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11299  __pyx_r = NULL;
11300  __pyx_L0:;
11301  __Pyx_XGIVEREF(__pyx_r);
11302  __Pyx_RefNannyFinishContext();
11303  return __pyx_r;
11304 }
11305 
11306 /* "View.MemoryView":590
11307  *
11308  * @property
11309  * def nbytes(self): # <<<<<<<<<<<<<<
11310  * return self.size * self.view.itemsize
11311  *
11312  */
11313 
11314 /* Python wrapper */
11315 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
11316 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
11317  PyObject *__pyx_r = 0;
11318  __Pyx_RefNannyDeclarations
11319  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11320  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11321 
11322  /* function exit code */
11323  __Pyx_RefNannyFinishContext();
11324  return __pyx_r;
11325 }
11326 
11327 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11328  PyObject *__pyx_r = NULL;
11329  __Pyx_RefNannyDeclarations
11330  PyObject *__pyx_t_1 = NULL;
11331  PyObject *__pyx_t_2 = NULL;
11332  PyObject *__pyx_t_3 = NULL;
11333  int __pyx_lineno = 0;
11334  const char *__pyx_filename = NULL;
11335  int __pyx_clineno = 0;
11336  __Pyx_RefNannySetupContext("__get__", 0);
11337 
11338  /* "View.MemoryView":591
11339  * @property
11340  * def nbytes(self):
11341  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
11342  *
11343  * @property
11344  */
11345  __Pyx_XDECREF(__pyx_r);
11346  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
11347  __Pyx_GOTREF(__pyx_t_1);
11348  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
11349  __Pyx_GOTREF(__pyx_t_2);
11350  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
11351  __Pyx_GOTREF(__pyx_t_3);
11352  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11353  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11354  __pyx_r = __pyx_t_3;
11355  __pyx_t_3 = 0;
11356  goto __pyx_L0;
11357 
11358  /* "View.MemoryView":590
11359  *
11360  * @property
11361  * def nbytes(self): # <<<<<<<<<<<<<<
11362  * return self.size * self.view.itemsize
11363  *
11364  */
11365 
11366  /* function exit code */
11367  __pyx_L1_error:;
11368  __Pyx_XDECREF(__pyx_t_1);
11369  __Pyx_XDECREF(__pyx_t_2);
11370  __Pyx_XDECREF(__pyx_t_3);
11371  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11372  __pyx_r = NULL;
11373  __pyx_L0:;
11374  __Pyx_XGIVEREF(__pyx_r);
11375  __Pyx_RefNannyFinishContext();
11376  return __pyx_r;
11377 }
11378 
11379 /* "View.MemoryView":594
11380  *
11381  * @property
11382  * def size(self): # <<<<<<<<<<<<<<
11383  * if self._size is None:
11384  * result = 1
11385  */
11386 
11387 /* Python wrapper */
11388 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
11389 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
11390  PyObject *__pyx_r = 0;
11391  __Pyx_RefNannyDeclarations
11392  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11393  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11394 
11395  /* function exit code */
11396  __Pyx_RefNannyFinishContext();
11397  return __pyx_r;
11398 }
11399 
11400 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11401  PyObject *__pyx_v_result = NULL;
11402  PyObject *__pyx_v_length = NULL;
11403  PyObject *__pyx_r = NULL;
11404  __Pyx_RefNannyDeclarations
11405  int __pyx_t_1;
11406  int __pyx_t_2;
11407  Py_ssize_t *__pyx_t_3;
11408  Py_ssize_t *__pyx_t_4;
11409  Py_ssize_t *__pyx_t_5;
11410  PyObject *__pyx_t_6 = NULL;
11411  int __pyx_lineno = 0;
11412  const char *__pyx_filename = NULL;
11413  int __pyx_clineno = 0;
11414  __Pyx_RefNannySetupContext("__get__", 0);
11415 
11416  /* "View.MemoryView":595
11417  * @property
11418  * def size(self):
11419  * if self._size is None: # <<<<<<<<<<<<<<
11420  * result = 1
11421  *
11422  */
11423  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
11424  __pyx_t_2 = (__pyx_t_1 != 0);
11425  if (__pyx_t_2) {
11426 
11427  /* "View.MemoryView":596
11428  * def size(self):
11429  * if self._size is None:
11430  * result = 1 # <<<<<<<<<<<<<<
11431  *
11432  * for length in self.view.shape[:self.view.ndim]:
11433  */
11434  __Pyx_INCREF(__pyx_int_1);
11435  __pyx_v_result = __pyx_int_1;
11436 
11437  /* "View.MemoryView":598
11438  * result = 1
11439  *
11440  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
11441  * result *= length
11442  *
11443  */
11444  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
11445  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
11446  __pyx_t_3 = __pyx_t_5;
11447  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error)
11448  __Pyx_GOTREF(__pyx_t_6);
11449  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
11450  __pyx_t_6 = 0;
11451 
11452  /* "View.MemoryView":599
11453  *
11454  * for length in self.view.shape[:self.view.ndim]:
11455  * result *= length # <<<<<<<<<<<<<<
11456  *
11457  * self._size = result
11458  */
11459  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
11460  __Pyx_GOTREF(__pyx_t_6);
11461  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
11462  __pyx_t_6 = 0;
11463  }
11464 
11465  /* "View.MemoryView":601
11466  * result *= length
11467  *
11468  * self._size = result # <<<<<<<<<<<<<<
11469  *
11470  * return self._size
11471  */
11472  __Pyx_INCREF(__pyx_v_result);
11473  __Pyx_GIVEREF(__pyx_v_result);
11474  __Pyx_GOTREF(__pyx_v_self->_size);
11475  __Pyx_DECREF(__pyx_v_self->_size);
11476  __pyx_v_self->_size = __pyx_v_result;
11477 
11478  /* "View.MemoryView":595
11479  * @property
11480  * def size(self):
11481  * if self._size is None: # <<<<<<<<<<<<<<
11482  * result = 1
11483  *
11484  */
11485  }
11486 
11487  /* "View.MemoryView":603
11488  * self._size = result
11489  *
11490  * return self._size # <<<<<<<<<<<<<<
11491  *
11492  * def __len__(self):
11493  */
11494  __Pyx_XDECREF(__pyx_r);
11495  __Pyx_INCREF(__pyx_v_self->_size);
11496  __pyx_r = __pyx_v_self->_size;
11497  goto __pyx_L0;
11498 
11499  /* "View.MemoryView":594
11500  *
11501  * @property
11502  * def size(self): # <<<<<<<<<<<<<<
11503  * if self._size is None:
11504  * result = 1
11505  */
11506 
11507  /* function exit code */
11508  __pyx_L1_error:;
11509  __Pyx_XDECREF(__pyx_t_6);
11510  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11511  __pyx_r = NULL;
11512  __pyx_L0:;
11513  __Pyx_XDECREF(__pyx_v_result);
11514  __Pyx_XDECREF(__pyx_v_length);
11515  __Pyx_XGIVEREF(__pyx_r);
11516  __Pyx_RefNannyFinishContext();
11517  return __pyx_r;
11518 }
11519 
11520 /* "View.MemoryView":605
11521  * return self._size
11522  *
11523  * def __len__(self): # <<<<<<<<<<<<<<
11524  * if self.view.ndim >= 1:
11525  * return self.view.shape[0]
11526  */
11527 
11528 /* Python wrapper */
11529 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
11530 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
11531  Py_ssize_t __pyx_r;
11532  __Pyx_RefNannyDeclarations
11533  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
11534  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11535 
11536  /* function exit code */
11537  __Pyx_RefNannyFinishContext();
11538  return __pyx_r;
11539 }
11540 
11541 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
11542  Py_ssize_t __pyx_r;
11543  __Pyx_RefNannyDeclarations
11544  int __pyx_t_1;
11545  __Pyx_RefNannySetupContext("__len__", 0);
11546 
11547  /* "View.MemoryView":606
11548  *
11549  * def __len__(self):
11550  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
11551  * return self.view.shape[0]
11552  *
11553  */
11554  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
11555  if (__pyx_t_1) {
11556 
11557  /* "View.MemoryView":607
11558  * def __len__(self):
11559  * if self.view.ndim >= 1:
11560  * return self.view.shape[0] # <<<<<<<<<<<<<<
11561  *
11562  * return 0
11563  */
11564  __pyx_r = (__pyx_v_self->view.shape[0]);
11565  goto __pyx_L0;
11566 
11567  /* "View.MemoryView":606
11568  *
11569  * def __len__(self):
11570  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
11571  * return self.view.shape[0]
11572  *
11573  */
11574  }
11575 
11576  /* "View.MemoryView":609
11577  * return self.view.shape[0]
11578  *
11579  * return 0 # <<<<<<<<<<<<<<
11580  *
11581  * def __repr__(self):
11582  */
11583  __pyx_r = 0;
11584  goto __pyx_L0;
11585 
11586  /* "View.MemoryView":605
11587  * return self._size
11588  *
11589  * def __len__(self): # <<<<<<<<<<<<<<
11590  * if self.view.ndim >= 1:
11591  * return self.view.shape[0]
11592  */
11593 
11594  /* function exit code */
11595  __pyx_L0:;
11596  __Pyx_RefNannyFinishContext();
11597  return __pyx_r;
11598 }
11599 
11600 /* "View.MemoryView":611
11601  * return 0
11602  *
11603  * def __repr__(self): # <<<<<<<<<<<<<<
11604  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
11605  * id(self))
11606  */
11607 
11608 /* Python wrapper */
11609 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
11610 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
11611  PyObject *__pyx_r = 0;
11612  __Pyx_RefNannyDeclarations
11613  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
11614  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11615 
11616  /* function exit code */
11617  __Pyx_RefNannyFinishContext();
11618  return __pyx_r;
11619 }
11620 
11621 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
11622  PyObject *__pyx_r = NULL;
11623  __Pyx_RefNannyDeclarations
11624  PyObject *__pyx_t_1 = NULL;
11625  PyObject *__pyx_t_2 = NULL;
11626  PyObject *__pyx_t_3 = NULL;
11627  int __pyx_lineno = 0;
11628  const char *__pyx_filename = NULL;
11629  int __pyx_clineno = 0;
11630  __Pyx_RefNannySetupContext("__repr__", 0);
11631 
11632  /* "View.MemoryView":612
11633  *
11634  * def __repr__(self):
11635  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
11636  * id(self))
11637  *
11638  */
11639  __Pyx_XDECREF(__pyx_r);
11640  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
11641  __Pyx_GOTREF(__pyx_t_1);
11642  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
11643  __Pyx_GOTREF(__pyx_t_2);
11644  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11645  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
11646  __Pyx_GOTREF(__pyx_t_1);
11647  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11648 
11649  /* "View.MemoryView":613
11650  * def __repr__(self):
11651  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
11652  * id(self)) # <<<<<<<<<<<<<<
11653  *
11654  * def __str__(self):
11655  */
11656  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
11657  __Pyx_GOTREF(__pyx_t_2);
11658 
11659  /* "View.MemoryView":612
11660  *
11661  * def __repr__(self):
11662  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
11663  * id(self))
11664  *
11665  */
11666  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
11667  __Pyx_GOTREF(__pyx_t_3);
11668  __Pyx_GIVEREF(__pyx_t_1);
11669  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
11670  __Pyx_GIVEREF(__pyx_t_2);
11671  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
11672  __pyx_t_1 = 0;
11673  __pyx_t_2 = 0;
11674  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
11675  __Pyx_GOTREF(__pyx_t_2);
11676  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11677  __pyx_r = __pyx_t_2;
11678  __pyx_t_2 = 0;
11679  goto __pyx_L0;
11680 
11681  /* "View.MemoryView":611
11682  * return 0
11683  *
11684  * def __repr__(self): # <<<<<<<<<<<<<<
11685  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
11686  * id(self))
11687  */
11688 
11689  /* function exit code */
11690  __pyx_L1_error:;
11691  __Pyx_XDECREF(__pyx_t_1);
11692  __Pyx_XDECREF(__pyx_t_2);
11693  __Pyx_XDECREF(__pyx_t_3);
11694  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11695  __pyx_r = NULL;
11696  __pyx_L0:;
11697  __Pyx_XGIVEREF(__pyx_r);
11698  __Pyx_RefNannyFinishContext();
11699  return __pyx_r;
11700 }
11701 
11702 /* "View.MemoryView":615
11703  * id(self))
11704  *
11705  * def __str__(self): # <<<<<<<<<<<<<<
11706  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
11707  *
11708  */
11709 
11710 /* Python wrapper */
11711 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
11712 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
11713  PyObject *__pyx_r = 0;
11714  __Pyx_RefNannyDeclarations
11715  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11716  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11717 
11718  /* function exit code */
11719  __Pyx_RefNannyFinishContext();
11720  return __pyx_r;
11721 }
11722 
11723 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
11724  PyObject *__pyx_r = NULL;
11725  __Pyx_RefNannyDeclarations
11726  PyObject *__pyx_t_1 = NULL;
11727  PyObject *__pyx_t_2 = NULL;
11728  int __pyx_lineno = 0;
11729  const char *__pyx_filename = NULL;
11730  int __pyx_clineno = 0;
11731  __Pyx_RefNannySetupContext("__str__", 0);
11732 
11733  /* "View.MemoryView":616
11734  *
11735  * def __str__(self):
11736  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
11737  *
11738  *
11739  */
11740  __Pyx_XDECREF(__pyx_r);
11741  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
11742  __Pyx_GOTREF(__pyx_t_1);
11743  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
11744  __Pyx_GOTREF(__pyx_t_2);
11745  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11746  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
11747  __Pyx_GOTREF(__pyx_t_1);
11748  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11749  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
11750  __Pyx_GOTREF(__pyx_t_2);
11751  __Pyx_GIVEREF(__pyx_t_1);
11752  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
11753  __pyx_t_1 = 0;
11754  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
11755  __Pyx_GOTREF(__pyx_t_1);
11756  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11757  __pyx_r = __pyx_t_1;
11758  __pyx_t_1 = 0;
11759  goto __pyx_L0;
11760 
11761  /* "View.MemoryView":615
11762  * id(self))
11763  *
11764  * def __str__(self): # <<<<<<<<<<<<<<
11765  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
11766  *
11767  */
11768 
11769  /* function exit code */
11770  __pyx_L1_error:;
11771  __Pyx_XDECREF(__pyx_t_1);
11772  __Pyx_XDECREF(__pyx_t_2);
11773  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11774  __pyx_r = NULL;
11775  __pyx_L0:;
11776  __Pyx_XGIVEREF(__pyx_r);
11777  __Pyx_RefNannyFinishContext();
11778  return __pyx_r;
11779 }
11780 
11781 /* "View.MemoryView":619
11782  *
11783  *
11784  * def is_c_contig(self): # <<<<<<<<<<<<<<
11785  * cdef __Pyx_memviewslice *mslice
11786  * cdef __Pyx_memviewslice tmp
11787  */
11788 
11789 /* Python wrapper */
11790 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11791 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11792  PyObject *__pyx_r = 0;
11793  __Pyx_RefNannyDeclarations
11794  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
11795  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
11796 
11797  /* function exit code */
11798  __Pyx_RefNannyFinishContext();
11799  return __pyx_r;
11800 }
11801 
11802 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
11803  __Pyx_memviewslice *__pyx_v_mslice;
11804  __Pyx_memviewslice __pyx_v_tmp;
11805  PyObject *__pyx_r = NULL;
11806  __Pyx_RefNannyDeclarations
11807  __Pyx_memviewslice *__pyx_t_1;
11808  PyObject *__pyx_t_2 = NULL;
11809  int __pyx_lineno = 0;
11810  const char *__pyx_filename = NULL;
11811  int __pyx_clineno = 0;
11812  __Pyx_RefNannySetupContext("is_c_contig", 0);
11813 
11814  /* "View.MemoryView":622
11815  * cdef __Pyx_memviewslice *mslice
11816  * cdef __Pyx_memviewslice tmp
11817  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
11818  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
11819  *
11820  */
11821  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 622, __pyx_L1_error)
11822  __pyx_v_mslice = __pyx_t_1;
11823 
11824  /* "View.MemoryView":623
11825  * cdef __Pyx_memviewslice tmp
11826  * mslice = get_slice_from_memview(self, &tmp)
11827  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
11828  *
11829  * def is_f_contig(self):
11830  */
11831  __Pyx_XDECREF(__pyx_r);
11832  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)
11833  __Pyx_GOTREF(__pyx_t_2);
11834  __pyx_r = __pyx_t_2;
11835  __pyx_t_2 = 0;
11836  goto __pyx_L0;
11837 
11838  /* "View.MemoryView":619
11839  *
11840  *
11841  * def is_c_contig(self): # <<<<<<<<<<<<<<
11842  * cdef __Pyx_memviewslice *mslice
11843  * cdef __Pyx_memviewslice tmp
11844  */
11845 
11846  /* function exit code */
11847  __pyx_L1_error:;
11848  __Pyx_XDECREF(__pyx_t_2);
11849  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
11850  __pyx_r = NULL;
11851  __pyx_L0:;
11852  __Pyx_XGIVEREF(__pyx_r);
11853  __Pyx_RefNannyFinishContext();
11854  return __pyx_r;
11855 }
11856 
11857 /* "View.MemoryView":625
11858  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
11859  *
11860  * def is_f_contig(self): # <<<<<<<<<<<<<<
11861  * cdef __Pyx_memviewslice *mslice
11862  * cdef __Pyx_memviewslice tmp
11863  */
11864 
11865 /* Python wrapper */
11866 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11867 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11868  PyObject *__pyx_r = 0;
11869  __Pyx_RefNannyDeclarations
11870  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
11871  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
11872 
11873  /* function exit code */
11874  __Pyx_RefNannyFinishContext();
11875  return __pyx_r;
11876 }
11877 
11878 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
11879  __Pyx_memviewslice *__pyx_v_mslice;
11880  __Pyx_memviewslice __pyx_v_tmp;
11881  PyObject *__pyx_r = NULL;
11882  __Pyx_RefNannyDeclarations
11883  __Pyx_memviewslice *__pyx_t_1;
11884  PyObject *__pyx_t_2 = NULL;
11885  int __pyx_lineno = 0;
11886  const char *__pyx_filename = NULL;
11887  int __pyx_clineno = 0;
11888  __Pyx_RefNannySetupContext("is_f_contig", 0);
11889 
11890  /* "View.MemoryView":628
11891  * cdef __Pyx_memviewslice *mslice
11892  * cdef __Pyx_memviewslice tmp
11893  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
11894  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
11895  *
11896  */
11897  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 628, __pyx_L1_error)
11898  __pyx_v_mslice = __pyx_t_1;
11899 
11900  /* "View.MemoryView":629
11901  * cdef __Pyx_memviewslice tmp
11902  * mslice = get_slice_from_memview(self, &tmp)
11903  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
11904  *
11905  * def copy(self):
11906  */
11907  __Pyx_XDECREF(__pyx_r);
11908  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
11909  __Pyx_GOTREF(__pyx_t_2);
11910  __pyx_r = __pyx_t_2;
11911  __pyx_t_2 = 0;
11912  goto __pyx_L0;
11913 
11914  /* "View.MemoryView":625
11915  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
11916  *
11917  * def is_f_contig(self): # <<<<<<<<<<<<<<
11918  * cdef __Pyx_memviewslice *mslice
11919  * cdef __Pyx_memviewslice tmp
11920  */
11921 
11922  /* function exit code */
11923  __pyx_L1_error:;
11924  __Pyx_XDECREF(__pyx_t_2);
11925  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
11926  __pyx_r = NULL;
11927  __pyx_L0:;
11928  __Pyx_XGIVEREF(__pyx_r);
11929  __Pyx_RefNannyFinishContext();
11930  return __pyx_r;
11931 }
11932 
11933 /* "View.MemoryView":631
11934  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
11935  *
11936  * def copy(self): # <<<<<<<<<<<<<<
11937  * cdef __Pyx_memviewslice mslice
11938  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
11939  */
11940 
11941 /* Python wrapper */
11942 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11943 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11944  PyObject *__pyx_r = 0;
11945  __Pyx_RefNannyDeclarations
11946  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
11947  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
11948 
11949  /* function exit code */
11950  __Pyx_RefNannyFinishContext();
11951  return __pyx_r;
11952 }
11953 
11954 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
11955  __Pyx_memviewslice __pyx_v_mslice;
11956  int __pyx_v_flags;
11957  PyObject *__pyx_r = NULL;
11958  __Pyx_RefNannyDeclarations
11959  __Pyx_memviewslice __pyx_t_1;
11960  PyObject *__pyx_t_2 = NULL;
11961  int __pyx_lineno = 0;
11962  const char *__pyx_filename = NULL;
11963  int __pyx_clineno = 0;
11964  __Pyx_RefNannySetupContext("copy", 0);
11965 
11966  /* "View.MemoryView":633
11967  * def copy(self):
11968  * cdef __Pyx_memviewslice mslice
11969  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
11970  *
11971  * slice_copy(self, &mslice)
11972  */
11973  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
11974 
11975  /* "View.MemoryView":635
11976  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
11977  *
11978  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
11979  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
11980  * self.view.itemsize,
11981  */
11982  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
11983 
11984  /* "View.MemoryView":636
11985  *
11986  * slice_copy(self, &mslice)
11987  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
11988  * self.view.itemsize,
11989  * flags|PyBUF_C_CONTIGUOUS,
11990  */
11991  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
11992  __pyx_v_mslice = __pyx_t_1;
11993 
11994  /* "View.MemoryView":641
11995  * self.dtype_is_object)
11996  *
11997  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
11998  *
11999  * def copy_fortran(self):
12000  */
12001  __Pyx_XDECREF(__pyx_r);
12002  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
12003  __Pyx_GOTREF(__pyx_t_2);
12004  __pyx_r = __pyx_t_2;
12005  __pyx_t_2 = 0;
12006  goto __pyx_L0;
12007 
12008  /* "View.MemoryView":631
12009  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
12010  *
12011  * def copy(self): # <<<<<<<<<<<<<<
12012  * cdef __Pyx_memviewslice mslice
12013  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
12014  */
12015 
12016  /* function exit code */
12017  __pyx_L1_error:;
12018  __Pyx_XDECREF(__pyx_t_2);
12019  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
12020  __pyx_r = NULL;
12021  __pyx_L0:;
12022  __Pyx_XGIVEREF(__pyx_r);
12023  __Pyx_RefNannyFinishContext();
12024  return __pyx_r;
12025 }
12026 
12027 /* "View.MemoryView":643
12028  * return memoryview_copy_from_slice(self, &mslice)
12029  *
12030  * def copy_fortran(self): # <<<<<<<<<<<<<<
12031  * cdef __Pyx_memviewslice src, dst
12032  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12033  */
12034 
12035 /* Python wrapper */
12036 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12037 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12038  PyObject *__pyx_r = 0;
12039  __Pyx_RefNannyDeclarations
12040  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
12041  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
12042 
12043  /* function exit code */
12044  __Pyx_RefNannyFinishContext();
12045  return __pyx_r;
12046 }
12047 
12048 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
12049  __Pyx_memviewslice __pyx_v_src;
12050  __Pyx_memviewslice __pyx_v_dst;
12051  int __pyx_v_flags;
12052  PyObject *__pyx_r = NULL;
12053  __Pyx_RefNannyDeclarations
12054  __Pyx_memviewslice __pyx_t_1;
12055  PyObject *__pyx_t_2 = NULL;
12056  int __pyx_lineno = 0;
12057  const char *__pyx_filename = NULL;
12058  int __pyx_clineno = 0;
12059  __Pyx_RefNannySetupContext("copy_fortran", 0);
12060 
12061  /* "View.MemoryView":645
12062  * def copy_fortran(self):
12063  * cdef __Pyx_memviewslice src, dst
12064  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
12065  *
12066  * slice_copy(self, &src)
12067  */
12068  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
12069 
12070  /* "View.MemoryView":647
12071  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12072  *
12073  * slice_copy(self, &src) # <<<<<<<<<<<<<<
12074  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
12075  * self.view.itemsize,
12076  */
12077  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
12078 
12079  /* "View.MemoryView":648
12080  *
12081  * slice_copy(self, &src)
12082  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
12083  * self.view.itemsize,
12084  * flags|PyBUF_F_CONTIGUOUS,
12085  */
12086  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error)
12087  __pyx_v_dst = __pyx_t_1;
12088 
12089  /* "View.MemoryView":653
12090  * self.dtype_is_object)
12091  *
12092  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
12093  *
12094  *
12095  */
12096  __Pyx_XDECREF(__pyx_r);
12097  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
12098  __Pyx_GOTREF(__pyx_t_2);
12099  __pyx_r = __pyx_t_2;
12100  __pyx_t_2 = 0;
12101  goto __pyx_L0;
12102 
12103  /* "View.MemoryView":643
12104  * return memoryview_copy_from_slice(self, &mslice)
12105  *
12106  * def copy_fortran(self): # <<<<<<<<<<<<<<
12107  * cdef __Pyx_memviewslice src, dst
12108  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12109  */
12110 
12111  /* function exit code */
12112  __pyx_L1_error:;
12113  __Pyx_XDECREF(__pyx_t_2);
12114  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
12115  __pyx_r = NULL;
12116  __pyx_L0:;
12117  __Pyx_XGIVEREF(__pyx_r);
12118  __Pyx_RefNannyFinishContext();
12119  return __pyx_r;
12120 }
12121 
12122 /* "(tree fragment)":1
12123  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12124  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12125  * def __setstate_cython__(self, __pyx_state):
12126  */
12127 
12128 /* Python wrapper */
12129 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12130 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12131  PyObject *__pyx_r = 0;
12132  __Pyx_RefNannyDeclarations
12133  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
12134  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12135 
12136  /* function exit code */
12137  __Pyx_RefNannyFinishContext();
12138  return __pyx_r;
12139 }
12140 
12141 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
12142  PyObject *__pyx_r = NULL;
12143  __Pyx_RefNannyDeclarations
12144  PyObject *__pyx_t_1 = NULL;
12145  int __pyx_lineno = 0;
12146  const char *__pyx_filename = NULL;
12147  int __pyx_clineno = 0;
12148  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
12149 
12150  /* "(tree fragment)":2
12151  * def __reduce_cython__(self):
12152  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
12153  * def __setstate_cython__(self, __pyx_state):
12154  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12155  */
12156  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
12157  __Pyx_GOTREF(__pyx_t_1);
12158  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12159  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12160  __PYX_ERR(0, 2, __pyx_L1_error)
12161 
12162  /* "(tree fragment)":1
12163  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12164  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12165  * def __setstate_cython__(self, __pyx_state):
12166  */
12167 
12168  /* function exit code */
12169  __pyx_L1_error:;
12170  __Pyx_XDECREF(__pyx_t_1);
12171  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12172  __pyx_r = NULL;
12173  __Pyx_XGIVEREF(__pyx_r);
12174  __Pyx_RefNannyFinishContext();
12175  return __pyx_r;
12176 }
12177 
12178 /* "(tree fragment)":3
12179  * def __reduce_cython__(self):
12180  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12181  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
12182  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12183  */
12184 
12185 /* Python wrapper */
12186 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
12187 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
12188  PyObject *__pyx_r = 0;
12189  __Pyx_RefNannyDeclarations
12190  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
12191  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
12192 
12193  /* function exit code */
12194  __Pyx_RefNannyFinishContext();
12195  return __pyx_r;
12196 }
12197 
12198 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) {
12199  PyObject *__pyx_r = NULL;
12200  __Pyx_RefNannyDeclarations
12201  PyObject *__pyx_t_1 = NULL;
12202  int __pyx_lineno = 0;
12203  const char *__pyx_filename = NULL;
12204  int __pyx_clineno = 0;
12205  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
12206 
12207  /* "(tree fragment)":4
12208  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12209  * def __setstate_cython__(self, __pyx_state):
12210  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
12211  */
12212  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
12213  __Pyx_GOTREF(__pyx_t_1);
12214  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12215  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12216  __PYX_ERR(0, 4, __pyx_L1_error)
12217 
12218  /* "(tree fragment)":3
12219  * def __reduce_cython__(self):
12220  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12221  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
12222  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
12223  */
12224 
12225  /* function exit code */
12226  __pyx_L1_error:;
12227  __Pyx_XDECREF(__pyx_t_1);
12228  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12229  __pyx_r = NULL;
12230  __Pyx_XGIVEREF(__pyx_r);
12231  __Pyx_RefNannyFinishContext();
12232  return __pyx_r;
12233 }
12234 
12235 /* "View.MemoryView":657
12236  *
12237  * @cname('__pyx_memoryview_new')
12238  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
12239  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12240  * result.typeinfo = typeinfo
12241  */
12242 
12243 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
12244  struct __pyx_memoryview_obj *__pyx_v_result = 0;
12245  PyObject *__pyx_r = NULL;
12246  __Pyx_RefNannyDeclarations
12247  PyObject *__pyx_t_1 = NULL;
12248  PyObject *__pyx_t_2 = NULL;
12249  PyObject *__pyx_t_3 = NULL;
12250  int __pyx_lineno = 0;
12251  const char *__pyx_filename = NULL;
12252  int __pyx_clineno = 0;
12253  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
12254 
12255  /* "View.MemoryView":658
12256  * @cname('__pyx_memoryview_new')
12257  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
12258  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
12259  * result.typeinfo = typeinfo
12260  * return result
12261  */
12262  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
12263  __Pyx_GOTREF(__pyx_t_1);
12264  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12265  __Pyx_GOTREF(__pyx_t_2);
12266  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
12267  __Pyx_GOTREF(__pyx_t_3);
12268  __Pyx_INCREF(__pyx_v_o);
12269  __Pyx_GIVEREF(__pyx_v_o);
12270  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
12271  __Pyx_GIVEREF(__pyx_t_1);
12272  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
12273  __Pyx_GIVEREF(__pyx_t_2);
12274  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
12275  __pyx_t_1 = 0;
12276  __pyx_t_2 = 0;
12277  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12278  __Pyx_GOTREF(__pyx_t_2);
12279  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12280  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
12281  __pyx_t_2 = 0;
12282 
12283  /* "View.MemoryView":659
12284  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
12285  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12286  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
12287  * return result
12288  *
12289  */
12290  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
12291 
12292  /* "View.MemoryView":660
12293  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12294  * result.typeinfo = typeinfo
12295  * return result # <<<<<<<<<<<<<<
12296  *
12297  * @cname('__pyx_memoryview_check')
12298  */
12299  __Pyx_XDECREF(__pyx_r);
12300  __Pyx_INCREF(((PyObject *)__pyx_v_result));
12301  __pyx_r = ((PyObject *)__pyx_v_result);
12302  goto __pyx_L0;
12303 
12304  /* "View.MemoryView":657
12305  *
12306  * @cname('__pyx_memoryview_new')
12307  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
12308  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12309  * result.typeinfo = typeinfo
12310  */
12311 
12312  /* function exit code */
12313  __pyx_L1_error:;
12314  __Pyx_XDECREF(__pyx_t_1);
12315  __Pyx_XDECREF(__pyx_t_2);
12316  __Pyx_XDECREF(__pyx_t_3);
12317  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
12318  __pyx_r = 0;
12319  __pyx_L0:;
12320  __Pyx_XDECREF((PyObject *)__pyx_v_result);
12321  __Pyx_XGIVEREF(__pyx_r);
12322  __Pyx_RefNannyFinishContext();
12323  return __pyx_r;
12324 }
12325 
12326 /* "View.MemoryView":663
12327  *
12328  * @cname('__pyx_memoryview_check')
12329  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
12330  * return isinstance(o, memoryview)
12331  *
12332  */
12333 
12334 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
12335  int __pyx_r;
12336  __Pyx_RefNannyDeclarations
12337  int __pyx_t_1;
12338  __Pyx_RefNannySetupContext("memoryview_check", 0);
12339 
12340  /* "View.MemoryView":664
12341  * @cname('__pyx_memoryview_check')
12342  * cdef inline bint memoryview_check(object o):
12343  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
12344  *
12345  * cdef tuple _unellipsify(object index, int ndim):
12346  */
12347  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
12348  __pyx_r = __pyx_t_1;
12349  goto __pyx_L0;
12350 
12351  /* "View.MemoryView":663
12352  *
12353  * @cname('__pyx_memoryview_check')
12354  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
12355  * return isinstance(o, memoryview)
12356  *
12357  */
12358 
12359  /* function exit code */
12360  __pyx_L0:;
12361  __Pyx_RefNannyFinishContext();
12362  return __pyx_r;
12363 }
12364 
12365 /* "View.MemoryView":666
12366  * return isinstance(o, memoryview)
12367  *
12368  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
12369  * """
12370  * Replace all ellipses with full slices and fill incomplete indices with
12371  */
12372 
12373 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
12374  PyObject *__pyx_v_tup = NULL;
12375  PyObject *__pyx_v_result = NULL;
12376  int __pyx_v_have_slices;
12377  int __pyx_v_seen_ellipsis;
12378  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
12379  PyObject *__pyx_v_item = NULL;
12380  Py_ssize_t __pyx_v_nslices;
12381  PyObject *__pyx_r = NULL;
12382  __Pyx_RefNannyDeclarations
12383  int __pyx_t_1;
12384  int __pyx_t_2;
12385  PyObject *__pyx_t_3 = NULL;
12386  PyObject *__pyx_t_4 = NULL;
12387  Py_ssize_t __pyx_t_5;
12388  PyObject *(*__pyx_t_6)(PyObject *);
12389  PyObject *__pyx_t_7 = NULL;
12390  Py_ssize_t __pyx_t_8;
12391  int __pyx_t_9;
12392  int __pyx_t_10;
12393  PyObject *__pyx_t_11 = NULL;
12394  int __pyx_lineno = 0;
12395  const char *__pyx_filename = NULL;
12396  int __pyx_clineno = 0;
12397  __Pyx_RefNannySetupContext("_unellipsify", 0);
12398 
12399  /* "View.MemoryView":671
12400  * full slices.
12401  * """
12402  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
12403  * tup = (index,)
12404  * else:
12405  */
12406  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
12407  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12408  if (__pyx_t_2) {
12409 
12410  /* "View.MemoryView":672
12411  * """
12412  * if not isinstance(index, tuple):
12413  * tup = (index,) # <<<<<<<<<<<<<<
12414  * else:
12415  * tup = index
12416  */
12417  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
12418  __Pyx_GOTREF(__pyx_t_3);
12419  __Pyx_INCREF(__pyx_v_index);
12420  __Pyx_GIVEREF(__pyx_v_index);
12421  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
12422  __pyx_v_tup = __pyx_t_3;
12423  __pyx_t_3 = 0;
12424 
12425  /* "View.MemoryView":671
12426  * full slices.
12427  * """
12428  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
12429  * tup = (index,)
12430  * else:
12431  */
12432  goto __pyx_L3;
12433  }
12434 
12435  /* "View.MemoryView":674
12436  * tup = (index,)
12437  * else:
12438  * tup = index # <<<<<<<<<<<<<<
12439  *
12440  * result = []
12441  */
12442  /*else*/ {
12443  __Pyx_INCREF(__pyx_v_index);
12444  __pyx_v_tup = __pyx_v_index;
12445  }
12446  __pyx_L3:;
12447 
12448  /* "View.MemoryView":676
12449  * tup = index
12450  *
12451  * result = [] # <<<<<<<<<<<<<<
12452  * have_slices = False
12453  * seen_ellipsis = False
12454  */
12455  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
12456  __Pyx_GOTREF(__pyx_t_3);
12457  __pyx_v_result = ((PyObject*)__pyx_t_3);
12458  __pyx_t_3 = 0;
12459 
12460  /* "View.MemoryView":677
12461  *
12462  * result = []
12463  * have_slices = False # <<<<<<<<<<<<<<
12464  * seen_ellipsis = False
12465  * for idx, item in enumerate(tup):
12466  */
12467  __pyx_v_have_slices = 0;
12468 
12469  /* "View.MemoryView":678
12470  * result = []
12471  * have_slices = False
12472  * seen_ellipsis = False # <<<<<<<<<<<<<<
12473  * for idx, item in enumerate(tup):
12474  * if item is Ellipsis:
12475  */
12476  __pyx_v_seen_ellipsis = 0;
12477 
12478  /* "View.MemoryView":679
12479  * have_slices = False
12480  * seen_ellipsis = False
12481  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
12482  * if item is Ellipsis:
12483  * if not seen_ellipsis:
12484  */
12485  __Pyx_INCREF(__pyx_int_0);
12486  __pyx_t_3 = __pyx_int_0;
12487  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
12488  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
12489  __pyx_t_6 = NULL;
12490  } else {
12491  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
12492  __Pyx_GOTREF(__pyx_t_4);
12493  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
12494  }
12495  for (;;) {
12496  if (likely(!__pyx_t_6)) {
12497  if (likely(PyList_CheckExact(__pyx_t_4))) {
12498  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
12499  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12500  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
12501  #else
12502  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
12503  __Pyx_GOTREF(__pyx_t_7);
12504  #endif
12505  } else {
12506  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12507  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12508  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
12509  #else
12510  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
12511  __Pyx_GOTREF(__pyx_t_7);
12512  #endif
12513  }
12514  } else {
12515  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
12516  if (unlikely(!__pyx_t_7)) {
12517  PyObject* exc_type = PyErr_Occurred();
12518  if (exc_type) {
12519  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12520  else __PYX_ERR(0, 679, __pyx_L1_error)
12521  }
12522  break;
12523  }
12524  __Pyx_GOTREF(__pyx_t_7);
12525  }
12526  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
12527  __pyx_t_7 = 0;
12528  __Pyx_INCREF(__pyx_t_3);
12529  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
12530  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
12531  __Pyx_GOTREF(__pyx_t_7);
12532  __Pyx_DECREF(__pyx_t_3);
12533  __pyx_t_3 = __pyx_t_7;
12534  __pyx_t_7 = 0;
12535 
12536  /* "View.MemoryView":680
12537  * seen_ellipsis = False
12538  * for idx, item in enumerate(tup):
12539  * if item is Ellipsis: # <<<<<<<<<<<<<<
12540  * if not seen_ellipsis:
12541  * result.extend([slice(None)] * (ndim - len(tup) + 1))
12542  */
12543  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
12544  __pyx_t_1 = (__pyx_t_2 != 0);
12545  if (__pyx_t_1) {
12546 
12547  /* "View.MemoryView":681
12548  * for idx, item in enumerate(tup):
12549  * if item is Ellipsis:
12550  * if not seen_ellipsis: # <<<<<<<<<<<<<<
12551  * result.extend([slice(None)] * (ndim - len(tup) + 1))
12552  * seen_ellipsis = True
12553  */
12554  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
12555  if (__pyx_t_1) {
12556 
12557  /* "View.MemoryView":682
12558  * if item is Ellipsis:
12559  * if not seen_ellipsis:
12560  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
12561  * seen_ellipsis = True
12562  * else:
12563  */
12564  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
12565  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
12566  __Pyx_GOTREF(__pyx_t_7);
12567  { Py_ssize_t __pyx_temp;
12568  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
12569  __Pyx_INCREF(__pyx_slice_);
12570  __Pyx_GIVEREF(__pyx_slice_);
12571  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice_);
12572  }
12573  }
12574  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
12575  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12576 
12577  /* "View.MemoryView":683
12578  * if not seen_ellipsis:
12579  * result.extend([slice(None)] * (ndim - len(tup) + 1))
12580  * seen_ellipsis = True # <<<<<<<<<<<<<<
12581  * else:
12582  * result.append(slice(None))
12583  */
12584  __pyx_v_seen_ellipsis = 1;
12585 
12586  /* "View.MemoryView":681
12587  * for idx, item in enumerate(tup):
12588  * if item is Ellipsis:
12589  * if not seen_ellipsis: # <<<<<<<<<<<<<<
12590  * result.extend([slice(None)] * (ndim - len(tup) + 1))
12591  * seen_ellipsis = True
12592  */
12593  goto __pyx_L7;
12594  }
12595 
12596  /* "View.MemoryView":685
12597  * seen_ellipsis = True
12598  * else:
12599  * result.append(slice(None)) # <<<<<<<<<<<<<<
12600  * have_slices = True
12601  * else:
12602  */
12603  /*else*/ {
12604  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice_); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)
12605  }
12606  __pyx_L7:;
12607 
12608  /* "View.MemoryView":686
12609  * else:
12610  * result.append(slice(None))
12611  * have_slices = True # <<<<<<<<<<<<<<
12612  * else:
12613  * if not isinstance(item, slice) and not PyIndex_Check(item):
12614  */
12615  __pyx_v_have_slices = 1;
12616 
12617  /* "View.MemoryView":680
12618  * seen_ellipsis = False
12619  * for idx, item in enumerate(tup):
12620  * if item is Ellipsis: # <<<<<<<<<<<<<<
12621  * if not seen_ellipsis:
12622  * result.extend([slice(None)] * (ndim - len(tup) + 1))
12623  */
12624  goto __pyx_L6;
12625  }
12626 
12627  /* "View.MemoryView":688
12628  * have_slices = True
12629  * else:
12630  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
12631  * raise TypeError("Cannot index with type '%s'" % type(item))
12632  *
12633  */
12634  /*else*/ {
12635  __pyx_t_2 = PySlice_Check(__pyx_v_item);
12636  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
12637  if (__pyx_t_10) {
12638  } else {
12639  __pyx_t_1 = __pyx_t_10;
12640  goto __pyx_L9_bool_binop_done;
12641  }
12642  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
12643  __pyx_t_1 = __pyx_t_10;
12644  __pyx_L9_bool_binop_done:;
12645  if (unlikely(__pyx_t_1)) {
12646 
12647  /* "View.MemoryView":689
12648  * else:
12649  * if not isinstance(item, slice) and not PyIndex_Check(item):
12650  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
12651  *
12652  * have_slices = have_slices or isinstance(item, slice)
12653  */
12654  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error)
12655  __Pyx_GOTREF(__pyx_t_7);
12656  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 689, __pyx_L1_error)
12657  __Pyx_GOTREF(__pyx_t_11);
12658  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12659  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12660  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12661  __PYX_ERR(0, 689, __pyx_L1_error)
12662 
12663  /* "View.MemoryView":688
12664  * have_slices = True
12665  * else:
12666  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
12667  * raise TypeError("Cannot index with type '%s'" % type(item))
12668  *
12669  */
12670  }
12671 
12672  /* "View.MemoryView":691
12673  * raise TypeError("Cannot index with type '%s'" % type(item))
12674  *
12675  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
12676  * result.append(item)
12677  *
12678  */
12679  __pyx_t_10 = (__pyx_v_have_slices != 0);
12680  if (!__pyx_t_10) {
12681  } else {
12682  __pyx_t_1 = __pyx_t_10;
12683  goto __pyx_L11_bool_binop_done;
12684  }
12685  __pyx_t_10 = PySlice_Check(__pyx_v_item);
12686  __pyx_t_2 = (__pyx_t_10 != 0);
12687  __pyx_t_1 = __pyx_t_2;
12688  __pyx_L11_bool_binop_done:;
12689  __pyx_v_have_slices = __pyx_t_1;
12690 
12691  /* "View.MemoryView":692
12692  *
12693  * have_slices = have_slices or isinstance(item, slice)
12694  * result.append(item) # <<<<<<<<<<<<<<
12695  *
12696  * nslices = ndim - len(result)
12697  */
12698  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
12699  }
12700  __pyx_L6:;
12701 
12702  /* "View.MemoryView":679
12703  * have_slices = False
12704  * seen_ellipsis = False
12705  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
12706  * if item is Ellipsis:
12707  * if not seen_ellipsis:
12708  */
12709  }
12710  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12711  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12712 
12713  /* "View.MemoryView":694
12714  * result.append(item)
12715  *
12716  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
12717  * if nslices:
12718  * result.extend([slice(None)] * nslices)
12719  */
12720  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 694, __pyx_L1_error)
12721  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
12722 
12723  /* "View.MemoryView":695
12724  *
12725  * nslices = ndim - len(result)
12726  * if nslices: # <<<<<<<<<<<<<<
12727  * result.extend([slice(None)] * nslices)
12728  *
12729  */
12730  __pyx_t_1 = (__pyx_v_nslices != 0);
12731  if (__pyx_t_1) {
12732 
12733  /* "View.MemoryView":696
12734  * nslices = ndim - len(result)
12735  * if nslices:
12736  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
12737  *
12738  * return have_slices or nslices, tuple(result)
12739  */
12740  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
12741  __Pyx_GOTREF(__pyx_t_3);
12742  { Py_ssize_t __pyx_temp;
12743  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
12744  __Pyx_INCREF(__pyx_slice_);
12745  __Pyx_GIVEREF(__pyx_slice_);
12746  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice_);
12747  }
12748  }
12749  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error)
12750  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12751 
12752  /* "View.MemoryView":695
12753  *
12754  * nslices = ndim - len(result)
12755  * if nslices: # <<<<<<<<<<<<<<
12756  * result.extend([slice(None)] * nslices)
12757  *
12758  */
12759  }
12760 
12761  /* "View.MemoryView":698
12762  * result.extend([slice(None)] * nslices)
12763  *
12764  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
12765  *
12766  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
12767  */
12768  __Pyx_XDECREF(__pyx_r);
12769  if (!__pyx_v_have_slices) {
12770  } else {
12771  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
12772  __Pyx_GOTREF(__pyx_t_4);
12773  __pyx_t_3 = __pyx_t_4;
12774  __pyx_t_4 = 0;
12775  goto __pyx_L14_bool_binop_done;
12776  }
12777  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
12778  __Pyx_GOTREF(__pyx_t_4);
12779  __pyx_t_3 = __pyx_t_4;
12780  __pyx_t_4 = 0;
12781  __pyx_L14_bool_binop_done:;
12782  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
12783  __Pyx_GOTREF(__pyx_t_4);
12784  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 698, __pyx_L1_error)
12785  __Pyx_GOTREF(__pyx_t_11);
12786  __Pyx_GIVEREF(__pyx_t_3);
12787  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
12788  __Pyx_GIVEREF(__pyx_t_4);
12789  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
12790  __pyx_t_3 = 0;
12791  __pyx_t_4 = 0;
12792  __pyx_r = ((PyObject*)__pyx_t_11);
12793  __pyx_t_11 = 0;
12794  goto __pyx_L0;
12795 
12796  /* "View.MemoryView":666
12797  * return isinstance(o, memoryview)
12798  *
12799  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
12800  * """
12801  * Replace all ellipses with full slices and fill incomplete indices with
12802  */
12803 
12804  /* function exit code */
12805  __pyx_L1_error:;
12806  __Pyx_XDECREF(__pyx_t_3);
12807  __Pyx_XDECREF(__pyx_t_4);
12808  __Pyx_XDECREF(__pyx_t_7);
12809  __Pyx_XDECREF(__pyx_t_11);
12810  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
12811  __pyx_r = 0;
12812  __pyx_L0:;
12813  __Pyx_XDECREF(__pyx_v_tup);
12814  __Pyx_XDECREF(__pyx_v_result);
12815  __Pyx_XDECREF(__pyx_v_idx);
12816  __Pyx_XDECREF(__pyx_v_item);
12817  __Pyx_XGIVEREF(__pyx_r);
12818  __Pyx_RefNannyFinishContext();
12819  return __pyx_r;
12820 }
12821 
12822 /* "View.MemoryView":700
12823  * return have_slices or nslices, tuple(result)
12824  *
12825  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
12826  * for suboffset in suboffsets[:ndim]:
12827  * if suboffset >= 0:
12828  */
12829 
12830 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
12831  Py_ssize_t __pyx_v_suboffset;
12832  PyObject *__pyx_r = NULL;
12833  __Pyx_RefNannyDeclarations
12834  Py_ssize_t *__pyx_t_1;
12835  Py_ssize_t *__pyx_t_2;
12836  Py_ssize_t *__pyx_t_3;
12837  int __pyx_t_4;
12838  PyObject *__pyx_t_5 = NULL;
12839  int __pyx_lineno = 0;
12840  const char *__pyx_filename = NULL;
12841  int __pyx_clineno = 0;
12842  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
12843 
12844  /* "View.MemoryView":701
12845  *
12846  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
12847  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
12848  * if suboffset >= 0:
12849  * raise ValueError("Indirect dimensions not supported")
12850  */
12851  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
12852  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
12853  __pyx_t_1 = __pyx_t_3;
12854  __pyx_v_suboffset = (__pyx_t_1[0]);
12855 
12856  /* "View.MemoryView":702
12857  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
12858  * for suboffset in suboffsets[:ndim]:
12859  * if suboffset >= 0: # <<<<<<<<<<<<<<
12860  * raise ValueError("Indirect dimensions not supported")
12861  *
12862  */
12863  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
12864  if (unlikely(__pyx_t_4)) {
12865 
12866  /* "View.MemoryView":703
12867  * for suboffset in suboffsets[:ndim]:
12868  * if suboffset >= 0:
12869  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
12870  *
12871  *
12872  */
12873  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
12874  __Pyx_GOTREF(__pyx_t_5);
12875  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
12876  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12877  __PYX_ERR(0, 703, __pyx_L1_error)
12878 
12879  /* "View.MemoryView":702
12880  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
12881  * for suboffset in suboffsets[:ndim]:
12882  * if suboffset >= 0: # <<<<<<<<<<<<<<
12883  * raise ValueError("Indirect dimensions not supported")
12884  *
12885  */
12886  }
12887  }
12888 
12889  /* "View.MemoryView":700
12890  * return have_slices or nslices, tuple(result)
12891  *
12892  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
12893  * for suboffset in suboffsets[:ndim]:
12894  * if suboffset >= 0:
12895  */
12896 
12897  /* function exit code */
12898  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12899  goto __pyx_L0;
12900  __pyx_L1_error:;
12901  __Pyx_XDECREF(__pyx_t_5);
12902  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
12903  __pyx_r = 0;
12904  __pyx_L0:;
12905  __Pyx_XGIVEREF(__pyx_r);
12906  __Pyx_RefNannyFinishContext();
12907  return __pyx_r;
12908 }
12909 
12910 /* "View.MemoryView":710
12911  *
12912  * @cname('__pyx_memview_slice')
12913  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
12914  * cdef int new_ndim = 0, suboffset_dim = -1, dim
12915  * cdef bint negative_step
12916  */
12917 
12918 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
12919  int __pyx_v_new_ndim;
12920  int __pyx_v_suboffset_dim;
12921  int __pyx_v_dim;
12922  __Pyx_memviewslice __pyx_v_src;
12923  __Pyx_memviewslice __pyx_v_dst;
12924  __Pyx_memviewslice *__pyx_v_p_src;
12925  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
12926  __Pyx_memviewslice *__pyx_v_p_dst;
12927  int *__pyx_v_p_suboffset_dim;
12928  Py_ssize_t __pyx_v_start;
12929  Py_ssize_t __pyx_v_stop;
12930  Py_ssize_t __pyx_v_step;
12931  int __pyx_v_have_start;
12932  int __pyx_v_have_stop;
12933  int __pyx_v_have_step;
12934  PyObject *__pyx_v_index = NULL;
12935  struct __pyx_memoryview_obj *__pyx_r = NULL;
12936  __Pyx_RefNannyDeclarations
12937  int __pyx_t_1;
12938  int __pyx_t_2;
12939  PyObject *__pyx_t_3 = NULL;
12940  struct __pyx_memoryview_obj *__pyx_t_4;
12941  char *__pyx_t_5;
12942  int __pyx_t_6;
12943  Py_ssize_t __pyx_t_7;
12944  PyObject *(*__pyx_t_8)(PyObject *);
12945  PyObject *__pyx_t_9 = NULL;
12946  Py_ssize_t __pyx_t_10;
12947  int __pyx_t_11;
12948  Py_ssize_t __pyx_t_12;
12949  int __pyx_lineno = 0;
12950  const char *__pyx_filename = NULL;
12951  int __pyx_clineno = 0;
12952  __Pyx_RefNannySetupContext("memview_slice", 0);
12953 
12954  /* "View.MemoryView":711
12955  * @cname('__pyx_memview_slice')
12956  * cdef memoryview memview_slice(memoryview memview, object indices):
12957  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
12958  * cdef bint negative_step
12959  * cdef __Pyx_memviewslice src, dst
12960  */
12961  __pyx_v_new_ndim = 0;
12962  __pyx_v_suboffset_dim = -1;
12963 
12964  /* "View.MemoryView":718
12965  *
12966  *
12967  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
12968  *
12969  * cdef _memoryviewslice memviewsliceobj
12970  */
12971  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
12972 
12973  /* "View.MemoryView":722
12974  * cdef _memoryviewslice memviewsliceobj
12975  *
12976  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
12977  *
12978  * if isinstance(memview, _memoryviewslice):
12979  */
12980  #ifndef CYTHON_WITHOUT_ASSERTIONS
12981  if (unlikely(!Py_OptimizeFlag)) {
12982  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
12983  PyErr_SetNone(PyExc_AssertionError);
12984  __PYX_ERR(0, 722, __pyx_L1_error)
12985  }
12986  }
12987  #endif
12988 
12989  /* "View.MemoryView":724
12990  * assert memview.view.ndim > 0
12991  *
12992  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
12993  * memviewsliceobj = memview
12994  * p_src = &memviewsliceobj.from_slice
12995  */
12996  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
12997  __pyx_t_2 = (__pyx_t_1 != 0);
12998  if (__pyx_t_2) {
12999 
13000  /* "View.MemoryView":725
13001  *
13002  * if isinstance(memview, _memoryviewslice):
13003  * memviewsliceobj = memview # <<<<<<<<<<<<<<
13004  * p_src = &memviewsliceobj.from_slice
13005  * else:
13006  */
13007  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 725, __pyx_L1_error)
13008  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
13009  __Pyx_INCREF(__pyx_t_3);
13010  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
13011  __pyx_t_3 = 0;
13012 
13013  /* "View.MemoryView":726
13014  * if isinstance(memview, _memoryviewslice):
13015  * memviewsliceobj = memview
13016  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
13017  * else:
13018  * slice_copy(memview, &src)
13019  */
13020  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
13021 
13022  /* "View.MemoryView":724
13023  * assert memview.view.ndim > 0
13024  *
13025  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
13026  * memviewsliceobj = memview
13027  * p_src = &memviewsliceobj.from_slice
13028  */
13029  goto __pyx_L3;
13030  }
13031 
13032  /* "View.MemoryView":728
13033  * p_src = &memviewsliceobj.from_slice
13034  * else:
13035  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
13036  * p_src = &src
13037  *
13038  */
13039  /*else*/ {
13040  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
13041 
13042  /* "View.MemoryView":729
13043  * else:
13044  * slice_copy(memview, &src)
13045  * p_src = &src # <<<<<<<<<<<<<<
13046  *
13047  *
13048  */
13049  __pyx_v_p_src = (&__pyx_v_src);
13050  }
13051  __pyx_L3:;
13052 
13053  /* "View.MemoryView":735
13054  *
13055  *
13056  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
13057  * dst.data = p_src.data
13058  *
13059  */
13060  __pyx_t_4 = __pyx_v_p_src->memview;
13061  __pyx_v_dst.memview = __pyx_t_4;
13062 
13063  /* "View.MemoryView":736
13064  *
13065  * dst.memview = p_src.memview
13066  * dst.data = p_src.data # <<<<<<<<<<<<<<
13067  *
13068  *
13069  */
13070  __pyx_t_5 = __pyx_v_p_src->data;
13071  __pyx_v_dst.data = __pyx_t_5;
13072 
13073  /* "View.MemoryView":741
13074  *
13075  *
13076  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
13077  * cdef int *p_suboffset_dim = &suboffset_dim
13078  * cdef Py_ssize_t start, stop, step
13079  */
13080  __pyx_v_p_dst = (&__pyx_v_dst);
13081 
13082  /* "View.MemoryView":742
13083  *
13084  * cdef __Pyx_memviewslice *p_dst = &dst
13085  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
13086  * cdef Py_ssize_t start, stop, step
13087  * cdef bint have_start, have_stop, have_step
13088  */
13089  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
13090 
13091  /* "View.MemoryView":746
13092  * cdef bint have_start, have_stop, have_step
13093  *
13094  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
13095  * if PyIndex_Check(index):
13096  * slice_memviewslice(
13097  */
13098  __pyx_t_6 = 0;
13099  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
13100  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
13101  __pyx_t_8 = NULL;
13102  } else {
13103  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
13104  __Pyx_GOTREF(__pyx_t_3);
13105  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
13106  }
13107  for (;;) {
13108  if (likely(!__pyx_t_8)) {
13109  if (likely(PyList_CheckExact(__pyx_t_3))) {
13110  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
13111  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13112  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
13113  #else
13114  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
13115  __Pyx_GOTREF(__pyx_t_9);
13116  #endif
13117  } else {
13118  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
13119  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13120  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
13121  #else
13122  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
13123  __Pyx_GOTREF(__pyx_t_9);
13124  #endif
13125  }
13126  } else {
13127  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
13128  if (unlikely(!__pyx_t_9)) {
13129  PyObject* exc_type = PyErr_Occurred();
13130  if (exc_type) {
13131  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13132  else __PYX_ERR(0, 746, __pyx_L1_error)
13133  }
13134  break;
13135  }
13136  __Pyx_GOTREF(__pyx_t_9);
13137  }
13138  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
13139  __pyx_t_9 = 0;
13140  __pyx_v_dim = __pyx_t_6;
13141  __pyx_t_6 = (__pyx_t_6 + 1);
13142 
13143  /* "View.MemoryView":747
13144  *
13145  * for dim, index in enumerate(indices):
13146  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
13147  * slice_memviewslice(
13148  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13149  */
13150  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
13151  if (__pyx_t_2) {
13152 
13153  /* "View.MemoryView":751
13154  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13155  * dim, new_ndim, p_suboffset_dim,
13156  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
13157  * 0, 0, 0, # have_{start,stop,step}
13158  * False)
13159  */
13160  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 751, __pyx_L1_error)
13161 
13162  /* "View.MemoryView":748
13163  * for dim, index in enumerate(indices):
13164  * if PyIndex_Check(index):
13165  * slice_memviewslice( # <<<<<<<<<<<<<<
13166  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13167  * dim, new_ndim, p_suboffset_dim,
13168  */
13169  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 748, __pyx_L1_error)
13170 
13171  /* "View.MemoryView":747
13172  *
13173  * for dim, index in enumerate(indices):
13174  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
13175  * slice_memviewslice(
13176  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13177  */
13178  goto __pyx_L6;
13179  }
13180 
13181  /* "View.MemoryView":754
13182  * 0, 0, 0, # have_{start,stop,step}
13183  * False)
13184  * elif index is None: # <<<<<<<<<<<<<<
13185  * p_dst.shape[new_ndim] = 1
13186  * p_dst.strides[new_ndim] = 0
13187  */
13188  __pyx_t_2 = (__pyx_v_index == Py_None);
13189  __pyx_t_1 = (__pyx_t_2 != 0);
13190  if (__pyx_t_1) {
13191 
13192  /* "View.MemoryView":755
13193  * False)
13194  * elif index is None:
13195  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
13196  * p_dst.strides[new_ndim] = 0
13197  * p_dst.suboffsets[new_ndim] = -1
13198  */
13199  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
13200 
13201  /* "View.MemoryView":756
13202  * elif index is None:
13203  * p_dst.shape[new_ndim] = 1
13204  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
13205  * p_dst.suboffsets[new_ndim] = -1
13206  * new_ndim += 1
13207  */
13208  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
13209 
13210  /* "View.MemoryView":757
13211  * p_dst.shape[new_ndim] = 1
13212  * p_dst.strides[new_ndim] = 0
13213  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
13214  * new_ndim += 1
13215  * else:
13216  */
13217  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
13218 
13219  /* "View.MemoryView":758
13220  * p_dst.strides[new_ndim] = 0
13221  * p_dst.suboffsets[new_ndim] = -1
13222  * new_ndim += 1 # <<<<<<<<<<<<<<
13223  * else:
13224  * start = index.start or 0
13225  */
13226  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
13227 
13228  /* "View.MemoryView":754
13229  * 0, 0, 0, # have_{start,stop,step}
13230  * False)
13231  * elif index is None: # <<<<<<<<<<<<<<
13232  * p_dst.shape[new_ndim] = 1
13233  * p_dst.strides[new_ndim] = 0
13234  */
13235  goto __pyx_L6;
13236  }
13237 
13238  /* "View.MemoryView":760
13239  * new_ndim += 1
13240  * else:
13241  * start = index.start or 0 # <<<<<<<<<<<<<<
13242  * stop = index.stop or 0
13243  * step = index.step or 0
13244  */
13245  /*else*/ {
13246  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error)
13247  __Pyx_GOTREF(__pyx_t_9);
13248  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 760, __pyx_L1_error)
13249  if (!__pyx_t_1) {
13250  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13251  } else {
13252  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
13253  __pyx_t_10 = __pyx_t_12;
13254  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13255  goto __pyx_L7_bool_binop_done;
13256  }
13257  __pyx_t_10 = 0;
13258  __pyx_L7_bool_binop_done:;
13259  __pyx_v_start = __pyx_t_10;
13260 
13261  /* "View.MemoryView":761
13262  * else:
13263  * start = index.start or 0
13264  * stop = index.stop or 0 # <<<<<<<<<<<<<<
13265  * step = index.step or 0
13266  *
13267  */
13268  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error)
13269  __Pyx_GOTREF(__pyx_t_9);
13270  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
13271  if (!__pyx_t_1) {
13272  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13273  } else {
13274  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
13275  __pyx_t_10 = __pyx_t_12;
13276  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13277  goto __pyx_L9_bool_binop_done;
13278  }
13279  __pyx_t_10 = 0;
13280  __pyx_L9_bool_binop_done:;
13281  __pyx_v_stop = __pyx_t_10;
13282 
13283  /* "View.MemoryView":762
13284  * start = index.start or 0
13285  * stop = index.stop or 0
13286  * step = index.step or 0 # <<<<<<<<<<<<<<
13287  *
13288  * have_start = index.start is not None
13289  */
13290  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
13291  __Pyx_GOTREF(__pyx_t_9);
13292  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
13293  if (!__pyx_t_1) {
13294  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13295  } else {
13296  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
13297  __pyx_t_10 = __pyx_t_12;
13298  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13299  goto __pyx_L11_bool_binop_done;
13300  }
13301  __pyx_t_10 = 0;
13302  __pyx_L11_bool_binop_done:;
13303  __pyx_v_step = __pyx_t_10;
13304 
13305  /* "View.MemoryView":764
13306  * step = index.step or 0
13307  *
13308  * have_start = index.start is not None # <<<<<<<<<<<<<<
13309  * have_stop = index.stop is not None
13310  * have_step = index.step is not None
13311  */
13312  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L1_error)
13313  __Pyx_GOTREF(__pyx_t_9);
13314  __pyx_t_1 = (__pyx_t_9 != Py_None);
13315  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13316  __pyx_v_have_start = __pyx_t_1;
13317 
13318  /* "View.MemoryView":765
13319  *
13320  * have_start = index.start is not None
13321  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
13322  * have_step = index.step is not None
13323  *
13324  */
13325  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
13326  __Pyx_GOTREF(__pyx_t_9);
13327  __pyx_t_1 = (__pyx_t_9 != Py_None);
13328  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13329  __pyx_v_have_stop = __pyx_t_1;
13330 
13331  /* "View.MemoryView":766
13332  * have_start = index.start is not None
13333  * have_stop = index.stop is not None
13334  * have_step = index.step is not None # <<<<<<<<<<<<<<
13335  *
13336  * slice_memviewslice(
13337  */
13338  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
13339  __Pyx_GOTREF(__pyx_t_9);
13340  __pyx_t_1 = (__pyx_t_9 != Py_None);
13341  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13342  __pyx_v_have_step = __pyx_t_1;
13343 
13344  /* "View.MemoryView":768
13345  * have_step = index.step is not None
13346  *
13347  * slice_memviewslice( # <<<<<<<<<<<<<<
13348  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13349  * dim, new_ndim, p_suboffset_dim,
13350  */
13351  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 768, __pyx_L1_error)
13352 
13353  /* "View.MemoryView":774
13354  * have_start, have_stop, have_step,
13355  * True)
13356  * new_ndim += 1 # <<<<<<<<<<<<<<
13357  *
13358  * if isinstance(memview, _memoryviewslice):
13359  */
13360  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
13361  }
13362  __pyx_L6:;
13363 
13364  /* "View.MemoryView":746
13365  * cdef bint have_start, have_stop, have_step
13366  *
13367  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
13368  * if PyIndex_Check(index):
13369  * slice_memviewslice(
13370  */
13371  }
13372  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13373 
13374  /* "View.MemoryView":776
13375  * new_ndim += 1
13376  *
13377  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
13378  * return memoryview_fromslice(dst, new_ndim,
13379  * memviewsliceobj.to_object_func,
13380  */
13381  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
13382  __pyx_t_2 = (__pyx_t_1 != 0);
13383  if (__pyx_t_2) {
13384 
13385  /* "View.MemoryView":777
13386  *
13387  * if isinstance(memview, _memoryviewslice):
13388  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
13389  * memviewsliceobj.to_object_func,
13390  * memviewsliceobj.to_dtype_func,
13391  */
13392  __Pyx_XDECREF(((PyObject *)__pyx_r));
13393 
13394  /* "View.MemoryView":778
13395  * if isinstance(memview, _memoryviewslice):
13396  * return memoryview_fromslice(dst, new_ndim,
13397  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
13398  * memviewsliceobj.to_dtype_func,
13399  * memview.dtype_is_object)
13400  */
13401  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 778, __pyx_L1_error) }
13402 
13403  /* "View.MemoryView":779
13404  * return memoryview_fromslice(dst, new_ndim,
13405  * memviewsliceobj.to_object_func,
13406  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
13407  * memview.dtype_is_object)
13408  * else:
13409  */
13410  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 779, __pyx_L1_error) }
13411 
13412  /* "View.MemoryView":777
13413  *
13414  * if isinstance(memview, _memoryviewslice):
13415  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
13416  * memviewsliceobj.to_object_func,
13417  * memviewsliceobj.to_dtype_func,
13418  */
13419  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
13420  __Pyx_GOTREF(__pyx_t_3);
13421  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 777, __pyx_L1_error)
13422  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
13423  __pyx_t_3 = 0;
13424  goto __pyx_L0;
13425 
13426  /* "View.MemoryView":776
13427  * new_ndim += 1
13428  *
13429  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
13430  * return memoryview_fromslice(dst, new_ndim,
13431  * memviewsliceobj.to_object_func,
13432  */
13433  }
13434 
13435  /* "View.MemoryView":782
13436  * memview.dtype_is_object)
13437  * else:
13438  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
13439  * memview.dtype_is_object)
13440  *
13441  */
13442  /*else*/ {
13443  __Pyx_XDECREF(((PyObject *)__pyx_r));
13444 
13445  /* "View.MemoryView":783
13446  * else:
13447  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
13448  * memview.dtype_is_object) # <<<<<<<<<<<<<<
13449  *
13450  *
13451  */
13452  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
13453  __Pyx_GOTREF(__pyx_t_3);
13454 
13455  /* "View.MemoryView":782
13456  * memview.dtype_is_object)
13457  * else:
13458  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
13459  * memview.dtype_is_object)
13460  *
13461  */
13462  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 782, __pyx_L1_error)
13463  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
13464  __pyx_t_3 = 0;
13465  goto __pyx_L0;
13466  }
13467 
13468  /* "View.MemoryView":710
13469  *
13470  * @cname('__pyx_memview_slice')
13471  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
13472  * cdef int new_ndim = 0, suboffset_dim = -1, dim
13473  * cdef bint negative_step
13474  */
13475 
13476  /* function exit code */
13477  __pyx_L1_error:;
13478  __Pyx_XDECREF(__pyx_t_3);
13479  __Pyx_XDECREF(__pyx_t_9);
13480  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
13481  __pyx_r = 0;
13482  __pyx_L0:;
13483  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
13484  __Pyx_XDECREF(__pyx_v_index);
13485  __Pyx_XGIVEREF((PyObject *)__pyx_r);
13486  __Pyx_RefNannyFinishContext();
13487  return __pyx_r;
13488 }
13489 
13490 /* "View.MemoryView":807
13491  *
13492  * @cname('__pyx_memoryview_slice_memviewslice')
13493  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
13494  * __Pyx_memviewslice *dst,
13495  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
13496  */
13497 
13498 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
13499  Py_ssize_t __pyx_v_new_shape;
13500  int __pyx_v_negative_step;
13501  int __pyx_r;
13502  int __pyx_t_1;
13503  int __pyx_t_2;
13504  int __pyx_t_3;
13505  int __pyx_lineno = 0;
13506  const char *__pyx_filename = NULL;
13507  int __pyx_clineno = 0;
13508 
13509  /* "View.MemoryView":827
13510  * cdef bint negative_step
13511  *
13512  * if not is_slice: # <<<<<<<<<<<<<<
13513  *
13514  * if start < 0:
13515  */
13516  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
13517  if (__pyx_t_1) {
13518 
13519  /* "View.MemoryView":829
13520  * if not is_slice:
13521  *
13522  * if start < 0: # <<<<<<<<<<<<<<
13523  * start += shape
13524  * if not 0 <= start < shape:
13525  */
13526  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
13527  if (__pyx_t_1) {
13528 
13529  /* "View.MemoryView":830
13530  *
13531  * if start < 0:
13532  * start += shape # <<<<<<<<<<<<<<
13533  * if not 0 <= start < shape:
13534  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
13535  */
13536  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
13537 
13538  /* "View.MemoryView":829
13539  * if not is_slice:
13540  *
13541  * if start < 0: # <<<<<<<<<<<<<<
13542  * start += shape
13543  * if not 0 <= start < shape:
13544  */
13545  }
13546 
13547  /* "View.MemoryView":831
13548  * if start < 0:
13549  * start += shape
13550  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
13551  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
13552  * else:
13553  */
13554  __pyx_t_1 = (0 <= __pyx_v_start);
13555  if (__pyx_t_1) {
13556  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
13557  }
13558  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13559  if (__pyx_t_2) {
13560 
13561  /* "View.MemoryView":832
13562  * start += shape
13563  * if not 0 <= start < shape:
13564  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
13565  * else:
13566  *
13567  */
13568  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 832, __pyx_L1_error)
13569 
13570  /* "View.MemoryView":831
13571  * if start < 0:
13572  * start += shape
13573  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
13574  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
13575  * else:
13576  */
13577  }
13578 
13579  /* "View.MemoryView":827
13580  * cdef bint negative_step
13581  *
13582  * if not is_slice: # <<<<<<<<<<<<<<
13583  *
13584  * if start < 0:
13585  */
13586  goto __pyx_L3;
13587  }
13588 
13589  /* "View.MemoryView":835
13590  * else:
13591  *
13592  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
13593  *
13594  * if have_step and step == 0:
13595  */
13596  /*else*/ {
13597  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
13598  if (__pyx_t_1) {
13599  } else {
13600  __pyx_t_2 = __pyx_t_1;
13601  goto __pyx_L6_bool_binop_done;
13602  }
13603  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
13604  __pyx_t_2 = __pyx_t_1;
13605  __pyx_L6_bool_binop_done:;
13606  __pyx_v_negative_step = __pyx_t_2;
13607 
13608  /* "View.MemoryView":837
13609  * negative_step = have_step != 0 and step < 0
13610  *
13611  * if have_step and step == 0: # <<<<<<<<<<<<<<
13612  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
13613  *
13614  */
13615  __pyx_t_1 = (__pyx_v_have_step != 0);
13616  if (__pyx_t_1) {
13617  } else {
13618  __pyx_t_2 = __pyx_t_1;
13619  goto __pyx_L9_bool_binop_done;
13620  }
13621  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
13622  __pyx_t_2 = __pyx_t_1;
13623  __pyx_L9_bool_binop_done:;
13624  if (__pyx_t_2) {
13625 
13626  /* "View.MemoryView":838
13627  *
13628  * if have_step and step == 0:
13629  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
13630  *
13631  *
13632  */
13633  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 838, __pyx_L1_error)
13634 
13635  /* "View.MemoryView":837
13636  * negative_step = have_step != 0 and step < 0
13637  *
13638  * if have_step and step == 0: # <<<<<<<<<<<<<<
13639  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
13640  *
13641  */
13642  }
13643 
13644  /* "View.MemoryView":841
13645  *
13646  *
13647  * if have_start: # <<<<<<<<<<<<<<
13648  * if start < 0:
13649  * start += shape
13650  */
13651  __pyx_t_2 = (__pyx_v_have_start != 0);
13652  if (__pyx_t_2) {
13653 
13654  /* "View.MemoryView":842
13655  *
13656  * if have_start:
13657  * if start < 0: # <<<<<<<<<<<<<<
13658  * start += shape
13659  * if start < 0:
13660  */
13661  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
13662  if (__pyx_t_2) {
13663 
13664  /* "View.MemoryView":843
13665  * if have_start:
13666  * if start < 0:
13667  * start += shape # <<<<<<<<<<<<<<
13668  * if start < 0:
13669  * start = 0
13670  */
13671  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
13672 
13673  /* "View.MemoryView":844
13674  * if start < 0:
13675  * start += shape
13676  * if start < 0: # <<<<<<<<<<<<<<
13677  * start = 0
13678  * elif start >= shape:
13679  */
13680  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
13681  if (__pyx_t_2) {
13682 
13683  /* "View.MemoryView":845
13684  * start += shape
13685  * if start < 0:
13686  * start = 0 # <<<<<<<<<<<<<<
13687  * elif start >= shape:
13688  * if negative_step:
13689  */
13690  __pyx_v_start = 0;
13691 
13692  /* "View.MemoryView":844
13693  * if start < 0:
13694  * start += shape
13695  * if start < 0: # <<<<<<<<<<<<<<
13696  * start = 0
13697  * elif start >= shape:
13698  */
13699  }
13700 
13701  /* "View.MemoryView":842
13702  *
13703  * if have_start:
13704  * if start < 0: # <<<<<<<<<<<<<<
13705  * start += shape
13706  * if start < 0:
13707  */
13708  goto __pyx_L12;
13709  }
13710 
13711  /* "View.MemoryView":846
13712  * if start < 0:
13713  * start = 0
13714  * elif start >= shape: # <<<<<<<<<<<<<<
13715  * if negative_step:
13716  * start = shape - 1
13717  */
13718  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
13719  if (__pyx_t_2) {
13720 
13721  /* "View.MemoryView":847
13722  * start = 0
13723  * elif start >= shape:
13724  * if negative_step: # <<<<<<<<<<<<<<
13725  * start = shape - 1
13726  * else:
13727  */
13728  __pyx_t_2 = (__pyx_v_negative_step != 0);
13729  if (__pyx_t_2) {
13730 
13731  /* "View.MemoryView":848
13732  * elif start >= shape:
13733  * if negative_step:
13734  * start = shape - 1 # <<<<<<<<<<<<<<
13735  * else:
13736  * start = shape
13737  */
13738  __pyx_v_start = (__pyx_v_shape - 1);
13739 
13740  /* "View.MemoryView":847
13741  * start = 0
13742  * elif start >= shape:
13743  * if negative_step: # <<<<<<<<<<<<<<
13744  * start = shape - 1
13745  * else:
13746  */
13747  goto __pyx_L14;
13748  }
13749 
13750  /* "View.MemoryView":850
13751  * start = shape - 1
13752  * else:
13753  * start = shape # <<<<<<<<<<<<<<
13754  * else:
13755  * if negative_step:
13756  */
13757  /*else*/ {
13758  __pyx_v_start = __pyx_v_shape;
13759  }
13760  __pyx_L14:;
13761 
13762  /* "View.MemoryView":846
13763  * if start < 0:
13764  * start = 0
13765  * elif start >= shape: # <<<<<<<<<<<<<<
13766  * if negative_step:
13767  * start = shape - 1
13768  */
13769  }
13770  __pyx_L12:;
13771 
13772  /* "View.MemoryView":841
13773  *
13774  *
13775  * if have_start: # <<<<<<<<<<<<<<
13776  * if start < 0:
13777  * start += shape
13778  */
13779  goto __pyx_L11;
13780  }
13781 
13782  /* "View.MemoryView":852
13783  * start = shape
13784  * else:
13785  * if negative_step: # <<<<<<<<<<<<<<
13786  * start = shape - 1
13787  * else:
13788  */
13789  /*else*/ {
13790  __pyx_t_2 = (__pyx_v_negative_step != 0);
13791  if (__pyx_t_2) {
13792 
13793  /* "View.MemoryView":853
13794  * else:
13795  * if negative_step:
13796  * start = shape - 1 # <<<<<<<<<<<<<<
13797  * else:
13798  * start = 0
13799  */
13800  __pyx_v_start = (__pyx_v_shape - 1);
13801 
13802  /* "View.MemoryView":852
13803  * start = shape
13804  * else:
13805  * if negative_step: # <<<<<<<<<<<<<<
13806  * start = shape - 1
13807  * else:
13808  */
13809  goto __pyx_L15;
13810  }
13811 
13812  /* "View.MemoryView":855
13813  * start = shape - 1
13814  * else:
13815  * start = 0 # <<<<<<<<<<<<<<
13816  *
13817  * if have_stop:
13818  */
13819  /*else*/ {
13820  __pyx_v_start = 0;
13821  }
13822  __pyx_L15:;
13823  }
13824  __pyx_L11:;
13825 
13826  /* "View.MemoryView":857
13827  * start = 0
13828  *
13829  * if have_stop: # <<<<<<<<<<<<<<
13830  * if stop < 0:
13831  * stop += shape
13832  */
13833  __pyx_t_2 = (__pyx_v_have_stop != 0);
13834  if (__pyx_t_2) {
13835 
13836  /* "View.MemoryView":858
13837  *
13838  * if have_stop:
13839  * if stop < 0: # <<<<<<<<<<<<<<
13840  * stop += shape
13841  * if stop < 0:
13842  */
13843  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
13844  if (__pyx_t_2) {
13845 
13846  /* "View.MemoryView":859
13847  * if have_stop:
13848  * if stop < 0:
13849  * stop += shape # <<<<<<<<<<<<<<
13850  * if stop < 0:
13851  * stop = 0
13852  */
13853  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
13854 
13855  /* "View.MemoryView":860
13856  * if stop < 0:
13857  * stop += shape
13858  * if stop < 0: # <<<<<<<<<<<<<<
13859  * stop = 0
13860  * elif stop > shape:
13861  */
13862  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
13863  if (__pyx_t_2) {
13864 
13865  /* "View.MemoryView":861
13866  * stop += shape
13867  * if stop < 0:
13868  * stop = 0 # <<<<<<<<<<<<<<
13869  * elif stop > shape:
13870  * stop = shape
13871  */
13872  __pyx_v_stop = 0;
13873 
13874  /* "View.MemoryView":860
13875  * if stop < 0:
13876  * stop += shape
13877  * if stop < 0: # <<<<<<<<<<<<<<
13878  * stop = 0
13879  * elif stop > shape:
13880  */
13881  }
13882 
13883  /* "View.MemoryView":858
13884  *
13885  * if have_stop:
13886  * if stop < 0: # <<<<<<<<<<<<<<
13887  * stop += shape
13888  * if stop < 0:
13889  */
13890  goto __pyx_L17;
13891  }
13892 
13893  /* "View.MemoryView":862
13894  * if stop < 0:
13895  * stop = 0
13896  * elif stop > shape: # <<<<<<<<<<<<<<
13897  * stop = shape
13898  * else:
13899  */
13900  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
13901  if (__pyx_t_2) {
13902 
13903  /* "View.MemoryView":863
13904  * stop = 0
13905  * elif stop > shape:
13906  * stop = shape # <<<<<<<<<<<<<<
13907  * else:
13908  * if negative_step:
13909  */
13910  __pyx_v_stop = __pyx_v_shape;
13911 
13912  /* "View.MemoryView":862
13913  * if stop < 0:
13914  * stop = 0
13915  * elif stop > shape: # <<<<<<<<<<<<<<
13916  * stop = shape
13917  * else:
13918  */
13919  }
13920  __pyx_L17:;
13921 
13922  /* "View.MemoryView":857
13923  * start = 0
13924  *
13925  * if have_stop: # <<<<<<<<<<<<<<
13926  * if stop < 0:
13927  * stop += shape
13928  */
13929  goto __pyx_L16;
13930  }
13931 
13932  /* "View.MemoryView":865
13933  * stop = shape
13934  * else:
13935  * if negative_step: # <<<<<<<<<<<<<<
13936  * stop = -1
13937  * else:
13938  */
13939  /*else*/ {
13940  __pyx_t_2 = (__pyx_v_negative_step != 0);
13941  if (__pyx_t_2) {
13942 
13943  /* "View.MemoryView":866
13944  * else:
13945  * if negative_step:
13946  * stop = -1 # <<<<<<<<<<<<<<
13947  * else:
13948  * stop = shape
13949  */
13950  __pyx_v_stop = -1L;
13951 
13952  /* "View.MemoryView":865
13953  * stop = shape
13954  * else:
13955  * if negative_step: # <<<<<<<<<<<<<<
13956  * stop = -1
13957  * else:
13958  */
13959  goto __pyx_L19;
13960  }
13961 
13962  /* "View.MemoryView":868
13963  * stop = -1
13964  * else:
13965  * stop = shape # <<<<<<<<<<<<<<
13966  *
13967  * if not have_step:
13968  */
13969  /*else*/ {
13970  __pyx_v_stop = __pyx_v_shape;
13971  }
13972  __pyx_L19:;
13973  }
13974  __pyx_L16:;
13975 
13976  /* "View.MemoryView":870
13977  * stop = shape
13978  *
13979  * if not have_step: # <<<<<<<<<<<<<<
13980  * step = 1
13981  *
13982  */
13983  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
13984  if (__pyx_t_2) {
13985 
13986  /* "View.MemoryView":871
13987  *
13988  * if not have_step:
13989  * step = 1 # <<<<<<<<<<<<<<
13990  *
13991  *
13992  */
13993  __pyx_v_step = 1;
13994 
13995  /* "View.MemoryView":870
13996  * stop = shape
13997  *
13998  * if not have_step: # <<<<<<<<<<<<<<
13999  * step = 1
14000  *
14001  */
14002  }
14003 
14004  /* "View.MemoryView":875
14005  *
14006  * with cython.cdivision(True):
14007  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
14008  *
14009  * if (stop - start) - step * new_shape:
14010  */
14011  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
14012 
14013  /* "View.MemoryView":877
14014  * new_shape = (stop - start) // step
14015  *
14016  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
14017  * new_shape += 1
14018  *
14019  */
14020  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
14021  if (__pyx_t_2) {
14022 
14023  /* "View.MemoryView":878
14024  *
14025  * if (stop - start) - step * new_shape:
14026  * new_shape += 1 # <<<<<<<<<<<<<<
14027  *
14028  * if new_shape < 0:
14029  */
14030  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
14031 
14032  /* "View.MemoryView":877
14033  * new_shape = (stop - start) // step
14034  *
14035  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
14036  * new_shape += 1
14037  *
14038  */
14039  }
14040 
14041  /* "View.MemoryView":880
14042  * new_shape += 1
14043  *
14044  * if new_shape < 0: # <<<<<<<<<<<<<<
14045  * new_shape = 0
14046  *
14047  */
14048  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
14049  if (__pyx_t_2) {
14050 
14051  /* "View.MemoryView":881
14052  *
14053  * if new_shape < 0:
14054  * new_shape = 0 # <<<<<<<<<<<<<<
14055  *
14056  *
14057  */
14058  __pyx_v_new_shape = 0;
14059 
14060  /* "View.MemoryView":880
14061  * new_shape += 1
14062  *
14063  * if new_shape < 0: # <<<<<<<<<<<<<<
14064  * new_shape = 0
14065  *
14066  */
14067  }
14068 
14069  /* "View.MemoryView":884
14070  *
14071  *
14072  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
14073  * dst.shape[new_ndim] = new_shape
14074  * dst.suboffsets[new_ndim] = suboffset
14075  */
14076  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
14077 
14078  /* "View.MemoryView":885
14079  *
14080  * dst.strides[new_ndim] = stride * step
14081  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
14082  * dst.suboffsets[new_ndim] = suboffset
14083  *
14084  */
14085  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
14086 
14087  /* "View.MemoryView":886
14088  * dst.strides[new_ndim] = stride * step
14089  * dst.shape[new_ndim] = new_shape
14090  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
14091  *
14092  *
14093  */
14094  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
14095  }
14096  __pyx_L3:;
14097 
14098  /* "View.MemoryView":889
14099  *
14100  *
14101  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
14102  * dst.data += start * stride
14103  * else:
14104  */
14105  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
14106  if (__pyx_t_2) {
14107 
14108  /* "View.MemoryView":890
14109  *
14110  * if suboffset_dim[0] < 0:
14111  * dst.data += start * stride # <<<<<<<<<<<<<<
14112  * else:
14113  * dst.suboffsets[suboffset_dim[0]] += start * stride
14114  */
14115  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
14116 
14117  /* "View.MemoryView":889
14118  *
14119  *
14120  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
14121  * dst.data += start * stride
14122  * else:
14123  */
14124  goto __pyx_L23;
14125  }
14126 
14127  /* "View.MemoryView":892
14128  * dst.data += start * stride
14129  * else:
14130  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
14131  *
14132  * if suboffset >= 0:
14133  */
14134  /*else*/ {
14135  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
14136  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
14137  }
14138  __pyx_L23:;
14139 
14140  /* "View.MemoryView":894
14141  * dst.suboffsets[suboffset_dim[0]] += start * stride
14142  *
14143  * if suboffset >= 0: # <<<<<<<<<<<<<<
14144  * if not is_slice:
14145  * if new_ndim == 0:
14146  */
14147  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
14148  if (__pyx_t_2) {
14149 
14150  /* "View.MemoryView":895
14151  *
14152  * if suboffset >= 0:
14153  * if not is_slice: # <<<<<<<<<<<<<<
14154  * if new_ndim == 0:
14155  * dst.data = (<char **> dst.data)[0] + suboffset
14156  */
14157  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
14158  if (__pyx_t_2) {
14159 
14160  /* "View.MemoryView":896
14161  * if suboffset >= 0:
14162  * if not is_slice:
14163  * if new_ndim == 0: # <<<<<<<<<<<<<<
14164  * dst.data = (<char **> dst.data)[0] + suboffset
14165  * else:
14166  */
14167  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
14168  if (__pyx_t_2) {
14169 
14170  /* "View.MemoryView":897
14171  * if not is_slice:
14172  * if new_ndim == 0:
14173  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
14174  * else:
14175  * _err_dim(IndexError, "All dimensions preceding dimension %d "
14176  */
14177  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
14178 
14179  /* "View.MemoryView":896
14180  * if suboffset >= 0:
14181  * if not is_slice:
14182  * if new_ndim == 0: # <<<<<<<<<<<<<<
14183  * dst.data = (<char **> dst.data)[0] + suboffset
14184  * else:
14185  */
14186  goto __pyx_L26;
14187  }
14188 
14189  /* "View.MemoryView":899
14190  * dst.data = (<char **> dst.data)[0] + suboffset
14191  * else:
14192  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
14193  * "must be indexed and not sliced", dim)
14194  * else:
14195  */
14196  /*else*/ {
14197 
14198  /* "View.MemoryView":900
14199  * else:
14200  * _err_dim(IndexError, "All dimensions preceding dimension %d "
14201  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
14202  * else:
14203  * suboffset_dim[0] = new_ndim
14204  */
14205  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 899, __pyx_L1_error)
14206  }
14207  __pyx_L26:;
14208 
14209  /* "View.MemoryView":895
14210  *
14211  * if suboffset >= 0:
14212  * if not is_slice: # <<<<<<<<<<<<<<
14213  * if new_ndim == 0:
14214  * dst.data = (<char **> dst.data)[0] + suboffset
14215  */
14216  goto __pyx_L25;
14217  }
14218 
14219  /* "View.MemoryView":902
14220  * "must be indexed and not sliced", dim)
14221  * else:
14222  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
14223  *
14224  * return 0
14225  */
14226  /*else*/ {
14227  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
14228  }
14229  __pyx_L25:;
14230 
14231  /* "View.MemoryView":894
14232  * dst.suboffsets[suboffset_dim[0]] += start * stride
14233  *
14234  * if suboffset >= 0: # <<<<<<<<<<<<<<
14235  * if not is_slice:
14236  * if new_ndim == 0:
14237  */
14238  }
14239 
14240  /* "View.MemoryView":904
14241  * suboffset_dim[0] = new_ndim
14242  *
14243  * return 0 # <<<<<<<<<<<<<<
14244  *
14245  *
14246  */
14247  __pyx_r = 0;
14248  goto __pyx_L0;
14249 
14250  /* "View.MemoryView":807
14251  *
14252  * @cname('__pyx_memoryview_slice_memviewslice')
14253  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
14254  * __Pyx_memviewslice *dst,
14255  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
14256  */
14257 
14258  /* function exit code */
14259  __pyx_L1_error:;
14260  {
14261  #ifdef WITH_THREAD
14262  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
14263  #endif
14264  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14265  #ifdef WITH_THREAD
14266  __Pyx_PyGILState_Release(__pyx_gilstate_save);
14267  #endif
14268  }
14269  __pyx_r = -1;
14270  __pyx_L0:;
14271  return __pyx_r;
14272 }
14273 
14274 /* "View.MemoryView":910
14275  *
14276  * @cname('__pyx_pybuffer_index')
14277  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
14278  * Py_ssize_t dim) except NULL:
14279  * cdef Py_ssize_t shape, stride, suboffset = -1
14280  */
14281 
14282 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
14283  Py_ssize_t __pyx_v_shape;
14284  Py_ssize_t __pyx_v_stride;
14285  Py_ssize_t __pyx_v_suboffset;
14286  Py_ssize_t __pyx_v_itemsize;
14287  char *__pyx_v_resultp;
14288  char *__pyx_r;
14289  __Pyx_RefNannyDeclarations
14290  Py_ssize_t __pyx_t_1;
14291  int __pyx_t_2;
14292  PyObject *__pyx_t_3 = NULL;
14293  PyObject *__pyx_t_4 = NULL;
14294  int __pyx_lineno = 0;
14295  const char *__pyx_filename = NULL;
14296  int __pyx_clineno = 0;
14297  __Pyx_RefNannySetupContext("pybuffer_index", 0);
14298 
14299  /* "View.MemoryView":912
14300  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
14301  * Py_ssize_t dim) except NULL:
14302  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
14303  * cdef Py_ssize_t itemsize = view.itemsize
14304  * cdef char *resultp
14305  */
14306  __pyx_v_suboffset = -1L;
14307 
14308  /* "View.MemoryView":913
14309  * Py_ssize_t dim) except NULL:
14310  * cdef Py_ssize_t shape, stride, suboffset = -1
14311  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
14312  * cdef char *resultp
14313  *
14314  */
14315  __pyx_t_1 = __pyx_v_view->itemsize;
14316  __pyx_v_itemsize = __pyx_t_1;
14317 
14318  /* "View.MemoryView":916
14319  * cdef char *resultp
14320  *
14321  * if view.ndim == 0: # <<<<<<<<<<<<<<
14322  * shape = view.len / itemsize
14323  * stride = itemsize
14324  */
14325  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
14326  if (__pyx_t_2) {
14327 
14328  /* "View.MemoryView":917
14329  *
14330  * if view.ndim == 0:
14331  * shape = view.len / itemsize # <<<<<<<<<<<<<<
14332  * stride = itemsize
14333  * else:
14334  */
14335  if (unlikely(__pyx_v_itemsize == 0)) {
14336  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
14337  __PYX_ERR(0, 917, __pyx_L1_error)
14338  }
14339  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
14340  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
14341  __PYX_ERR(0, 917, __pyx_L1_error)
14342  }
14343  __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
14344 
14345  /* "View.MemoryView":918
14346  * if view.ndim == 0:
14347  * shape = view.len / itemsize
14348  * stride = itemsize # <<<<<<<<<<<<<<
14349  * else:
14350  * shape = view.shape[dim]
14351  */
14352  __pyx_v_stride = __pyx_v_itemsize;
14353 
14354  /* "View.MemoryView":916
14355  * cdef char *resultp
14356  *
14357  * if view.ndim == 0: # <<<<<<<<<<<<<<
14358  * shape = view.len / itemsize
14359  * stride = itemsize
14360  */
14361  goto __pyx_L3;
14362  }
14363 
14364  /* "View.MemoryView":920
14365  * stride = itemsize
14366  * else:
14367  * shape = view.shape[dim] # <<<<<<<<<<<<<<
14368  * stride = view.strides[dim]
14369  * if view.suboffsets != NULL:
14370  */
14371  /*else*/ {
14372  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
14373 
14374  /* "View.MemoryView":921
14375  * else:
14376  * shape = view.shape[dim]
14377  * stride = view.strides[dim] # <<<<<<<<<<<<<<
14378  * if view.suboffsets != NULL:
14379  * suboffset = view.suboffsets[dim]
14380  */
14381  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
14382 
14383  /* "View.MemoryView":922
14384  * shape = view.shape[dim]
14385  * stride = view.strides[dim]
14386  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
14387  * suboffset = view.suboffsets[dim]
14388  *
14389  */
14390  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
14391  if (__pyx_t_2) {
14392 
14393  /* "View.MemoryView":923
14394  * stride = view.strides[dim]
14395  * if view.suboffsets != NULL:
14396  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
14397  *
14398  * if index < 0:
14399  */
14400  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
14401 
14402  /* "View.MemoryView":922
14403  * shape = view.shape[dim]
14404  * stride = view.strides[dim]
14405  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
14406  * suboffset = view.suboffsets[dim]
14407  *
14408  */
14409  }
14410  }
14411  __pyx_L3:;
14412 
14413  /* "View.MemoryView":925
14414  * suboffset = view.suboffsets[dim]
14415  *
14416  * if index < 0: # <<<<<<<<<<<<<<
14417  * index += view.shape[dim]
14418  * if index < 0:
14419  */
14420  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
14421  if (__pyx_t_2) {
14422 
14423  /* "View.MemoryView":926
14424  *
14425  * if index < 0:
14426  * index += view.shape[dim] # <<<<<<<<<<<<<<
14427  * if index < 0:
14428  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14429  */
14430  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
14431 
14432  /* "View.MemoryView":927
14433  * if index < 0:
14434  * index += view.shape[dim]
14435  * if index < 0: # <<<<<<<<<<<<<<
14436  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14437  *
14438  */
14439  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
14440  if (unlikely(__pyx_t_2)) {
14441 
14442  /* "View.MemoryView":928
14443  * index += view.shape[dim]
14444  * if index < 0:
14445  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
14446  *
14447  * if index >= shape:
14448  */
14449  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
14450  __Pyx_GOTREF(__pyx_t_3);
14451  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
14452  __Pyx_GOTREF(__pyx_t_4);
14453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14454  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
14455  __Pyx_GOTREF(__pyx_t_3);
14456  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14457  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
14458  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14459  __PYX_ERR(0, 928, __pyx_L1_error)
14460 
14461  /* "View.MemoryView":927
14462  * if index < 0:
14463  * index += view.shape[dim]
14464  * if index < 0: # <<<<<<<<<<<<<<
14465  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14466  *
14467  */
14468  }
14469 
14470  /* "View.MemoryView":925
14471  * suboffset = view.suboffsets[dim]
14472  *
14473  * if index < 0: # <<<<<<<<<<<<<<
14474  * index += view.shape[dim]
14475  * if index < 0:
14476  */
14477  }
14478 
14479  /* "View.MemoryView":930
14480  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14481  *
14482  * if index >= shape: # <<<<<<<<<<<<<<
14483  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14484  *
14485  */
14486  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
14487  if (unlikely(__pyx_t_2)) {
14488 
14489  /* "View.MemoryView":931
14490  *
14491  * if index >= shape:
14492  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
14493  *
14494  * resultp = bufp + index * stride
14495  */
14496  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
14497  __Pyx_GOTREF(__pyx_t_3);
14498  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
14499  __Pyx_GOTREF(__pyx_t_4);
14500  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14501  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
14502  __Pyx_GOTREF(__pyx_t_3);
14503  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14504  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
14505  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14506  __PYX_ERR(0, 931, __pyx_L1_error)
14507 
14508  /* "View.MemoryView":930
14509  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14510  *
14511  * if index >= shape: # <<<<<<<<<<<<<<
14512  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14513  *
14514  */
14515  }
14516 
14517  /* "View.MemoryView":933
14518  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
14519  *
14520  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
14521  * if suboffset >= 0:
14522  * resultp = (<char **> resultp)[0] + suboffset
14523  */
14524  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
14525 
14526  /* "View.MemoryView":934
14527  *
14528  * resultp = bufp + index * stride
14529  * if suboffset >= 0: # <<<<<<<<<<<<<<
14530  * resultp = (<char **> resultp)[0] + suboffset
14531  *
14532  */
14533  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
14534  if (__pyx_t_2) {
14535 
14536  /* "View.MemoryView":935
14537  * resultp = bufp + index * stride
14538  * if suboffset >= 0:
14539  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
14540  *
14541  * return resultp
14542  */
14543  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
14544 
14545  /* "View.MemoryView":934
14546  *
14547  * resultp = bufp + index * stride
14548  * if suboffset >= 0: # <<<<<<<<<<<<<<
14549  * resultp = (<char **> resultp)[0] + suboffset
14550  *
14551  */
14552  }
14553 
14554  /* "View.MemoryView":937
14555  * resultp = (<char **> resultp)[0] + suboffset
14556  *
14557  * return resultp # <<<<<<<<<<<<<<
14558  *
14559  *
14560  */
14561  __pyx_r = __pyx_v_resultp;
14562  goto __pyx_L0;
14563 
14564  /* "View.MemoryView":910
14565  *
14566  * @cname('__pyx_pybuffer_index')
14567  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
14568  * Py_ssize_t dim) except NULL:
14569  * cdef Py_ssize_t shape, stride, suboffset = -1
14570  */
14571 
14572  /* function exit code */
14573  __pyx_L1_error:;
14574  __Pyx_XDECREF(__pyx_t_3);
14575  __Pyx_XDECREF(__pyx_t_4);
14576  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
14577  __pyx_r = NULL;
14578  __pyx_L0:;
14579  __Pyx_RefNannyFinishContext();
14580  return __pyx_r;
14581 }
14582 
14583 /* "View.MemoryView":943
14584  *
14585  * @cname('__pyx_memslice_transpose')
14586  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
14587  * cdef int ndim = memslice.memview.view.ndim
14588  *
14589  */
14590 
14591 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
14592  int __pyx_v_ndim;
14593  Py_ssize_t *__pyx_v_shape;
14594  Py_ssize_t *__pyx_v_strides;
14595  int __pyx_v_i;
14596  int __pyx_v_j;
14597  int __pyx_r;
14598  int __pyx_t_1;
14599  Py_ssize_t *__pyx_t_2;
14600  long __pyx_t_3;
14601  long __pyx_t_4;
14602  Py_ssize_t __pyx_t_5;
14603  Py_ssize_t __pyx_t_6;
14604  int __pyx_t_7;
14605  int __pyx_t_8;
14606  int __pyx_t_9;
14607  int __pyx_lineno = 0;
14608  const char *__pyx_filename = NULL;
14609  int __pyx_clineno = 0;
14610 
14611  /* "View.MemoryView":944
14612  * @cname('__pyx_memslice_transpose')
14613  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
14614  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
14615  *
14616  * cdef Py_ssize_t *shape = memslice.shape
14617  */
14618  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
14619  __pyx_v_ndim = __pyx_t_1;
14620 
14621  /* "View.MemoryView":946
14622  * cdef int ndim = memslice.memview.view.ndim
14623  *
14624  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
14625  * cdef Py_ssize_t *strides = memslice.strides
14626  *
14627  */
14628  __pyx_t_2 = __pyx_v_memslice->shape;
14629  __pyx_v_shape = __pyx_t_2;
14630 
14631  /* "View.MemoryView":947
14632  *
14633  * cdef Py_ssize_t *shape = memslice.shape
14634  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
14635  *
14636  *
14637  */
14638  __pyx_t_2 = __pyx_v_memslice->strides;
14639  __pyx_v_strides = __pyx_t_2;
14640 
14641  /* "View.MemoryView":951
14642  *
14643  * cdef int i, j
14644  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
14645  * j = ndim - 1 - i
14646  * strides[i], strides[j] = strides[j], strides[i]
14647  */
14648  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
14649  __pyx_t_4 = __pyx_t_3;
14650  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
14651  __pyx_v_i = __pyx_t_1;
14652 
14653  /* "View.MemoryView":952
14654  * cdef int i, j
14655  * for i in range(ndim / 2):
14656  * j = ndim - 1 - i # <<<<<<<<<<<<<<
14657  * strides[i], strides[j] = strides[j], strides[i]
14658  * shape[i], shape[j] = shape[j], shape[i]
14659  */
14660  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
14661 
14662  /* "View.MemoryView":953
14663  * for i in range(ndim / 2):
14664  * j = ndim - 1 - i
14665  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
14666  * shape[i], shape[j] = shape[j], shape[i]
14667  *
14668  */
14669  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
14670  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
14671  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
14672  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
14673 
14674  /* "View.MemoryView":954
14675  * j = ndim - 1 - i
14676  * strides[i], strides[j] = strides[j], strides[i]
14677  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
14678  *
14679  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
14680  */
14681  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
14682  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
14683  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
14684  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
14685 
14686  /* "View.MemoryView":956
14687  * shape[i], shape[j] = shape[j], shape[i]
14688  *
14689  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
14690  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
14691  *
14692  */
14693  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
14694  if (!__pyx_t_8) {
14695  } else {
14696  __pyx_t_7 = __pyx_t_8;
14697  goto __pyx_L6_bool_binop_done;
14698  }
14699  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
14700  __pyx_t_7 = __pyx_t_8;
14701  __pyx_L6_bool_binop_done:;
14702  if (__pyx_t_7) {
14703 
14704  /* "View.MemoryView":957
14705  *
14706  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
14707  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
14708  *
14709  * return 1
14710  */
14711  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error)
14712 
14713  /* "View.MemoryView":956
14714  * shape[i], shape[j] = shape[j], shape[i]
14715  *
14716  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
14717  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
14718  *
14719  */
14720  }
14721  }
14722 
14723  /* "View.MemoryView":959
14724  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
14725  *
14726  * return 1 # <<<<<<<<<<<<<<
14727  *
14728  *
14729  */
14730  __pyx_r = 1;
14731  goto __pyx_L0;
14732 
14733  /* "View.MemoryView":943
14734  *
14735  * @cname('__pyx_memslice_transpose')
14736  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
14737  * cdef int ndim = memslice.memview.view.ndim
14738  *
14739  */
14740 
14741  /* function exit code */
14742  __pyx_L1_error:;
14743  {
14744  #ifdef WITH_THREAD
14745  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
14746  #endif
14747  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14748  #ifdef WITH_THREAD
14749  __Pyx_PyGILState_Release(__pyx_gilstate_save);
14750  #endif
14751  }
14752  __pyx_r = 0;
14753  __pyx_L0:;
14754  return __pyx_r;
14755 }
14756 
14757 /* "View.MemoryView":976
14758  * cdef int (*to_dtype_func)(char *, object) except 0
14759  *
14760  * def __dealloc__(self): # <<<<<<<<<<<<<<
14761  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
14762  *
14763  */
14764 
14765 /* Python wrapper */
14766 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
14767 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
14768  __Pyx_RefNannyDeclarations
14769  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
14770  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
14771 
14772  /* function exit code */
14773  __Pyx_RefNannyFinishContext();
14774 }
14775 
14776 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
14777  __Pyx_RefNannyDeclarations
14778  __Pyx_RefNannySetupContext("__dealloc__", 0);
14779 
14780  /* "View.MemoryView":977
14781  *
14782  * def __dealloc__(self):
14783  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
14784  *
14785  * cdef convert_item_to_object(self, char *itemp):
14786  */
14787  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
14788 
14789  /* "View.MemoryView":976
14790  * cdef int (*to_dtype_func)(char *, object) except 0
14791  *
14792  * def __dealloc__(self): # <<<<<<<<<<<<<<
14793  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
14794  *
14795  */
14796 
14797  /* function exit code */
14798  __Pyx_RefNannyFinishContext();
14799 }
14800 
14801 /* "View.MemoryView":979
14802  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
14803  *
14804  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
14805  * if self.to_object_func != NULL:
14806  * return self.to_object_func(itemp)
14807  */
14808 
14809 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
14810  PyObject *__pyx_r = NULL;
14811  __Pyx_RefNannyDeclarations
14812  int __pyx_t_1;
14813  PyObject *__pyx_t_2 = NULL;
14814  int __pyx_lineno = 0;
14815  const char *__pyx_filename = NULL;
14816  int __pyx_clineno = 0;
14817  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
14818 
14819  /* "View.MemoryView":980
14820  *
14821  * cdef convert_item_to_object(self, char *itemp):
14822  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
14823  * return self.to_object_func(itemp)
14824  * else:
14825  */
14826  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
14827  if (__pyx_t_1) {
14828 
14829  /* "View.MemoryView":981
14830  * cdef convert_item_to_object(self, char *itemp):
14831  * if self.to_object_func != NULL:
14832  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
14833  * else:
14834  * return memoryview.convert_item_to_object(self, itemp)
14835  */
14836  __Pyx_XDECREF(__pyx_r);
14837  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
14838  __Pyx_GOTREF(__pyx_t_2);
14839  __pyx_r = __pyx_t_2;
14840  __pyx_t_2 = 0;
14841  goto __pyx_L0;
14842 
14843  /* "View.MemoryView":980
14844  *
14845  * cdef convert_item_to_object(self, char *itemp):
14846  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
14847  * return self.to_object_func(itemp)
14848  * else:
14849  */
14850  }
14851 
14852  /* "View.MemoryView":983
14853  * return self.to_object_func(itemp)
14854  * else:
14855  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
14856  *
14857  * cdef assign_item_from_object(self, char *itemp, object value):
14858  */
14859  /*else*/ {
14860  __Pyx_XDECREF(__pyx_r);
14861  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
14862  __Pyx_GOTREF(__pyx_t_2);
14863  __pyx_r = __pyx_t_2;
14864  __pyx_t_2 = 0;
14865  goto __pyx_L0;
14866  }
14867 
14868  /* "View.MemoryView":979
14869  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
14870  *
14871  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
14872  * if self.to_object_func != NULL:
14873  * return self.to_object_func(itemp)
14874  */
14875 
14876  /* function exit code */
14877  __pyx_L1_error:;
14878  __Pyx_XDECREF(__pyx_t_2);
14879  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
14880  __pyx_r = 0;
14881  __pyx_L0:;
14882  __Pyx_XGIVEREF(__pyx_r);
14883  __Pyx_RefNannyFinishContext();
14884  return __pyx_r;
14885 }
14886 
14887 /* "View.MemoryView":985
14888  * return memoryview.convert_item_to_object(self, itemp)
14889  *
14890  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
14891  * if self.to_dtype_func != NULL:
14892  * self.to_dtype_func(itemp, value)
14893  */
14894 
14895 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
14896  PyObject *__pyx_r = NULL;
14897  __Pyx_RefNannyDeclarations
14898  int __pyx_t_1;
14899  int __pyx_t_2;
14900  PyObject *__pyx_t_3 = NULL;
14901  int __pyx_lineno = 0;
14902  const char *__pyx_filename = NULL;
14903  int __pyx_clineno = 0;
14904  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
14905 
14906  /* "View.MemoryView":986
14907  *
14908  * cdef assign_item_from_object(self, char *itemp, object value):
14909  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
14910  * self.to_dtype_func(itemp, value)
14911  * else:
14912  */
14913  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
14914  if (__pyx_t_1) {
14915 
14916  /* "View.MemoryView":987
14917  * cdef assign_item_from_object(self, char *itemp, object value):
14918  * if self.to_dtype_func != NULL:
14919  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
14920  * else:
14921  * memoryview.assign_item_from_object(self, itemp, value)
14922  */
14923  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 987, __pyx_L1_error)
14924 
14925  /* "View.MemoryView":986
14926  *
14927  * cdef assign_item_from_object(self, char *itemp, object value):
14928  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
14929  * self.to_dtype_func(itemp, value)
14930  * else:
14931  */
14932  goto __pyx_L3;
14933  }
14934 
14935  /* "View.MemoryView":989
14936  * self.to_dtype_func(itemp, value)
14937  * else:
14938  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
14939  *
14940  * @property
14941  */
14942  /*else*/ {
14943  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error)
14944  __Pyx_GOTREF(__pyx_t_3);
14945  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14946  }
14947  __pyx_L3:;
14948 
14949  /* "View.MemoryView":985
14950  * return memoryview.convert_item_to_object(self, itemp)
14951  *
14952  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
14953  * if self.to_dtype_func != NULL:
14954  * self.to_dtype_func(itemp, value)
14955  */
14956 
14957  /* function exit code */
14958  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14959  goto __pyx_L0;
14960  __pyx_L1_error:;
14961  __Pyx_XDECREF(__pyx_t_3);
14962  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
14963  __pyx_r = 0;
14964  __pyx_L0:;
14965  __Pyx_XGIVEREF(__pyx_r);
14966  __Pyx_RefNannyFinishContext();
14967  return __pyx_r;
14968 }
14969 
14970 /* "View.MemoryView":992
14971  *
14972  * @property
14973  * def base(self): # <<<<<<<<<<<<<<
14974  * return self.from_object
14975  *
14976  */
14977 
14978 /* Python wrapper */
14979 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
14980 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
14981  PyObject *__pyx_r = 0;
14982  __Pyx_RefNannyDeclarations
14983  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14984  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
14985 
14986  /* function exit code */
14987  __Pyx_RefNannyFinishContext();
14988  return __pyx_r;
14989 }
14990 
14991 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
14992  PyObject *__pyx_r = NULL;
14993  __Pyx_RefNannyDeclarations
14994  __Pyx_RefNannySetupContext("__get__", 0);
14995 
14996  /* "View.MemoryView":993
14997  * @property
14998  * def base(self):
14999  * return self.from_object # <<<<<<<<<<<<<<
15000  *
15001  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
15002  */
15003  __Pyx_XDECREF(__pyx_r);
15004  __Pyx_INCREF(__pyx_v_self->from_object);
15005  __pyx_r = __pyx_v_self->from_object;
15006  goto __pyx_L0;
15007 
15008  /* "View.MemoryView":992
15009  *
15010  * @property
15011  * def base(self): # <<<<<<<<<<<<<<
15012  * return self.from_object
15013  *
15014  */
15015 
15016  /* function exit code */
15017  __pyx_L0:;
15018  __Pyx_XGIVEREF(__pyx_r);
15019  __Pyx_RefNannyFinishContext();
15020  return __pyx_r;
15021 }
15022 
15023 /* "(tree fragment)":1
15024  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
15025  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15026  * def __setstate_cython__(self, __pyx_state):
15027  */
15028 
15029 /* Python wrapper */
15030 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
15031 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
15032  PyObject *__pyx_r = 0;
15033  __Pyx_RefNannyDeclarations
15034  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
15035  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
15036 
15037  /* function exit code */
15038  __Pyx_RefNannyFinishContext();
15039  return __pyx_r;
15040 }
15041 
15042 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
15043  PyObject *__pyx_r = NULL;
15044  __Pyx_RefNannyDeclarations
15045  PyObject *__pyx_t_1 = NULL;
15046  int __pyx_lineno = 0;
15047  const char *__pyx_filename = NULL;
15048  int __pyx_clineno = 0;
15049  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
15050 
15051  /* "(tree fragment)":2
15052  * def __reduce_cython__(self):
15053  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
15054  * def __setstate_cython__(self, __pyx_state):
15055  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15056  */
15057  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
15058  __Pyx_GOTREF(__pyx_t_1);
15059  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
15060  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15061  __PYX_ERR(0, 2, __pyx_L1_error)
15062 
15063  /* "(tree fragment)":1
15064  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
15065  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15066  * def __setstate_cython__(self, __pyx_state):
15067  */
15068 
15069  /* function exit code */
15070  __pyx_L1_error:;
15071  __Pyx_XDECREF(__pyx_t_1);
15072  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15073  __pyx_r = NULL;
15074  __Pyx_XGIVEREF(__pyx_r);
15075  __Pyx_RefNannyFinishContext();
15076  return __pyx_r;
15077 }
15078 
15079 /* "(tree fragment)":3
15080  * def __reduce_cython__(self):
15081  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15082  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
15083  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15084  */
15085 
15086 /* Python wrapper */
15087 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
15088 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
15089  PyObject *__pyx_r = 0;
15090  __Pyx_RefNannyDeclarations
15091  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
15092  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
15093 
15094  /* function exit code */
15095  __Pyx_RefNannyFinishContext();
15096  return __pyx_r;
15097 }
15098 
15099 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) {
15100  PyObject *__pyx_r = NULL;
15101  __Pyx_RefNannyDeclarations
15102  PyObject *__pyx_t_1 = NULL;
15103  int __pyx_lineno = 0;
15104  const char *__pyx_filename = NULL;
15105  int __pyx_clineno = 0;
15106  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
15107 
15108  /* "(tree fragment)":4
15109  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15110  * def __setstate_cython__(self, __pyx_state):
15111  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
15112  */
15113  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
15114  __Pyx_GOTREF(__pyx_t_1);
15115  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
15116  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15117  __PYX_ERR(0, 4, __pyx_L1_error)
15118 
15119  /* "(tree fragment)":3
15120  * def __reduce_cython__(self):
15121  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15122  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
15123  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
15124  */
15125 
15126  /* function exit code */
15127  __pyx_L1_error:;
15128  __Pyx_XDECREF(__pyx_t_1);
15129  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15130  __pyx_r = NULL;
15131  __Pyx_XGIVEREF(__pyx_r);
15132  __Pyx_RefNannyFinishContext();
15133  return __pyx_r;
15134 }
15135 
15136 /* "View.MemoryView":999
15137  *
15138  * @cname('__pyx_memoryview_fromslice')
15139  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
15140  * int ndim,
15141  * object (*to_object_func)(char *),
15142  */
15143 
15144 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
15145  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
15146  Py_ssize_t __pyx_v_suboffset;
15147  PyObject *__pyx_v_length = NULL;
15148  PyObject *__pyx_r = NULL;
15149  __Pyx_RefNannyDeclarations
15150  int __pyx_t_1;
15151  PyObject *__pyx_t_2 = NULL;
15152  PyObject *__pyx_t_3 = NULL;
15153  __Pyx_TypeInfo *__pyx_t_4;
15154  Py_buffer __pyx_t_5;
15155  Py_ssize_t *__pyx_t_6;
15156  Py_ssize_t *__pyx_t_7;
15157  Py_ssize_t *__pyx_t_8;
15158  Py_ssize_t __pyx_t_9;
15159  int __pyx_lineno = 0;
15160  const char *__pyx_filename = NULL;
15161  int __pyx_clineno = 0;
15162  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
15163 
15164  /* "View.MemoryView":1007
15165  * cdef _memoryviewslice result
15166  *
15167  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
15168  * return None
15169  *
15170  */
15171  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
15172  if (__pyx_t_1) {
15173 
15174  /* "View.MemoryView":1008
15175  *
15176  * if <PyObject *> memviewslice.memview == Py_None:
15177  * return None # <<<<<<<<<<<<<<
15178  *
15179  *
15180  */
15181  __Pyx_XDECREF(__pyx_r);
15182  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15183  goto __pyx_L0;
15184 
15185  /* "View.MemoryView":1007
15186  * cdef _memoryviewslice result
15187  *
15188  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
15189  * return None
15190  *
15191  */
15192  }
15193 
15194  /* "View.MemoryView":1013
15195  *
15196  *
15197  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
15198  *
15199  * result.from_slice = memviewslice
15200  */
15201  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
15202  __Pyx_GOTREF(__pyx_t_2);
15203  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
15204  __Pyx_GOTREF(__pyx_t_3);
15205  __Pyx_INCREF(Py_None);
15206  __Pyx_GIVEREF(Py_None);
15207  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
15208  __Pyx_INCREF(__pyx_int_0);
15209  __Pyx_GIVEREF(__pyx_int_0);
15210  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
15211  __Pyx_GIVEREF(__pyx_t_2);
15212  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
15213  __pyx_t_2 = 0;
15214  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
15215  __Pyx_GOTREF(__pyx_t_2);
15216  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15217  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
15218  __pyx_t_2 = 0;
15219 
15220  /* "View.MemoryView":1015
15221  * result = _memoryviewslice(None, 0, dtype_is_object)
15222  *
15223  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
15224  * __PYX_INC_MEMVIEW(&memviewslice, 1)
15225  *
15226  */
15227  __pyx_v_result->from_slice = __pyx_v_memviewslice;
15228 
15229  /* "View.MemoryView":1016
15230  *
15231  * result.from_slice = memviewslice
15232  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
15233  *
15234  * result.from_object = (<memoryview> memviewslice.memview).base
15235  */
15236  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
15237 
15238  /* "View.MemoryView":1018
15239  * __PYX_INC_MEMVIEW(&memviewslice, 1)
15240  *
15241  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
15242  * result.typeinfo = memviewslice.memview.typeinfo
15243  *
15244  */
15245  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
15246  __Pyx_GOTREF(__pyx_t_2);
15247  __Pyx_GIVEREF(__pyx_t_2);
15248  __Pyx_GOTREF(__pyx_v_result->from_object);
15249  __Pyx_DECREF(__pyx_v_result->from_object);
15250  __pyx_v_result->from_object = __pyx_t_2;
15251  __pyx_t_2 = 0;
15252 
15253  /* "View.MemoryView":1019
15254  *
15255  * result.from_object = (<memoryview> memviewslice.memview).base
15256  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
15257  *
15258  * result.view = memviewslice.memview.view
15259  */
15260  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
15261  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
15262 
15263  /* "View.MemoryView":1021
15264  * result.typeinfo = memviewslice.memview.typeinfo
15265  *
15266  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
15267  * result.view.buf = <void *> memviewslice.data
15268  * result.view.ndim = ndim
15269  */
15270  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
15271  __pyx_v_result->__pyx_base.view = __pyx_t_5;
15272 
15273  /* "View.MemoryView":1022
15274  *
15275  * result.view = memviewslice.memview.view
15276  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
15277  * result.view.ndim = ndim
15278  * (<__pyx_buffer *> &result.view).obj = Py_None
15279  */
15280  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
15281 
15282  /* "View.MemoryView":1023
15283  * result.view = memviewslice.memview.view
15284  * result.view.buf = <void *> memviewslice.data
15285  * result.view.ndim = ndim # <<<<<<<<<<<<<<
15286  * (<__pyx_buffer *> &result.view).obj = Py_None
15287  * Py_INCREF(Py_None)
15288  */
15289  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
15290 
15291  /* "View.MemoryView":1024
15292  * result.view.buf = <void *> memviewslice.data
15293  * result.view.ndim = ndim
15294  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
15295  * Py_INCREF(Py_None)
15296  *
15297  */
15298  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
15299 
15300  /* "View.MemoryView":1025
15301  * result.view.ndim = ndim
15302  * (<__pyx_buffer *> &result.view).obj = Py_None
15303  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
15304  *
15305  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
15306  */
15307  Py_INCREF(Py_None);
15308 
15309  /* "View.MemoryView":1027
15310  * Py_INCREF(Py_None)
15311  *
15312  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
15313  * result.flags = PyBUF_RECORDS
15314  * else:
15315  */
15316  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
15317  if (__pyx_t_1) {
15318 
15319  /* "View.MemoryView":1028
15320  *
15321  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
15322  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
15323  * else:
15324  * result.flags = PyBUF_RECORDS_RO
15325  */
15326  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
15327 
15328  /* "View.MemoryView":1027
15329  * Py_INCREF(Py_None)
15330  *
15331  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
15332  * result.flags = PyBUF_RECORDS
15333  * else:
15334  */
15335  goto __pyx_L4;
15336  }
15337 
15338  /* "View.MemoryView":1030
15339  * result.flags = PyBUF_RECORDS
15340  * else:
15341  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
15342  *
15343  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
15344  */
15345  /*else*/ {
15346  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
15347  }
15348  __pyx_L4:;
15349 
15350  /* "View.MemoryView":1032
15351  * result.flags = PyBUF_RECORDS_RO
15352  *
15353  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
15354  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
15355  *
15356  */
15357  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
15358 
15359  /* "View.MemoryView":1033
15360  *
15361  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
15362  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
15363  *
15364  *
15365  */
15366  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
15367 
15368  /* "View.MemoryView":1036
15369  *
15370  *
15371  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
15372  * for suboffset in result.from_slice.suboffsets[:ndim]:
15373  * if suboffset >= 0:
15374  */
15375  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
15376 
15377  /* "View.MemoryView":1037
15378  *
15379  * result.view.suboffsets = NULL
15380  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
15381  * if suboffset >= 0:
15382  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15383  */
15384  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
15385  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
15386  __pyx_t_6 = __pyx_t_8;
15387  __pyx_v_suboffset = (__pyx_t_6[0]);
15388 
15389  /* "View.MemoryView":1038
15390  * result.view.suboffsets = NULL
15391  * for suboffset in result.from_slice.suboffsets[:ndim]:
15392  * if suboffset >= 0: # <<<<<<<<<<<<<<
15393  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15394  * break
15395  */
15396  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
15397  if (__pyx_t_1) {
15398 
15399  /* "View.MemoryView":1039
15400  * for suboffset in result.from_slice.suboffsets[:ndim]:
15401  * if suboffset >= 0:
15402  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
15403  * break
15404  *
15405  */
15406  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
15407 
15408  /* "View.MemoryView":1040
15409  * if suboffset >= 0:
15410  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15411  * break # <<<<<<<<<<<<<<
15412  *
15413  * result.view.len = result.view.itemsize
15414  */
15415  goto __pyx_L6_break;
15416 
15417  /* "View.MemoryView":1038
15418  * result.view.suboffsets = NULL
15419  * for suboffset in result.from_slice.suboffsets[:ndim]:
15420  * if suboffset >= 0: # <<<<<<<<<<<<<<
15421  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15422  * break
15423  */
15424  }
15425  }
15426  __pyx_L6_break:;
15427 
15428  /* "View.MemoryView":1042
15429  * break
15430  *
15431  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
15432  * for length in result.view.shape[:ndim]:
15433  * result.view.len *= length
15434  */
15435  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
15436  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
15437 
15438  /* "View.MemoryView":1043
15439  *
15440  * result.view.len = result.view.itemsize
15441  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
15442  * result.view.len *= length
15443  *
15444  */
15445  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
15446  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
15447  __pyx_t_6 = __pyx_t_8;
15448  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
15449  __Pyx_GOTREF(__pyx_t_2);
15450  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
15451  __pyx_t_2 = 0;
15452 
15453  /* "View.MemoryView":1044
15454  * result.view.len = result.view.itemsize
15455  * for length in result.view.shape[:ndim]:
15456  * result.view.len *= length # <<<<<<<<<<<<<<
15457  *
15458  * result.to_object_func = to_object_func
15459  */
15460  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error)
15461  __Pyx_GOTREF(__pyx_t_2);
15462  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error)
15463  __Pyx_GOTREF(__pyx_t_3);
15464  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15465  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error)
15466  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15467  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
15468  }
15469 
15470  /* "View.MemoryView":1046
15471  * result.view.len *= length
15472  *
15473  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
15474  * result.to_dtype_func = to_dtype_func
15475  *
15476  */
15477  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
15478 
15479  /* "View.MemoryView":1047
15480  *
15481  * result.to_object_func = to_object_func
15482  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
15483  *
15484  * return result
15485  */
15486  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
15487 
15488  /* "View.MemoryView":1049
15489  * result.to_dtype_func = to_dtype_func
15490  *
15491  * return result # <<<<<<<<<<<<<<
15492  *
15493  * @cname('__pyx_memoryview_get_slice_from_memoryview')
15494  */
15495  __Pyx_XDECREF(__pyx_r);
15496  __Pyx_INCREF(((PyObject *)__pyx_v_result));
15497  __pyx_r = ((PyObject *)__pyx_v_result);
15498  goto __pyx_L0;
15499 
15500  /* "View.MemoryView":999
15501  *
15502  * @cname('__pyx_memoryview_fromslice')
15503  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
15504  * int ndim,
15505  * object (*to_object_func)(char *),
15506  */
15507 
15508  /* function exit code */
15509  __pyx_L1_error:;
15510  __Pyx_XDECREF(__pyx_t_2);
15511  __Pyx_XDECREF(__pyx_t_3);
15512  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15513  __pyx_r = 0;
15514  __pyx_L0:;
15515  __Pyx_XDECREF((PyObject *)__pyx_v_result);
15516  __Pyx_XDECREF(__pyx_v_length);
15517  __Pyx_XGIVEREF(__pyx_r);
15518  __Pyx_RefNannyFinishContext();
15519  return __pyx_r;
15520 }
15521 
15522 /* "View.MemoryView":1052
15523  *
15524  * @cname('__pyx_memoryview_get_slice_from_memoryview')
15525  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
15526  * __Pyx_memviewslice *mslice) except NULL:
15527  * cdef _memoryviewslice obj
15528  */
15529 
15530 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
15531  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
15532  __Pyx_memviewslice *__pyx_r;
15533  __Pyx_RefNannyDeclarations
15534  int __pyx_t_1;
15535  int __pyx_t_2;
15536  PyObject *__pyx_t_3 = NULL;
15537  int __pyx_lineno = 0;
15538  const char *__pyx_filename = NULL;
15539  int __pyx_clineno = 0;
15540  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
15541 
15542  /* "View.MemoryView":1055
15543  * __Pyx_memviewslice *mslice) except NULL:
15544  * cdef _memoryviewslice obj
15545  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15546  * obj = memview
15547  * return &obj.from_slice
15548  */
15549  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
15550  __pyx_t_2 = (__pyx_t_1 != 0);
15551  if (__pyx_t_2) {
15552 
15553  /* "View.MemoryView":1056
15554  * cdef _memoryviewslice obj
15555  * if isinstance(memview, _memoryviewslice):
15556  * obj = memview # <<<<<<<<<<<<<<
15557  * return &obj.from_slice
15558  * else:
15559  */
15560  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1056, __pyx_L1_error)
15561  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
15562  __Pyx_INCREF(__pyx_t_3);
15563  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
15564  __pyx_t_3 = 0;
15565 
15566  /* "View.MemoryView":1057
15567  * if isinstance(memview, _memoryviewslice):
15568  * obj = memview
15569  * return &obj.from_slice # <<<<<<<<<<<<<<
15570  * else:
15571  * slice_copy(memview, mslice)
15572  */
15573  __pyx_r = (&__pyx_v_obj->from_slice);
15574  goto __pyx_L0;
15575 
15576  /* "View.MemoryView":1055
15577  * __Pyx_memviewslice *mslice) except NULL:
15578  * cdef _memoryviewslice obj
15579  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15580  * obj = memview
15581  * return &obj.from_slice
15582  */
15583  }
15584 
15585  /* "View.MemoryView":1059
15586  * return &obj.from_slice
15587  * else:
15588  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
15589  * return mslice
15590  *
15591  */
15592  /*else*/ {
15593  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
15594 
15595  /* "View.MemoryView":1060
15596  * else:
15597  * slice_copy(memview, mslice)
15598  * return mslice # <<<<<<<<<<<<<<
15599  *
15600  * @cname('__pyx_memoryview_slice_copy')
15601  */
15602  __pyx_r = __pyx_v_mslice;
15603  goto __pyx_L0;
15604  }
15605 
15606  /* "View.MemoryView":1052
15607  *
15608  * @cname('__pyx_memoryview_get_slice_from_memoryview')
15609  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
15610  * __Pyx_memviewslice *mslice) except NULL:
15611  * cdef _memoryviewslice obj
15612  */
15613 
15614  /* function exit code */
15615  __pyx_L1_error:;
15616  __Pyx_XDECREF(__pyx_t_3);
15617  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
15618  __pyx_r = NULL;
15619  __pyx_L0:;
15620  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
15621  __Pyx_RefNannyFinishContext();
15622  return __pyx_r;
15623 }
15624 
15625 /* "View.MemoryView":1063
15626  *
15627  * @cname('__pyx_memoryview_slice_copy')
15628  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
15629  * cdef int dim
15630  * cdef (Py_ssize_t*) shape, strides, suboffsets
15631  */
15632 
15633 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
15634  int __pyx_v_dim;
15635  Py_ssize_t *__pyx_v_shape;
15636  Py_ssize_t *__pyx_v_strides;
15637  Py_ssize_t *__pyx_v_suboffsets;
15638  __Pyx_RefNannyDeclarations
15639  Py_ssize_t *__pyx_t_1;
15640  int __pyx_t_2;
15641  int __pyx_t_3;
15642  int __pyx_t_4;
15643  Py_ssize_t __pyx_t_5;
15644  __Pyx_RefNannySetupContext("slice_copy", 0);
15645 
15646  /* "View.MemoryView":1067
15647  * cdef (Py_ssize_t*) shape, strides, suboffsets
15648  *
15649  * shape = memview.view.shape # <<<<<<<<<<<<<<
15650  * strides = memview.view.strides
15651  * suboffsets = memview.view.suboffsets
15652  */
15653  __pyx_t_1 = __pyx_v_memview->view.shape;
15654  __pyx_v_shape = __pyx_t_1;
15655 
15656  /* "View.MemoryView":1068
15657  *
15658  * shape = memview.view.shape
15659  * strides = memview.view.strides # <<<<<<<<<<<<<<
15660  * suboffsets = memview.view.suboffsets
15661  *
15662  */
15663  __pyx_t_1 = __pyx_v_memview->view.strides;
15664  __pyx_v_strides = __pyx_t_1;
15665 
15666  /* "View.MemoryView":1069
15667  * shape = memview.view.shape
15668  * strides = memview.view.strides
15669  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
15670  *
15671  * dst.memview = <__pyx_memoryview *> memview
15672  */
15673  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
15674  __pyx_v_suboffsets = __pyx_t_1;
15675 
15676  /* "View.MemoryView":1071
15677  * suboffsets = memview.view.suboffsets
15678  *
15679  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
15680  * dst.data = <char *> memview.view.buf
15681  *
15682  */
15683  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
15684 
15685  /* "View.MemoryView":1072
15686  *
15687  * dst.memview = <__pyx_memoryview *> memview
15688  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
15689  *
15690  * for dim in range(memview.view.ndim):
15691  */
15692  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
15693 
15694  /* "View.MemoryView":1074
15695  * dst.data = <char *> memview.view.buf
15696  *
15697  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
15698  * dst.shape[dim] = shape[dim]
15699  * dst.strides[dim] = strides[dim]
15700  */
15701  __pyx_t_2 = __pyx_v_memview->view.ndim;
15702  __pyx_t_3 = __pyx_t_2;
15703  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
15704  __pyx_v_dim = __pyx_t_4;
15705 
15706  /* "View.MemoryView":1075
15707  *
15708  * for dim in range(memview.view.ndim):
15709  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
15710  * dst.strides[dim] = strides[dim]
15711  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
15712  */
15713  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
15714 
15715  /* "View.MemoryView":1076
15716  * for dim in range(memview.view.ndim):
15717  * dst.shape[dim] = shape[dim]
15718  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
15719  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
15720  *
15721  */
15722  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
15723 
15724  /* "View.MemoryView":1077
15725  * dst.shape[dim] = shape[dim]
15726  * dst.strides[dim] = strides[dim]
15727  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
15728  *
15729  * @cname('__pyx_memoryview_copy_object')
15730  */
15731  if ((__pyx_v_suboffsets != 0)) {
15732  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
15733  } else {
15734  __pyx_t_5 = -1L;
15735  }
15736  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
15737  }
15738 
15739  /* "View.MemoryView":1063
15740  *
15741  * @cname('__pyx_memoryview_slice_copy')
15742  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
15743  * cdef int dim
15744  * cdef (Py_ssize_t*) shape, strides, suboffsets
15745  */
15746 
15747  /* function exit code */
15748  __Pyx_RefNannyFinishContext();
15749 }
15750 
15751 /* "View.MemoryView":1080
15752  *
15753  * @cname('__pyx_memoryview_copy_object')
15754  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
15755  * "Create a new memoryview object"
15756  * cdef __Pyx_memviewslice memviewslice
15757  */
15758 
15759 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
15760  __Pyx_memviewslice __pyx_v_memviewslice;
15761  PyObject *__pyx_r = NULL;
15762  __Pyx_RefNannyDeclarations
15763  PyObject *__pyx_t_1 = NULL;
15764  int __pyx_lineno = 0;
15765  const char *__pyx_filename = NULL;
15766  int __pyx_clineno = 0;
15767  __Pyx_RefNannySetupContext("memoryview_copy", 0);
15768 
15769  /* "View.MemoryView":1083
15770  * "Create a new memoryview object"
15771  * cdef __Pyx_memviewslice memviewslice
15772  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
15773  * return memoryview_copy_from_slice(memview, &memviewslice)
15774  *
15775  */
15776  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
15777 
15778  /* "View.MemoryView":1084
15779  * cdef __Pyx_memviewslice memviewslice
15780  * slice_copy(memview, &memviewslice)
15781  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
15782  *
15783  * @cname('__pyx_memoryview_copy_object_from_slice')
15784  */
15785  __Pyx_XDECREF(__pyx_r);
15786  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
15787  __Pyx_GOTREF(__pyx_t_1);
15788  __pyx_r = __pyx_t_1;
15789  __pyx_t_1 = 0;
15790  goto __pyx_L0;
15791 
15792  /* "View.MemoryView":1080
15793  *
15794  * @cname('__pyx_memoryview_copy_object')
15795  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
15796  * "Create a new memoryview object"
15797  * cdef __Pyx_memviewslice memviewslice
15798  */
15799 
15800  /* function exit code */
15801  __pyx_L1_error:;
15802  __Pyx_XDECREF(__pyx_t_1);
15803  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
15804  __pyx_r = 0;
15805  __pyx_L0:;
15806  __Pyx_XGIVEREF(__pyx_r);
15807  __Pyx_RefNannyFinishContext();
15808  return __pyx_r;
15809 }
15810 
15811 /* "View.MemoryView":1087
15812  *
15813  * @cname('__pyx_memoryview_copy_object_from_slice')
15814  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
15815  * """
15816  * Create a new memoryview object from a given memoryview object and slice.
15817  */
15818 
15819 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
15820  PyObject *(*__pyx_v_to_object_func)(char *);
15821  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
15822  PyObject *__pyx_r = NULL;
15823  __Pyx_RefNannyDeclarations
15824  int __pyx_t_1;
15825  int __pyx_t_2;
15826  PyObject *(*__pyx_t_3)(char *);
15827  int (*__pyx_t_4)(char *, PyObject *);
15828  PyObject *__pyx_t_5 = NULL;
15829  int __pyx_lineno = 0;
15830  const char *__pyx_filename = NULL;
15831  int __pyx_clineno = 0;
15832  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
15833 
15834  /* "View.MemoryView":1094
15835  * cdef int (*to_dtype_func)(char *, object) except 0
15836  *
15837  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15838  * to_object_func = (<_memoryviewslice> memview).to_object_func
15839  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15840  */
15841  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
15842  __pyx_t_2 = (__pyx_t_1 != 0);
15843  if (__pyx_t_2) {
15844 
15845  /* "View.MemoryView":1095
15846  *
15847  * if isinstance(memview, _memoryviewslice):
15848  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
15849  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15850  * else:
15851  */
15852  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
15853  __pyx_v_to_object_func = __pyx_t_3;
15854 
15855  /* "View.MemoryView":1096
15856  * if isinstance(memview, _memoryviewslice):
15857  * to_object_func = (<_memoryviewslice> memview).to_object_func
15858  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
15859  * else:
15860  * to_object_func = NULL
15861  */
15862  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
15863  __pyx_v_to_dtype_func = __pyx_t_4;
15864 
15865  /* "View.MemoryView":1094
15866  * cdef int (*to_dtype_func)(char *, object) except 0
15867  *
15868  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15869  * to_object_func = (<_memoryviewslice> memview).to_object_func
15870  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15871  */
15872  goto __pyx_L3;
15873  }
15874 
15875  /* "View.MemoryView":1098
15876  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15877  * else:
15878  * to_object_func = NULL # <<<<<<<<<<<<<<
15879  * to_dtype_func = NULL
15880  *
15881  */
15882  /*else*/ {
15883  __pyx_v_to_object_func = NULL;
15884 
15885  /* "View.MemoryView":1099
15886  * else:
15887  * to_object_func = NULL
15888  * to_dtype_func = NULL # <<<<<<<<<<<<<<
15889  *
15890  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
15891  */
15892  __pyx_v_to_dtype_func = NULL;
15893  }
15894  __pyx_L3:;
15895 
15896  /* "View.MemoryView":1101
15897  * to_dtype_func = NULL
15898  *
15899  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
15900  * to_object_func, to_dtype_func,
15901  * memview.dtype_is_object)
15902  */
15903  __Pyx_XDECREF(__pyx_r);
15904 
15905  /* "View.MemoryView":1103
15906  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
15907  * to_object_func, to_dtype_func,
15908  * memview.dtype_is_object) # <<<<<<<<<<<<<<
15909  *
15910  *
15911  */
15912  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
15913  __Pyx_GOTREF(__pyx_t_5);
15914  __pyx_r = __pyx_t_5;
15915  __pyx_t_5 = 0;
15916  goto __pyx_L0;
15917 
15918  /* "View.MemoryView":1087
15919  *
15920  * @cname('__pyx_memoryview_copy_object_from_slice')
15921  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
15922  * """
15923  * Create a new memoryview object from a given memoryview object and slice.
15924  */
15925 
15926  /* function exit code */
15927  __pyx_L1_error:;
15928  __Pyx_XDECREF(__pyx_t_5);
15929  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15930  __pyx_r = 0;
15931  __pyx_L0:;
15932  __Pyx_XGIVEREF(__pyx_r);
15933  __Pyx_RefNannyFinishContext();
15934  return __pyx_r;
15935 }
15936 
15937 /* "View.MemoryView":1109
15938  *
15939  *
15940  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
15941  * if arg < 0:
15942  * return -arg
15943  */
15944 
15945 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
15946  Py_ssize_t __pyx_r;
15947  int __pyx_t_1;
15948 
15949  /* "View.MemoryView":1110
15950  *
15951  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
15952  * if arg < 0: # <<<<<<<<<<<<<<
15953  * return -arg
15954  * else:
15955  */
15956  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
15957  if (__pyx_t_1) {
15958 
15959  /* "View.MemoryView":1111
15960  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
15961  * if arg < 0:
15962  * return -arg # <<<<<<<<<<<<<<
15963  * else:
15964  * return arg
15965  */
15966  __pyx_r = (-__pyx_v_arg);
15967  goto __pyx_L0;
15968 
15969  /* "View.MemoryView":1110
15970  *
15971  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
15972  * if arg < 0: # <<<<<<<<<<<<<<
15973  * return -arg
15974  * else:
15975  */
15976  }
15977 
15978  /* "View.MemoryView":1113
15979  * return -arg
15980  * else:
15981  * return arg # <<<<<<<<<<<<<<
15982  *
15983  * @cname('__pyx_get_best_slice_order')
15984  */
15985  /*else*/ {
15986  __pyx_r = __pyx_v_arg;
15987  goto __pyx_L0;
15988  }
15989 
15990  /* "View.MemoryView":1109
15991  *
15992  *
15993  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
15994  * if arg < 0:
15995  * return -arg
15996  */
15997 
15998  /* function exit code */
15999  __pyx_L0:;
16000  return __pyx_r;
16001 }
16002 
16003 /* "View.MemoryView":1116
16004  *
16005  * @cname('__pyx_get_best_slice_order')
16006  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
16007  * """
16008  * Figure out the best memory access order for a given slice.
16009  */
16010 
16011 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
16012  int __pyx_v_i;
16013  Py_ssize_t __pyx_v_c_stride;
16014  Py_ssize_t __pyx_v_f_stride;
16015  char __pyx_r;
16016  int __pyx_t_1;
16017  int __pyx_t_2;
16018  int __pyx_t_3;
16019  int __pyx_t_4;
16020 
16021  /* "View.MemoryView":1121
16022  * """
16023  * cdef int i
16024  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
16025  * cdef Py_ssize_t f_stride = 0
16026  *
16027  */
16028  __pyx_v_c_stride = 0;
16029 
16030  /* "View.MemoryView":1122
16031  * cdef int i
16032  * cdef Py_ssize_t c_stride = 0
16033  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
16034  *
16035  * for i in range(ndim - 1, -1, -1):
16036  */
16037  __pyx_v_f_stride = 0;
16038 
16039  /* "View.MemoryView":1124
16040  * cdef Py_ssize_t f_stride = 0
16041  *
16042  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
16043  * if mslice.shape[i] > 1:
16044  * c_stride = mslice.strides[i]
16045  */
16046  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
16047  __pyx_v_i = __pyx_t_1;
16048 
16049  /* "View.MemoryView":1125
16050  *
16051  * for i in range(ndim - 1, -1, -1):
16052  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16053  * c_stride = mslice.strides[i]
16054  * break
16055  */
16056  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
16057  if (__pyx_t_2) {
16058 
16059  /* "View.MemoryView":1126
16060  * for i in range(ndim - 1, -1, -1):
16061  * if mslice.shape[i] > 1:
16062  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
16063  * break
16064  *
16065  */
16066  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16067 
16068  /* "View.MemoryView":1127
16069  * if mslice.shape[i] > 1:
16070  * c_stride = mslice.strides[i]
16071  * break # <<<<<<<<<<<<<<
16072  *
16073  * for i in range(ndim):
16074  */
16075  goto __pyx_L4_break;
16076 
16077  /* "View.MemoryView":1125
16078  *
16079  * for i in range(ndim - 1, -1, -1):
16080  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16081  * c_stride = mslice.strides[i]
16082  * break
16083  */
16084  }
16085  }
16086  __pyx_L4_break:;
16087 
16088  /* "View.MemoryView":1129
16089  * break
16090  *
16091  * for i in range(ndim): # <<<<<<<<<<<<<<
16092  * if mslice.shape[i] > 1:
16093  * f_stride = mslice.strides[i]
16094  */
16095  __pyx_t_1 = __pyx_v_ndim;
16096  __pyx_t_3 = __pyx_t_1;
16097  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16098  __pyx_v_i = __pyx_t_4;
16099 
16100  /* "View.MemoryView":1130
16101  *
16102  * for i in range(ndim):
16103  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16104  * f_stride = mslice.strides[i]
16105  * break
16106  */
16107  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
16108  if (__pyx_t_2) {
16109 
16110  /* "View.MemoryView":1131
16111  * for i in range(ndim):
16112  * if mslice.shape[i] > 1:
16113  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
16114  * break
16115  *
16116  */
16117  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16118 
16119  /* "View.MemoryView":1132
16120  * if mslice.shape[i] > 1:
16121  * f_stride = mslice.strides[i]
16122  * break # <<<<<<<<<<<<<<
16123  *
16124  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
16125  */
16126  goto __pyx_L7_break;
16127 
16128  /* "View.MemoryView":1130
16129  *
16130  * for i in range(ndim):
16131  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16132  * f_stride = mslice.strides[i]
16133  * break
16134  */
16135  }
16136  }
16137  __pyx_L7_break:;
16138 
16139  /* "View.MemoryView":1134
16140  * break
16141  *
16142  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
16143  * return 'C'
16144  * else:
16145  */
16146  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
16147  if (__pyx_t_2) {
16148 
16149  /* "View.MemoryView":1135
16150  *
16151  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
16152  * return 'C' # <<<<<<<<<<<<<<
16153  * else:
16154  * return 'F'
16155  */
16156  __pyx_r = 'C';
16157  goto __pyx_L0;
16158 
16159  /* "View.MemoryView":1134
16160  * break
16161  *
16162  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
16163  * return 'C'
16164  * else:
16165  */
16166  }
16167 
16168  /* "View.MemoryView":1137
16169  * return 'C'
16170  * else:
16171  * return 'F' # <<<<<<<<<<<<<<
16172  *
16173  * @cython.cdivision(True)
16174  */
16175  /*else*/ {
16176  __pyx_r = 'F';
16177  goto __pyx_L0;
16178  }
16179 
16180  /* "View.MemoryView":1116
16181  *
16182  * @cname('__pyx_get_best_slice_order')
16183  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
16184  * """
16185  * Figure out the best memory access order for a given slice.
16186  */
16187 
16188  /* function exit code */
16189  __pyx_L0:;
16190  return __pyx_r;
16191 }
16192 
16193 /* "View.MemoryView":1140
16194  *
16195  * @cython.cdivision(True)
16196  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
16197  * char *dst_data, Py_ssize_t *dst_strides,
16198  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
16199  */
16200 
16201 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
16202  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
16203  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
16204  Py_ssize_t __pyx_v_dst_extent;
16205  Py_ssize_t __pyx_v_src_stride;
16206  Py_ssize_t __pyx_v_dst_stride;
16207  int __pyx_t_1;
16208  int __pyx_t_2;
16209  int __pyx_t_3;
16210  Py_ssize_t __pyx_t_4;
16211  Py_ssize_t __pyx_t_5;
16212  Py_ssize_t __pyx_t_6;
16213 
16214  /* "View.MemoryView":1147
16215  *
16216  * cdef Py_ssize_t i
16217  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
16218  * cdef Py_ssize_t dst_extent = dst_shape[0]
16219  * cdef Py_ssize_t src_stride = src_strides[0]
16220  */
16221  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
16222 
16223  /* "View.MemoryView":1148
16224  * cdef Py_ssize_t i
16225  * cdef Py_ssize_t src_extent = src_shape[0]
16226  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
16227  * cdef Py_ssize_t src_stride = src_strides[0]
16228  * cdef Py_ssize_t dst_stride = dst_strides[0]
16229  */
16230  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
16231 
16232  /* "View.MemoryView":1149
16233  * cdef Py_ssize_t src_extent = src_shape[0]
16234  * cdef Py_ssize_t dst_extent = dst_shape[0]
16235  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
16236  * cdef Py_ssize_t dst_stride = dst_strides[0]
16237  *
16238  */
16239  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
16240 
16241  /* "View.MemoryView":1150
16242  * cdef Py_ssize_t dst_extent = dst_shape[0]
16243  * cdef Py_ssize_t src_stride = src_strides[0]
16244  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
16245  *
16246  * if ndim == 1:
16247  */
16248  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
16249 
16250  /* "View.MemoryView":1152
16251  * cdef Py_ssize_t dst_stride = dst_strides[0]
16252  *
16253  * if ndim == 1: # <<<<<<<<<<<<<<
16254  * if (src_stride > 0 and dst_stride > 0 and
16255  * <size_t> src_stride == itemsize == <size_t> dst_stride):
16256  */
16257  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
16258  if (__pyx_t_1) {
16259 
16260  /* "View.MemoryView":1153
16261  *
16262  * if ndim == 1:
16263  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16264  * <size_t> src_stride == itemsize == <size_t> dst_stride):
16265  * memcpy(dst_data, src_data, itemsize * dst_extent)
16266  */
16267  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
16268  if (__pyx_t_2) {
16269  } else {
16270  __pyx_t_1 = __pyx_t_2;
16271  goto __pyx_L5_bool_binop_done;
16272  }
16273  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
16274  if (__pyx_t_2) {
16275  } else {
16276  __pyx_t_1 = __pyx_t_2;
16277  goto __pyx_L5_bool_binop_done;
16278  }
16279 
16280  /* "View.MemoryView":1154
16281  * if ndim == 1:
16282  * if (src_stride > 0 and dst_stride > 0 and
16283  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
16284  * memcpy(dst_data, src_data, itemsize * dst_extent)
16285  * else:
16286  */
16287  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
16288  if (__pyx_t_2) {
16289  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
16290  }
16291  __pyx_t_3 = (__pyx_t_2 != 0);
16292  __pyx_t_1 = __pyx_t_3;
16293  __pyx_L5_bool_binop_done:;
16294 
16295  /* "View.MemoryView":1153
16296  *
16297  * if ndim == 1:
16298  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16299  * <size_t> src_stride == itemsize == <size_t> dst_stride):
16300  * memcpy(dst_data, src_data, itemsize * dst_extent)
16301  */
16302  if (__pyx_t_1) {
16303 
16304  /* "View.MemoryView":1155
16305  * if (src_stride > 0 and dst_stride > 0 and
16306  * <size_t> src_stride == itemsize == <size_t> dst_stride):
16307  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
16308  * else:
16309  * for i in range(dst_extent):
16310  */
16311  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
16312 
16313  /* "View.MemoryView":1153
16314  *
16315  * if ndim == 1:
16316  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16317  * <size_t> src_stride == itemsize == <size_t> dst_stride):
16318  * memcpy(dst_data, src_data, itemsize * dst_extent)
16319  */
16320  goto __pyx_L4;
16321  }
16322 
16323  /* "View.MemoryView":1157
16324  * memcpy(dst_data, src_data, itemsize * dst_extent)
16325  * else:
16326  * for i in range(dst_extent): # <<<<<<<<<<<<<<
16327  * memcpy(dst_data, src_data, itemsize)
16328  * src_data += src_stride
16329  */
16330  /*else*/ {
16331  __pyx_t_4 = __pyx_v_dst_extent;
16332  __pyx_t_5 = __pyx_t_4;
16333  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
16334  __pyx_v_i = __pyx_t_6;
16335 
16336  /* "View.MemoryView":1158
16337  * else:
16338  * for i in range(dst_extent):
16339  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
16340  * src_data += src_stride
16341  * dst_data += dst_stride
16342  */
16343  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
16344 
16345  /* "View.MemoryView":1159
16346  * for i in range(dst_extent):
16347  * memcpy(dst_data, src_data, itemsize)
16348  * src_data += src_stride # <<<<<<<<<<<<<<
16349  * dst_data += dst_stride
16350  * else:
16351  */
16352  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
16353 
16354  /* "View.MemoryView":1160
16355  * memcpy(dst_data, src_data, itemsize)
16356  * src_data += src_stride
16357  * dst_data += dst_stride # <<<<<<<<<<<<<<
16358  * else:
16359  * for i in range(dst_extent):
16360  */
16361  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
16362  }
16363  }
16364  __pyx_L4:;
16365 
16366  /* "View.MemoryView":1152
16367  * cdef Py_ssize_t dst_stride = dst_strides[0]
16368  *
16369  * if ndim == 1: # <<<<<<<<<<<<<<
16370  * if (src_stride > 0 and dst_stride > 0 and
16371  * <size_t> src_stride == itemsize == <size_t> dst_stride):
16372  */
16373  goto __pyx_L3;
16374  }
16375 
16376  /* "View.MemoryView":1162
16377  * dst_data += dst_stride
16378  * else:
16379  * for i in range(dst_extent): # <<<<<<<<<<<<<<
16380  * _copy_strided_to_strided(src_data, src_strides + 1,
16381  * dst_data, dst_strides + 1,
16382  */
16383  /*else*/ {
16384  __pyx_t_4 = __pyx_v_dst_extent;
16385  __pyx_t_5 = __pyx_t_4;
16386  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
16387  __pyx_v_i = __pyx_t_6;
16388 
16389  /* "View.MemoryView":1163
16390  * else:
16391  * for i in range(dst_extent):
16392  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
16393  * dst_data, dst_strides + 1,
16394  * src_shape + 1, dst_shape + 1,
16395  */
16396  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
16397 
16398  /* "View.MemoryView":1167
16399  * src_shape + 1, dst_shape + 1,
16400  * ndim - 1, itemsize)
16401  * src_data += src_stride # <<<<<<<<<<<<<<
16402  * dst_data += dst_stride
16403  *
16404  */
16405  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
16406 
16407  /* "View.MemoryView":1168
16408  * ndim - 1, itemsize)
16409  * src_data += src_stride
16410  * dst_data += dst_stride # <<<<<<<<<<<<<<
16411  *
16412  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
16413  */
16414  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
16415  }
16416  }
16417  __pyx_L3:;
16418 
16419  /* "View.MemoryView":1140
16420  *
16421  * @cython.cdivision(True)
16422  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
16423  * char *dst_data, Py_ssize_t *dst_strides,
16424  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
16425  */
16426 
16427  /* function exit code */
16428 }
16429 
16430 /* "View.MemoryView":1170
16431  * dst_data += dst_stride
16432  *
16433  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16434  * __Pyx_memviewslice *dst,
16435  * int ndim, size_t itemsize) nogil:
16436  */
16437 
16438 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
16439 
16440  /* "View.MemoryView":1173
16441  * __Pyx_memviewslice *dst,
16442  * int ndim, size_t itemsize) nogil:
16443  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
16444  * src.shape, dst.shape, ndim, itemsize)
16445  *
16446  */
16447  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
16448 
16449  /* "View.MemoryView":1170
16450  * dst_data += dst_stride
16451  *
16452  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16453  * __Pyx_memviewslice *dst,
16454  * int ndim, size_t itemsize) nogil:
16455  */
16456 
16457  /* function exit code */
16458 }
16459 
16460 /* "View.MemoryView":1177
16461  *
16462  * @cname('__pyx_memoryview_slice_get_size')
16463  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
16464  * "Return the size of the memory occupied by the slice in number of bytes"
16465  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
16466  */
16467 
16468 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
16469  Py_ssize_t __pyx_v_shape;
16470  Py_ssize_t __pyx_v_size;
16471  Py_ssize_t __pyx_r;
16472  Py_ssize_t __pyx_t_1;
16473  Py_ssize_t *__pyx_t_2;
16474  Py_ssize_t *__pyx_t_3;
16475  Py_ssize_t *__pyx_t_4;
16476 
16477  /* "View.MemoryView":1179
16478  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
16479  * "Return the size of the memory occupied by the slice in number of bytes"
16480  * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
16481  *
16482  * for shape in src.shape[:ndim]:
16483  */
16484  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
16485  __pyx_v_size = __pyx_t_1;
16486 
16487  /* "View.MemoryView":1181
16488  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
16489  *
16490  * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
16491  * size *= shape
16492  *
16493  */
16494  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
16495  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
16496  __pyx_t_2 = __pyx_t_4;
16497  __pyx_v_shape = (__pyx_t_2[0]);
16498 
16499  /* "View.MemoryView":1182
16500  *
16501  * for shape in src.shape[:ndim]:
16502  * size *= shape # <<<<<<<<<<<<<<
16503  *
16504  * return size
16505  */
16506  __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
16507  }
16508 
16509  /* "View.MemoryView":1184
16510  * size *= shape
16511  *
16512  * return size # <<<<<<<<<<<<<<
16513  *
16514  * @cname('__pyx_fill_contig_strides_array')
16515  */
16516  __pyx_r = __pyx_v_size;
16517  goto __pyx_L0;
16518 
16519  /* "View.MemoryView":1177
16520  *
16521  * @cname('__pyx_memoryview_slice_get_size')
16522  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
16523  * "Return the size of the memory occupied by the slice in number of bytes"
16524  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
16525  */
16526 
16527  /* function exit code */
16528  __pyx_L0:;
16529  return __pyx_r;
16530 }
16531 
16532 /* "View.MemoryView":1187
16533  *
16534  * @cname('__pyx_fill_contig_strides_array')
16535  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
16536  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
16537  * int ndim, char order) nogil:
16538  */
16539 
16540 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
16541  int __pyx_v_idx;
16542  Py_ssize_t __pyx_r;
16543  int __pyx_t_1;
16544  int __pyx_t_2;
16545  int __pyx_t_3;
16546  int __pyx_t_4;
16547 
16548  /* "View.MemoryView":1196
16549  * cdef int idx
16550  *
16551  * if order == 'F': # <<<<<<<<<<<<<<
16552  * for idx in range(ndim):
16553  * strides[idx] = stride
16554  */
16555  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
16556  if (__pyx_t_1) {
16557 
16558  /* "View.MemoryView":1197
16559  *
16560  * if order == 'F':
16561  * for idx in range(ndim): # <<<<<<<<<<<<<<
16562  * strides[idx] = stride
16563  * stride *= shape[idx]
16564  */
16565  __pyx_t_2 = __pyx_v_ndim;
16566  __pyx_t_3 = __pyx_t_2;
16567  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16568  __pyx_v_idx = __pyx_t_4;
16569 
16570  /* "View.MemoryView":1198
16571  * if order == 'F':
16572  * for idx in range(ndim):
16573  * strides[idx] = stride # <<<<<<<<<<<<<<
16574  * stride *= shape[idx]
16575  * else:
16576  */
16577  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
16578 
16579  /* "View.MemoryView":1199
16580  * for idx in range(ndim):
16581  * strides[idx] = stride
16582  * stride *= shape[idx] # <<<<<<<<<<<<<<
16583  * else:
16584  * for idx in range(ndim - 1, -1, -1):
16585  */
16586  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
16587  }
16588 
16589  /* "View.MemoryView":1196
16590  * cdef int idx
16591  *
16592  * if order == 'F': # <<<<<<<<<<<<<<
16593  * for idx in range(ndim):
16594  * strides[idx] = stride
16595  */
16596  goto __pyx_L3;
16597  }
16598 
16599  /* "View.MemoryView":1201
16600  * stride *= shape[idx]
16601  * else:
16602  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
16603  * strides[idx] = stride
16604  * stride *= shape[idx]
16605  */
16606  /*else*/ {
16607  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
16608  __pyx_v_idx = __pyx_t_2;
16609 
16610  /* "View.MemoryView":1202
16611  * else:
16612  * for idx in range(ndim - 1, -1, -1):
16613  * strides[idx] = stride # <<<<<<<<<<<<<<
16614  * stride *= shape[idx]
16615  *
16616  */
16617  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
16618 
16619  /* "View.MemoryView":1203
16620  * for idx in range(ndim - 1, -1, -1):
16621  * strides[idx] = stride
16622  * stride *= shape[idx] # <<<<<<<<<<<<<<
16623  *
16624  * return stride
16625  */
16626  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
16627  }
16628  }
16629  __pyx_L3:;
16630 
16631  /* "View.MemoryView":1205
16632  * stride *= shape[idx]
16633  *
16634  * return stride # <<<<<<<<<<<<<<
16635  *
16636  * @cname('__pyx_memoryview_copy_data_to_temp')
16637  */
16638  __pyx_r = __pyx_v_stride;
16639  goto __pyx_L0;
16640 
16641  /* "View.MemoryView":1187
16642  *
16643  * @cname('__pyx_fill_contig_strides_array')
16644  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
16645  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
16646  * int ndim, char order) nogil:
16647  */
16648 
16649  /* function exit code */
16650  __pyx_L0:;
16651  return __pyx_r;
16652 }
16653 
16654 /* "View.MemoryView":1208
16655  *
16656  * @cname('__pyx_memoryview_copy_data_to_temp')
16657  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16658  * __Pyx_memviewslice *tmpslice,
16659  * char order,
16660  */
16661 
16662 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
16663  int __pyx_v_i;
16664  void *__pyx_v_result;
16665  size_t __pyx_v_itemsize;
16666  size_t __pyx_v_size;
16667  void *__pyx_r;
16668  Py_ssize_t __pyx_t_1;
16669  int __pyx_t_2;
16670  int __pyx_t_3;
16671  struct __pyx_memoryview_obj *__pyx_t_4;
16672  int __pyx_t_5;
16673  int __pyx_t_6;
16674  int __pyx_lineno = 0;
16675  const char *__pyx_filename = NULL;
16676  int __pyx_clineno = 0;
16677 
16678  /* "View.MemoryView":1219
16679  * cdef void *result
16680  *
16681  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
16682  * cdef size_t size = slice_get_size(src, ndim)
16683  *
16684  */
16685  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
16686  __pyx_v_itemsize = __pyx_t_1;
16687 
16688  /* "View.MemoryView":1220
16689  *
16690  * cdef size_t itemsize = src.memview.view.itemsize
16691  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
16692  *
16693  * result = malloc(size)
16694  */
16695  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
16696 
16697  /* "View.MemoryView":1222
16698  * cdef size_t size = slice_get_size(src, ndim)
16699  *
16700  * result = malloc(size) # <<<<<<<<<<<<<<
16701  * if not result:
16702  * _err(MemoryError, NULL)
16703  */
16704  __pyx_v_result = malloc(__pyx_v_size);
16705 
16706  /* "View.MemoryView":1223
16707  *
16708  * result = malloc(size)
16709  * if not result: # <<<<<<<<<<<<<<
16710  * _err(MemoryError, NULL)
16711  *
16712  */
16713  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
16714  if (__pyx_t_2) {
16715 
16716  /* "View.MemoryView":1224
16717  * result = malloc(size)
16718  * if not result:
16719  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
16720  *
16721  *
16722  */
16723  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1224, __pyx_L1_error)
16724 
16725  /* "View.MemoryView":1223
16726  *
16727  * result = malloc(size)
16728  * if not result: # <<<<<<<<<<<<<<
16729  * _err(MemoryError, NULL)
16730  *
16731  */
16732  }
16733 
16734  /* "View.MemoryView":1227
16735  *
16736  *
16737  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
16738  * tmpslice.memview = src.memview
16739  * for i in range(ndim):
16740  */
16741  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
16742 
16743  /* "View.MemoryView":1228
16744  *
16745  * tmpslice.data = <char *> result
16746  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
16747  * for i in range(ndim):
16748  * tmpslice.shape[i] = src.shape[i]
16749  */
16750  __pyx_t_4 = __pyx_v_src->memview;
16751  __pyx_v_tmpslice->memview = __pyx_t_4;
16752 
16753  /* "View.MemoryView":1229
16754  * tmpslice.data = <char *> result
16755  * tmpslice.memview = src.memview
16756  * for i in range(ndim): # <<<<<<<<<<<<<<
16757  * tmpslice.shape[i] = src.shape[i]
16758  * tmpslice.suboffsets[i] = -1
16759  */
16760  __pyx_t_3 = __pyx_v_ndim;
16761  __pyx_t_5 = __pyx_t_3;
16762  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
16763  __pyx_v_i = __pyx_t_6;
16764 
16765  /* "View.MemoryView":1230
16766  * tmpslice.memview = src.memview
16767  * for i in range(ndim):
16768  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
16769  * tmpslice.suboffsets[i] = -1
16770  *
16771  */
16772  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
16773 
16774  /* "View.MemoryView":1231
16775  * for i in range(ndim):
16776  * tmpslice.shape[i] = src.shape[i]
16777  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
16778  *
16779  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
16780  */
16781  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
16782  }
16783 
16784  /* "View.MemoryView":1233
16785  * tmpslice.suboffsets[i] = -1
16786  *
16787  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
16788  * ndim, order)
16789  *
16790  */
16791  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
16792 
16793  /* "View.MemoryView":1237
16794  *
16795  *
16796  * for i in range(ndim): # <<<<<<<<<<<<<<
16797  * if tmpslice.shape[i] == 1:
16798  * tmpslice.strides[i] = 0
16799  */
16800  __pyx_t_3 = __pyx_v_ndim;
16801  __pyx_t_5 = __pyx_t_3;
16802  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
16803  __pyx_v_i = __pyx_t_6;
16804 
16805  /* "View.MemoryView":1238
16806  *
16807  * for i in range(ndim):
16808  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
16809  * tmpslice.strides[i] = 0
16810  *
16811  */
16812  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
16813  if (__pyx_t_2) {
16814 
16815  /* "View.MemoryView":1239
16816  * for i in range(ndim):
16817  * if tmpslice.shape[i] == 1:
16818  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
16819  *
16820  * if slice_is_contig(src[0], order, ndim):
16821  */
16822  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
16823 
16824  /* "View.MemoryView":1238
16825  *
16826  * for i in range(ndim):
16827  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
16828  * tmpslice.strides[i] = 0
16829  *
16830  */
16831  }
16832  }
16833 
16834  /* "View.MemoryView":1241
16835  * tmpslice.strides[i] = 0
16836  *
16837  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
16838  * memcpy(result, src.data, size)
16839  * else:
16840  */
16841  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
16842  if (__pyx_t_2) {
16843 
16844  /* "View.MemoryView":1242
16845  *
16846  * if slice_is_contig(src[0], order, ndim):
16847  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
16848  * else:
16849  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
16850  */
16851  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
16852 
16853  /* "View.MemoryView":1241
16854  * tmpslice.strides[i] = 0
16855  *
16856  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
16857  * memcpy(result, src.data, size)
16858  * else:
16859  */
16860  goto __pyx_L9;
16861  }
16862 
16863  /* "View.MemoryView":1244
16864  * memcpy(result, src.data, size)
16865  * else:
16866  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
16867  *
16868  * return result
16869  */
16870  /*else*/ {
16871  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
16872  }
16873  __pyx_L9:;
16874 
16875  /* "View.MemoryView":1246
16876  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
16877  *
16878  * return result # <<<<<<<<<<<<<<
16879  *
16880  *
16881  */
16882  __pyx_r = __pyx_v_result;
16883  goto __pyx_L0;
16884 
16885  /* "View.MemoryView":1208
16886  *
16887  * @cname('__pyx_memoryview_copy_data_to_temp')
16888  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16889  * __Pyx_memviewslice *tmpslice,
16890  * char order,
16891  */
16892 
16893  /* function exit code */
16894  __pyx_L1_error:;
16895  {
16896  #ifdef WITH_THREAD
16897  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
16898  #endif
16899  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
16900  #ifdef WITH_THREAD
16901  __Pyx_PyGILState_Release(__pyx_gilstate_save);
16902  #endif
16903  }
16904  __pyx_r = NULL;
16905  __pyx_L0:;
16906  return __pyx_r;
16907 }
16908 
16909 /* "View.MemoryView":1251
16910  *
16911  * @cname('__pyx_memoryview_err_extents')
16912  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
16913  * Py_ssize_t extent2) except -1 with gil:
16914  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
16915  */
16916 
16917 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
16918  int __pyx_r;
16919  __Pyx_RefNannyDeclarations
16920  PyObject *__pyx_t_1 = NULL;
16921  PyObject *__pyx_t_2 = NULL;
16922  PyObject *__pyx_t_3 = NULL;
16923  PyObject *__pyx_t_4 = NULL;
16924  int __pyx_lineno = 0;
16925  const char *__pyx_filename = NULL;
16926  int __pyx_clineno = 0;
16927  #ifdef WITH_THREAD
16928  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
16929  #endif
16930  __Pyx_RefNannySetupContext("_err_extents", 0);
16931 
16932  /* "View.MemoryView":1254
16933  * Py_ssize_t extent2) except -1 with gil:
16934  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
16935  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
16936  *
16937  * @cname('__pyx_memoryview_err_dim')
16938  */
16939  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
16940  __Pyx_GOTREF(__pyx_t_1);
16941  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
16942  __Pyx_GOTREF(__pyx_t_2);
16943  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
16944  __Pyx_GOTREF(__pyx_t_3);
16945  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
16946  __Pyx_GOTREF(__pyx_t_4);
16947  __Pyx_GIVEREF(__pyx_t_1);
16948  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
16949  __Pyx_GIVEREF(__pyx_t_2);
16950  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
16951  __Pyx_GIVEREF(__pyx_t_3);
16952  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
16953  __pyx_t_1 = 0;
16954  __pyx_t_2 = 0;
16955  __pyx_t_3 = 0;
16956 
16957  /* "View.MemoryView":1253
16958  * cdef int _err_extents(int i, Py_ssize_t extent1,
16959  * Py_ssize_t extent2) except -1 with gil:
16960  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
16961  * (i, extent1, extent2))
16962  *
16963  */
16964  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
16965  __Pyx_GOTREF(__pyx_t_3);
16966  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16967  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error)
16968  __Pyx_GOTREF(__pyx_t_4);
16969  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16970  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
16971  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16972  __PYX_ERR(0, 1253, __pyx_L1_error)
16973 
16974  /* "View.MemoryView":1251
16975  *
16976  * @cname('__pyx_memoryview_err_extents')
16977  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
16978  * Py_ssize_t extent2) except -1 with gil:
16979  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
16980  */
16981 
16982  /* function exit code */
16983  __pyx_L1_error:;
16984  __Pyx_XDECREF(__pyx_t_1);
16985  __Pyx_XDECREF(__pyx_t_2);
16986  __Pyx_XDECREF(__pyx_t_3);
16987  __Pyx_XDECREF(__pyx_t_4);
16988  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
16989  __pyx_r = -1;
16990  __Pyx_RefNannyFinishContext();
16991  #ifdef WITH_THREAD
16992  __Pyx_PyGILState_Release(__pyx_gilstate_save);
16993  #endif
16994  return __pyx_r;
16995 }
16996 
16997 /* "View.MemoryView":1257
16998  *
16999  * @cname('__pyx_memoryview_err_dim')
17000  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
17001  * raise error(msg.decode('ascii') % dim)
17002  *
17003  */
17004 
17005 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
17006  int __pyx_r;
17007  __Pyx_RefNannyDeclarations
17008  PyObject *__pyx_t_1 = NULL;
17009  PyObject *__pyx_t_2 = NULL;
17010  PyObject *__pyx_t_3 = NULL;
17011  PyObject *__pyx_t_4 = NULL;
17012  int __pyx_lineno = 0;
17013  const char *__pyx_filename = NULL;
17014  int __pyx_clineno = 0;
17015  #ifdef WITH_THREAD
17016  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17017  #endif
17018  __Pyx_RefNannySetupContext("_err_dim", 0);
17019  __Pyx_INCREF(__pyx_v_error);
17020 
17021  /* "View.MemoryView":1258
17022  * @cname('__pyx_memoryview_err_dim')
17023  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
17024  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
17025  *
17026  * @cname('__pyx_memoryview_err')
17027  */
17028  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
17029  __Pyx_GOTREF(__pyx_t_2);
17030  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
17031  __Pyx_GOTREF(__pyx_t_3);
17032  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
17033  __Pyx_GOTREF(__pyx_t_4);
17034  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17035  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17036  __Pyx_INCREF(__pyx_v_error);
17037  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
17038  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
17039  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
17040  if (likely(__pyx_t_2)) {
17041  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17042  __Pyx_INCREF(__pyx_t_2);
17043  __Pyx_INCREF(function);
17044  __Pyx_DECREF_SET(__pyx_t_3, function);
17045  }
17046  }
17047  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
17048  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
17049  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17050  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
17051  __Pyx_GOTREF(__pyx_t_1);
17052  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17053  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
17054  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17055  __PYX_ERR(0, 1258, __pyx_L1_error)
17056 
17057  /* "View.MemoryView":1257
17058  *
17059  * @cname('__pyx_memoryview_err_dim')
17060  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
17061  * raise error(msg.decode('ascii') % dim)
17062  *
17063  */
17064 
17065  /* function exit code */
17066  __pyx_L1_error:;
17067  __Pyx_XDECREF(__pyx_t_1);
17068  __Pyx_XDECREF(__pyx_t_2);
17069  __Pyx_XDECREF(__pyx_t_3);
17070  __Pyx_XDECREF(__pyx_t_4);
17071  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
17072  __pyx_r = -1;
17073  __Pyx_XDECREF(__pyx_v_error);
17074  __Pyx_RefNannyFinishContext();
17075  #ifdef WITH_THREAD
17076  __Pyx_PyGILState_Release(__pyx_gilstate_save);
17077  #endif
17078  return __pyx_r;
17079 }
17080 
17081 /* "View.MemoryView":1261
17082  *
17083  * @cname('__pyx_memoryview_err')
17084  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
17085  * if msg != NULL:
17086  * raise error(msg.decode('ascii'))
17087  */
17088 
17089 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
17090  int __pyx_r;
17091  __Pyx_RefNannyDeclarations
17092  int __pyx_t_1;
17093  PyObject *__pyx_t_2 = NULL;
17094  PyObject *__pyx_t_3 = NULL;
17095  PyObject *__pyx_t_4 = NULL;
17096  PyObject *__pyx_t_5 = NULL;
17097  int __pyx_lineno = 0;
17098  const char *__pyx_filename = NULL;
17099  int __pyx_clineno = 0;
17100  #ifdef WITH_THREAD
17101  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17102  #endif
17103  __Pyx_RefNannySetupContext("_err", 0);
17104  __Pyx_INCREF(__pyx_v_error);
17105 
17106  /* "View.MemoryView":1262
17107  * @cname('__pyx_memoryview_err')
17108  * cdef int _err(object error, char *msg) except -1 with gil:
17109  * if msg != NULL: # <<<<<<<<<<<<<<
17110  * raise error(msg.decode('ascii'))
17111  * else:
17112  */
17113  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
17114  if (unlikely(__pyx_t_1)) {
17115 
17116  /* "View.MemoryView":1263
17117  * cdef int _err(object error, char *msg) except -1 with gil:
17118  * if msg != NULL:
17119  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
17120  * else:
17121  * raise error
17122  */
17123  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
17124  __Pyx_GOTREF(__pyx_t_3);
17125  __Pyx_INCREF(__pyx_v_error);
17126  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
17127  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
17128  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
17129  if (likely(__pyx_t_5)) {
17130  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
17131  __Pyx_INCREF(__pyx_t_5);
17132  __Pyx_INCREF(function);
17133  __Pyx_DECREF_SET(__pyx_t_4, function);
17134  }
17135  }
17136  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
17137  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17138  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17139  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error)
17140  __Pyx_GOTREF(__pyx_t_2);
17141  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17142  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17143  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17144  __PYX_ERR(0, 1263, __pyx_L1_error)
17145 
17146  /* "View.MemoryView":1262
17147  * @cname('__pyx_memoryview_err')
17148  * cdef int _err(object error, char *msg) except -1 with gil:
17149  * if msg != NULL: # <<<<<<<<<<<<<<
17150  * raise error(msg.decode('ascii'))
17151  * else:
17152  */
17153  }
17154 
17155  /* "View.MemoryView":1265
17156  * raise error(msg.decode('ascii'))
17157  * else:
17158  * raise error # <<<<<<<<<<<<<<
17159  *
17160  * @cname('__pyx_memoryview_copy_contents')
17161  */
17162  /*else*/ {
17163  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
17164  __PYX_ERR(0, 1265, __pyx_L1_error)
17165  }
17166 
17167  /* "View.MemoryView":1261
17168  *
17169  * @cname('__pyx_memoryview_err')
17170  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
17171  * if msg != NULL:
17172  * raise error(msg.decode('ascii'))
17173  */
17174 
17175  /* function exit code */
17176  __pyx_L1_error:;
17177  __Pyx_XDECREF(__pyx_t_2);
17178  __Pyx_XDECREF(__pyx_t_3);
17179  __Pyx_XDECREF(__pyx_t_4);
17180  __Pyx_XDECREF(__pyx_t_5);
17181  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
17182  __pyx_r = -1;
17183  __Pyx_XDECREF(__pyx_v_error);
17184  __Pyx_RefNannyFinishContext();
17185  #ifdef WITH_THREAD
17186  __Pyx_PyGILState_Release(__pyx_gilstate_save);
17187  #endif
17188  return __pyx_r;
17189 }
17190 
17191 /* "View.MemoryView":1268
17192  *
17193  * @cname('__pyx_memoryview_copy_contents')
17194  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
17195  * __Pyx_memviewslice dst,
17196  * int src_ndim, int dst_ndim,
17197  */
17198 
17199 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
17200  void *__pyx_v_tmpdata;
17201  size_t __pyx_v_itemsize;
17202  int __pyx_v_i;
17203  char __pyx_v_order;
17204  int __pyx_v_broadcasting;
17205  int __pyx_v_direct_copy;
17206  __Pyx_memviewslice __pyx_v_tmp;
17207  int __pyx_v_ndim;
17208  int __pyx_r;
17209  Py_ssize_t __pyx_t_1;
17210  int __pyx_t_2;
17211  int __pyx_t_3;
17212  int __pyx_t_4;
17213  int __pyx_t_5;
17214  int __pyx_t_6;
17215  void *__pyx_t_7;
17216  int __pyx_t_8;
17217  int __pyx_lineno = 0;
17218  const char *__pyx_filename = NULL;
17219  int __pyx_clineno = 0;
17220 
17221  /* "View.MemoryView":1276
17222  * Check for overlapping memory and verify the shapes.
17223  * """
17224  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
17225  * cdef size_t itemsize = src.memview.view.itemsize
17226  * cdef int i
17227  */
17228  __pyx_v_tmpdata = NULL;
17229 
17230  /* "View.MemoryView":1277
17231  * """
17232  * cdef void *tmpdata = NULL
17233  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
17234  * cdef int i
17235  * cdef char order = get_best_order(&src, src_ndim)
17236  */
17237  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
17238  __pyx_v_itemsize = __pyx_t_1;
17239 
17240  /* "View.MemoryView":1279
17241  * cdef size_t itemsize = src.memview.view.itemsize
17242  * cdef int i
17243  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
17244  * cdef bint broadcasting = False
17245  * cdef bint direct_copy = False
17246  */
17247  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
17248 
17249  /* "View.MemoryView":1280
17250  * cdef int i
17251  * cdef char order = get_best_order(&src, src_ndim)
17252  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
17253  * cdef bint direct_copy = False
17254  * cdef __Pyx_memviewslice tmp
17255  */
17256  __pyx_v_broadcasting = 0;
17257 
17258  /* "View.MemoryView":1281
17259  * cdef char order = get_best_order(&src, src_ndim)
17260  * cdef bint broadcasting = False
17261  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
17262  * cdef __Pyx_memviewslice tmp
17263  *
17264  */
17265  __pyx_v_direct_copy = 0;
17266 
17267  /* "View.MemoryView":1284
17268  * cdef __Pyx_memviewslice tmp
17269  *
17270  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
17271  * broadcast_leading(&src, src_ndim, dst_ndim)
17272  * elif dst_ndim < src_ndim:
17273  */
17274  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
17275  if (__pyx_t_2) {
17276 
17277  /* "View.MemoryView":1285
17278  *
17279  * if src_ndim < dst_ndim:
17280  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
17281  * elif dst_ndim < src_ndim:
17282  * broadcast_leading(&dst, dst_ndim, src_ndim)
17283  */
17284  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
17285 
17286  /* "View.MemoryView":1284
17287  * cdef __Pyx_memviewslice tmp
17288  *
17289  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
17290  * broadcast_leading(&src, src_ndim, dst_ndim)
17291  * elif dst_ndim < src_ndim:
17292  */
17293  goto __pyx_L3;
17294  }
17295 
17296  /* "View.MemoryView":1286
17297  * if src_ndim < dst_ndim:
17298  * broadcast_leading(&src, src_ndim, dst_ndim)
17299  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
17300  * broadcast_leading(&dst, dst_ndim, src_ndim)
17301  *
17302  */
17303  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
17304  if (__pyx_t_2) {
17305 
17306  /* "View.MemoryView":1287
17307  * broadcast_leading(&src, src_ndim, dst_ndim)
17308  * elif dst_ndim < src_ndim:
17309  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
17310  *
17311  * cdef int ndim = max(src_ndim, dst_ndim)
17312  */
17313  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
17314 
17315  /* "View.MemoryView":1286
17316  * if src_ndim < dst_ndim:
17317  * broadcast_leading(&src, src_ndim, dst_ndim)
17318  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
17319  * broadcast_leading(&dst, dst_ndim, src_ndim)
17320  *
17321  */
17322  }
17323  __pyx_L3:;
17324 
17325  /* "View.MemoryView":1289
17326  * broadcast_leading(&dst, dst_ndim, src_ndim)
17327  *
17328  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
17329  *
17330  * for i in range(ndim):
17331  */
17332  __pyx_t_3 = __pyx_v_dst_ndim;
17333  __pyx_t_4 = __pyx_v_src_ndim;
17334  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
17335  __pyx_t_5 = __pyx_t_3;
17336  } else {
17337  __pyx_t_5 = __pyx_t_4;
17338  }
17339  __pyx_v_ndim = __pyx_t_5;
17340 
17341  /* "View.MemoryView":1291
17342  * cdef int ndim = max(src_ndim, dst_ndim)
17343  *
17344  * for i in range(ndim): # <<<<<<<<<<<<<<
17345  * if src.shape[i] != dst.shape[i]:
17346  * if src.shape[i] == 1:
17347  */
17348  __pyx_t_5 = __pyx_v_ndim;
17349  __pyx_t_3 = __pyx_t_5;
17350  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17351  __pyx_v_i = __pyx_t_4;
17352 
17353  /* "View.MemoryView":1292
17354  *
17355  * for i in range(ndim):
17356  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
17357  * if src.shape[i] == 1:
17358  * broadcasting = True
17359  */
17360  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
17361  if (__pyx_t_2) {
17362 
17363  /* "View.MemoryView":1293
17364  * for i in range(ndim):
17365  * if src.shape[i] != dst.shape[i]:
17366  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
17367  * broadcasting = True
17368  * src.strides[i] = 0
17369  */
17370  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
17371  if (__pyx_t_2) {
17372 
17373  /* "View.MemoryView":1294
17374  * if src.shape[i] != dst.shape[i]:
17375  * if src.shape[i] == 1:
17376  * broadcasting = True # <<<<<<<<<<<<<<
17377  * src.strides[i] = 0
17378  * else:
17379  */
17380  __pyx_v_broadcasting = 1;
17381 
17382  /* "View.MemoryView":1295
17383  * if src.shape[i] == 1:
17384  * broadcasting = True
17385  * src.strides[i] = 0 # <<<<<<<<<<<<<<
17386  * else:
17387  * _err_extents(i, dst.shape[i], src.shape[i])
17388  */
17389  (__pyx_v_src.strides[__pyx_v_i]) = 0;
17390 
17391  /* "View.MemoryView":1293
17392  * for i in range(ndim):
17393  * if src.shape[i] != dst.shape[i]:
17394  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
17395  * broadcasting = True
17396  * src.strides[i] = 0
17397  */
17398  goto __pyx_L7;
17399  }
17400 
17401  /* "View.MemoryView":1297
17402  * src.strides[i] = 0
17403  * else:
17404  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
17405  *
17406  * if src.suboffsets[i] >= 0:
17407  */
17408  /*else*/ {
17409  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error)
17410  }
17411  __pyx_L7:;
17412 
17413  /* "View.MemoryView":1292
17414  *
17415  * for i in range(ndim):
17416  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
17417  * if src.shape[i] == 1:
17418  * broadcasting = True
17419  */
17420  }
17421 
17422  /* "View.MemoryView":1299
17423  * _err_extents(i, dst.shape[i], src.shape[i])
17424  *
17425  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
17426  * _err_dim(ValueError, "Dimension %d is not direct", i)
17427  *
17428  */
17429  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
17430  if (__pyx_t_2) {
17431 
17432  /* "View.MemoryView":1300
17433  *
17434  * if src.suboffsets[i] >= 0:
17435  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
17436  *
17437  * if slices_overlap(&src, &dst, ndim, itemsize):
17438  */
17439  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1300, __pyx_L1_error)
17440 
17441  /* "View.MemoryView":1299
17442  * _err_extents(i, dst.shape[i], src.shape[i])
17443  *
17444  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
17445  * _err_dim(ValueError, "Dimension %d is not direct", i)
17446  *
17447  */
17448  }
17449  }
17450 
17451  /* "View.MemoryView":1302
17452  * _err_dim(ValueError, "Dimension %d is not direct", i)
17453  *
17454  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
17455  *
17456  * if not slice_is_contig(src, order, ndim):
17457  */
17458  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
17459  if (__pyx_t_2) {
17460 
17461  /* "View.MemoryView":1304
17462  * if slices_overlap(&src, &dst, ndim, itemsize):
17463  *
17464  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
17465  * order = get_best_order(&dst, ndim)
17466  *
17467  */
17468  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
17469  if (__pyx_t_2) {
17470 
17471  /* "View.MemoryView":1305
17472  *
17473  * if not slice_is_contig(src, order, ndim):
17474  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
17475  *
17476  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
17477  */
17478  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
17479 
17480  /* "View.MemoryView":1304
17481  * if slices_overlap(&src, &dst, ndim, itemsize):
17482  *
17483  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
17484  * order = get_best_order(&dst, ndim)
17485  *
17486  */
17487  }
17488 
17489  /* "View.MemoryView":1307
17490  * order = get_best_order(&dst, ndim)
17491  *
17492  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
17493  * src = tmp
17494  *
17495  */
17496  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1307, __pyx_L1_error)
17497  __pyx_v_tmpdata = __pyx_t_7;
17498 
17499  /* "View.MemoryView":1308
17500  *
17501  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
17502  * src = tmp # <<<<<<<<<<<<<<
17503  *
17504  * if not broadcasting:
17505  */
17506  __pyx_v_src = __pyx_v_tmp;
17507 
17508  /* "View.MemoryView":1302
17509  * _err_dim(ValueError, "Dimension %d is not direct", i)
17510  *
17511  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
17512  *
17513  * if not slice_is_contig(src, order, ndim):
17514  */
17515  }
17516 
17517  /* "View.MemoryView":1310
17518  * src = tmp
17519  *
17520  * if not broadcasting: # <<<<<<<<<<<<<<
17521  *
17522  *
17523  */
17524  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
17525  if (__pyx_t_2) {
17526 
17527  /* "View.MemoryView":1313
17528  *
17529  *
17530  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
17531  * direct_copy = slice_is_contig(dst, 'C', ndim)
17532  * elif slice_is_contig(src, 'F', ndim):
17533  */
17534  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
17535  if (__pyx_t_2) {
17536 
17537  /* "View.MemoryView":1314
17538  *
17539  * if slice_is_contig(src, 'C', ndim):
17540  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
17541  * elif slice_is_contig(src, 'F', ndim):
17542  * direct_copy = slice_is_contig(dst, 'F', ndim)
17543  */
17544  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
17545 
17546  /* "View.MemoryView":1313
17547  *
17548  *
17549  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
17550  * direct_copy = slice_is_contig(dst, 'C', ndim)
17551  * elif slice_is_contig(src, 'F', ndim):
17552  */
17553  goto __pyx_L12;
17554  }
17555 
17556  /* "View.MemoryView":1315
17557  * if slice_is_contig(src, 'C', ndim):
17558  * direct_copy = slice_is_contig(dst, 'C', ndim)
17559  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
17560  * direct_copy = slice_is_contig(dst, 'F', ndim)
17561  *
17562  */
17563  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
17564  if (__pyx_t_2) {
17565 
17566  /* "View.MemoryView":1316
17567  * direct_copy = slice_is_contig(dst, 'C', ndim)
17568  * elif slice_is_contig(src, 'F', ndim):
17569  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
17570  *
17571  * if direct_copy:
17572  */
17573  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
17574 
17575  /* "View.MemoryView":1315
17576  * if slice_is_contig(src, 'C', ndim):
17577  * direct_copy = slice_is_contig(dst, 'C', ndim)
17578  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
17579  * direct_copy = slice_is_contig(dst, 'F', ndim)
17580  *
17581  */
17582  }
17583  __pyx_L12:;
17584 
17585  /* "View.MemoryView":1318
17586  * direct_copy = slice_is_contig(dst, 'F', ndim)
17587  *
17588  * if direct_copy: # <<<<<<<<<<<<<<
17589  *
17590  * refcount_copying(&dst, dtype_is_object, ndim, False)
17591  */
17592  __pyx_t_2 = (__pyx_v_direct_copy != 0);
17593  if (__pyx_t_2) {
17594 
17595  /* "View.MemoryView":1320
17596  * if direct_copy:
17597  *
17598  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
17599  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
17600  * refcount_copying(&dst, dtype_is_object, ndim, True)
17601  */
17602  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
17603 
17604  /* "View.MemoryView":1321
17605  *
17606  * refcount_copying(&dst, dtype_is_object, ndim, False)
17607  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
17608  * refcount_copying(&dst, dtype_is_object, ndim, True)
17609  * free(tmpdata)
17610  */
17611  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
17612 
17613  /* "View.MemoryView":1322
17614  * refcount_copying(&dst, dtype_is_object, ndim, False)
17615  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
17616  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
17617  * free(tmpdata)
17618  * return 0
17619  */
17620  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
17621 
17622  /* "View.MemoryView":1323
17623  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
17624  * refcount_copying(&dst, dtype_is_object, ndim, True)
17625  * free(tmpdata) # <<<<<<<<<<<<<<
17626  * return 0
17627  *
17628  */
17629  free(__pyx_v_tmpdata);
17630 
17631  /* "View.MemoryView":1324
17632  * refcount_copying(&dst, dtype_is_object, ndim, True)
17633  * free(tmpdata)
17634  * return 0 # <<<<<<<<<<<<<<
17635  *
17636  * if order == 'F' == get_best_order(&dst, ndim):
17637  */
17638  __pyx_r = 0;
17639  goto __pyx_L0;
17640 
17641  /* "View.MemoryView":1318
17642  * direct_copy = slice_is_contig(dst, 'F', ndim)
17643  *
17644  * if direct_copy: # <<<<<<<<<<<<<<
17645  *
17646  * refcount_copying(&dst, dtype_is_object, ndim, False)
17647  */
17648  }
17649 
17650  /* "View.MemoryView":1310
17651  * src = tmp
17652  *
17653  * if not broadcasting: # <<<<<<<<<<<<<<
17654  *
17655  *
17656  */
17657  }
17658 
17659  /* "View.MemoryView":1326
17660  * return 0
17661  *
17662  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
17663  *
17664  *
17665  */
17666  __pyx_t_2 = (__pyx_v_order == 'F');
17667  if (__pyx_t_2) {
17668  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
17669  }
17670  __pyx_t_8 = (__pyx_t_2 != 0);
17671  if (__pyx_t_8) {
17672 
17673  /* "View.MemoryView":1329
17674  *
17675  *
17676  * transpose_memslice(&src) # <<<<<<<<<<<<<<
17677  * transpose_memslice(&dst)
17678  *
17679  */
17680  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1329, __pyx_L1_error)
17681 
17682  /* "View.MemoryView":1330
17683  *
17684  * transpose_memslice(&src)
17685  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
17686  *
17687  * refcount_copying(&dst, dtype_is_object, ndim, False)
17688  */
17689  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1330, __pyx_L1_error)
17690 
17691  /* "View.MemoryView":1326
17692  * return 0
17693  *
17694  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
17695  *
17696  *
17697  */
17698  }
17699 
17700  /* "View.MemoryView":1332
17701  * transpose_memslice(&dst)
17702  *
17703  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
17704  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
17705  * refcount_copying(&dst, dtype_is_object, ndim, True)
17706  */
17707  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
17708 
17709  /* "View.MemoryView":1333
17710  *
17711  * refcount_copying(&dst, dtype_is_object, ndim, False)
17712  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
17713  * refcount_copying(&dst, dtype_is_object, ndim, True)
17714  *
17715  */
17716  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
17717 
17718  /* "View.MemoryView":1334
17719  * refcount_copying(&dst, dtype_is_object, ndim, False)
17720  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
17721  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
17722  *
17723  * free(tmpdata)
17724  */
17725  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
17726 
17727  /* "View.MemoryView":1336
17728  * refcount_copying(&dst, dtype_is_object, ndim, True)
17729  *
17730  * free(tmpdata) # <<<<<<<<<<<<<<
17731  * return 0
17732  *
17733  */
17734  free(__pyx_v_tmpdata);
17735 
17736  /* "View.MemoryView":1337
17737  *
17738  * free(tmpdata)
17739  * return 0 # <<<<<<<<<<<<<<
17740  *
17741  * @cname('__pyx_memoryview_broadcast_leading')
17742  */
17743  __pyx_r = 0;
17744  goto __pyx_L0;
17745 
17746  /* "View.MemoryView":1268
17747  *
17748  * @cname('__pyx_memoryview_copy_contents')
17749  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
17750  * __Pyx_memviewslice dst,
17751  * int src_ndim, int dst_ndim,
17752  */
17753 
17754  /* function exit code */
17755  __pyx_L1_error:;
17756  {
17757  #ifdef WITH_THREAD
17758  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17759  #endif
17760  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
17761  #ifdef WITH_THREAD
17762  __Pyx_PyGILState_Release(__pyx_gilstate_save);
17763  #endif
17764  }
17765  __pyx_r = -1;
17766  __pyx_L0:;
17767  return __pyx_r;
17768 }
17769 
17770 /* "View.MemoryView":1340
17771  *
17772  * @cname('__pyx_memoryview_broadcast_leading')
17773  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
17774  * int ndim,
17775  * int ndim_other) nogil:
17776  */
17777 
17778 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
17779  int __pyx_v_i;
17780  int __pyx_v_offset;
17781  int __pyx_t_1;
17782  int __pyx_t_2;
17783  int __pyx_t_3;
17784 
17785  /* "View.MemoryView":1344
17786  * int ndim_other) nogil:
17787  * cdef int i
17788  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
17789  *
17790  * for i in range(ndim - 1, -1, -1):
17791  */
17792  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
17793 
17794  /* "View.MemoryView":1346
17795  * cdef int offset = ndim_other - ndim
17796  *
17797  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
17798  * mslice.shape[i + offset] = mslice.shape[i]
17799  * mslice.strides[i + offset] = mslice.strides[i]
17800  */
17801  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
17802  __pyx_v_i = __pyx_t_1;
17803 
17804  /* "View.MemoryView":1347
17805  *
17806  * for i in range(ndim - 1, -1, -1):
17807  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
17808  * mslice.strides[i + offset] = mslice.strides[i]
17809  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
17810  */
17811  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
17812 
17813  /* "View.MemoryView":1348
17814  * for i in range(ndim - 1, -1, -1):
17815  * mslice.shape[i + offset] = mslice.shape[i]
17816  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
17817  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
17818  *
17819  */
17820  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
17821 
17822  /* "View.MemoryView":1349
17823  * mslice.shape[i + offset] = mslice.shape[i]
17824  * mslice.strides[i + offset] = mslice.strides[i]
17825  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
17826  *
17827  * for i in range(offset):
17828  */
17829  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
17830  }
17831 
17832  /* "View.MemoryView":1351
17833  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
17834  *
17835  * for i in range(offset): # <<<<<<<<<<<<<<
17836  * mslice.shape[i] = 1
17837  * mslice.strides[i] = mslice.strides[0]
17838  */
17839  __pyx_t_1 = __pyx_v_offset;
17840  __pyx_t_2 = __pyx_t_1;
17841  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
17842  __pyx_v_i = __pyx_t_3;
17843 
17844  /* "View.MemoryView":1352
17845  *
17846  * for i in range(offset):
17847  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
17848  * mslice.strides[i] = mslice.strides[0]
17849  * mslice.suboffsets[i] = -1
17850  */
17851  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
17852 
17853  /* "View.MemoryView":1353
17854  * for i in range(offset):
17855  * mslice.shape[i] = 1
17856  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
17857  * mslice.suboffsets[i] = -1
17858  *
17859  */
17860  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
17861 
17862  /* "View.MemoryView":1354
17863  * mslice.shape[i] = 1
17864  * mslice.strides[i] = mslice.strides[0]
17865  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
17866  *
17867  *
17868  */
17869  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
17870  }
17871 
17872  /* "View.MemoryView":1340
17873  *
17874  * @cname('__pyx_memoryview_broadcast_leading')
17875  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
17876  * int ndim,
17877  * int ndim_other) nogil:
17878  */
17879 
17880  /* function exit code */
17881 }
17882 
17883 /* "View.MemoryView":1362
17884  *
17885  * @cname('__pyx_memoryview_refcount_copying')
17886  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
17887  * int ndim, bint inc) nogil:
17888  *
17889  */
17890 
17891 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
17892  int __pyx_t_1;
17893 
17894  /* "View.MemoryView":1366
17895  *
17896  *
17897  * if dtype_is_object: # <<<<<<<<<<<<<<
17898  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
17899  * dst.strides, ndim, inc)
17900  */
17901  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
17902  if (__pyx_t_1) {
17903 
17904  /* "View.MemoryView":1367
17905  *
17906  * if dtype_is_object:
17907  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
17908  * dst.strides, ndim, inc)
17909  *
17910  */
17911  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
17912 
17913  /* "View.MemoryView":1366
17914  *
17915  *
17916  * if dtype_is_object: # <<<<<<<<<<<<<<
17917  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
17918  * dst.strides, ndim, inc)
17919  */
17920  }
17921 
17922  /* "View.MemoryView":1362
17923  *
17924  * @cname('__pyx_memoryview_refcount_copying')
17925  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
17926  * int ndim, bint inc) nogil:
17927  *
17928  */
17929 
17930  /* function exit code */
17931 }
17932 
17933 /* "View.MemoryView":1371
17934  *
17935  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
17936  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
17937  * Py_ssize_t *strides, int ndim,
17938  * bint inc) with gil:
17939  */
17940 
17941 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
17942  __Pyx_RefNannyDeclarations
17943  #ifdef WITH_THREAD
17944  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17945  #endif
17946  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
17947 
17948  /* "View.MemoryView":1374
17949  * Py_ssize_t *strides, int ndim,
17950  * bint inc) with gil:
17951  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
17952  *
17953  * @cname('__pyx_memoryview_refcount_objects_in_slice')
17954  */
17955  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
17956 
17957  /* "View.MemoryView":1371
17958  *
17959  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
17960  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
17961  * Py_ssize_t *strides, int ndim,
17962  * bint inc) with gil:
17963  */
17964 
17965  /* function exit code */
17966  __Pyx_RefNannyFinishContext();
17967  #ifdef WITH_THREAD
17968  __Pyx_PyGILState_Release(__pyx_gilstate_save);
17969  #endif
17970 }
17971 
17972 /* "View.MemoryView":1377
17973  *
17974  * @cname('__pyx_memoryview_refcount_objects_in_slice')
17975  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
17976  * Py_ssize_t *strides, int ndim, bint inc):
17977  * cdef Py_ssize_t i
17978  */
17979 
17980 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
17981  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
17982  __Pyx_RefNannyDeclarations
17983  Py_ssize_t __pyx_t_1;
17984  Py_ssize_t __pyx_t_2;
17985  Py_ssize_t __pyx_t_3;
17986  int __pyx_t_4;
17987  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
17988 
17989  /* "View.MemoryView":1381
17990  * cdef Py_ssize_t i
17991  *
17992  * for i in range(shape[0]): # <<<<<<<<<<<<<<
17993  * if ndim == 1:
17994  * if inc:
17995  */
17996  __pyx_t_1 = (__pyx_v_shape[0]);
17997  __pyx_t_2 = __pyx_t_1;
17998  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
17999  __pyx_v_i = __pyx_t_3;
18000 
18001  /* "View.MemoryView":1382
18002  *
18003  * for i in range(shape[0]):
18004  * if ndim == 1: # <<<<<<<<<<<<<<
18005  * if inc:
18006  * Py_INCREF((<PyObject **> data)[0])
18007  */
18008  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
18009  if (__pyx_t_4) {
18010 
18011  /* "View.MemoryView":1383
18012  * for i in range(shape[0]):
18013  * if ndim == 1:
18014  * if inc: # <<<<<<<<<<<<<<
18015  * Py_INCREF((<PyObject **> data)[0])
18016  * else:
18017  */
18018  __pyx_t_4 = (__pyx_v_inc != 0);
18019  if (__pyx_t_4) {
18020 
18021  /* "View.MemoryView":1384
18022  * if ndim == 1:
18023  * if inc:
18024  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
18025  * else:
18026  * Py_DECREF((<PyObject **> data)[0])
18027  */
18028  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
18029 
18030  /* "View.MemoryView":1383
18031  * for i in range(shape[0]):
18032  * if ndim == 1:
18033  * if inc: # <<<<<<<<<<<<<<
18034  * Py_INCREF((<PyObject **> data)[0])
18035  * else:
18036  */
18037  goto __pyx_L6;
18038  }
18039 
18040  /* "View.MemoryView":1386
18041  * Py_INCREF((<PyObject **> data)[0])
18042  * else:
18043  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
18044  * else:
18045  * refcount_objects_in_slice(data, shape + 1, strides + 1,
18046  */
18047  /*else*/ {
18048  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
18049  }
18050  __pyx_L6:;
18051 
18052  /* "View.MemoryView":1382
18053  *
18054  * for i in range(shape[0]):
18055  * if ndim == 1: # <<<<<<<<<<<<<<
18056  * if inc:
18057  * Py_INCREF((<PyObject **> data)[0])
18058  */
18059  goto __pyx_L5;
18060  }
18061 
18062  /* "View.MemoryView":1388
18063  * Py_DECREF((<PyObject **> data)[0])
18064  * else:
18065  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
18066  * ndim - 1, inc)
18067  *
18068  */
18069  /*else*/ {
18070 
18071  /* "View.MemoryView":1389
18072  * else:
18073  * refcount_objects_in_slice(data, shape + 1, strides + 1,
18074  * ndim - 1, inc) # <<<<<<<<<<<<<<
18075  *
18076  * data += strides[0]
18077  */
18078  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
18079  }
18080  __pyx_L5:;
18081 
18082  /* "View.MemoryView":1391
18083  * ndim - 1, inc)
18084  *
18085  * data += strides[0] # <<<<<<<<<<<<<<
18086  *
18087  *
18088  */
18089  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
18090  }
18091 
18092  /* "View.MemoryView":1377
18093  *
18094  * @cname('__pyx_memoryview_refcount_objects_in_slice')
18095  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
18096  * Py_ssize_t *strides, int ndim, bint inc):
18097  * cdef Py_ssize_t i
18098  */
18099 
18100  /* function exit code */
18101  __Pyx_RefNannyFinishContext();
18102 }
18103 
18104 /* "View.MemoryView":1397
18105  *
18106  * @cname('__pyx_memoryview_slice_assign_scalar')
18107  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
18108  * size_t itemsize, void *item,
18109  * bint dtype_is_object) nogil:
18110  */
18111 
18112 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
18113 
18114  /* "View.MemoryView":1400
18115  * size_t itemsize, void *item,
18116  * bint dtype_is_object) nogil:
18117  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
18118  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
18119  * itemsize, item)
18120  */
18121  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18122 
18123  /* "View.MemoryView":1401
18124  * bint dtype_is_object) nogil:
18125  * refcount_copying(dst, dtype_is_object, ndim, False)
18126  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
18127  * itemsize, item)
18128  * refcount_copying(dst, dtype_is_object, ndim, True)
18129  */
18130  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
18131 
18132  /* "View.MemoryView":1403
18133  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
18134  * itemsize, item)
18135  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
18136  *
18137  *
18138  */
18139  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18140 
18141  /* "View.MemoryView":1397
18142  *
18143  * @cname('__pyx_memoryview_slice_assign_scalar')
18144  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
18145  * size_t itemsize, void *item,
18146  * bint dtype_is_object) nogil:
18147  */
18148 
18149  /* function exit code */
18150 }
18151 
18152 /* "View.MemoryView":1407
18153  *
18154  * @cname('__pyx_memoryview__slice_assign_scalar')
18155  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
18156  * Py_ssize_t *strides, int ndim,
18157  * size_t itemsize, void *item) nogil:
18158  */
18159 
18160 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
18161  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
18162  Py_ssize_t __pyx_v_stride;
18163  Py_ssize_t __pyx_v_extent;
18164  int __pyx_t_1;
18165  Py_ssize_t __pyx_t_2;
18166  Py_ssize_t __pyx_t_3;
18167  Py_ssize_t __pyx_t_4;
18168 
18169  /* "View.MemoryView":1411
18170  * size_t itemsize, void *item) nogil:
18171  * cdef Py_ssize_t i
18172  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
18173  * cdef Py_ssize_t extent = shape[0]
18174  *
18175  */
18176  __pyx_v_stride = (__pyx_v_strides[0]);
18177 
18178  /* "View.MemoryView":1412
18179  * cdef Py_ssize_t i
18180  * cdef Py_ssize_t stride = strides[0]
18181  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
18182  *
18183  * if ndim == 1:
18184  */
18185  __pyx_v_extent = (__pyx_v_shape[0]);
18186 
18187  /* "View.MemoryView":1414
18188  * cdef Py_ssize_t extent = shape[0]
18189  *
18190  * if ndim == 1: # <<<<<<<<<<<<<<
18191  * for i in range(extent):
18192  * memcpy(data, item, itemsize)
18193  */
18194  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
18195  if (__pyx_t_1) {
18196 
18197  /* "View.MemoryView":1415
18198  *
18199  * if ndim == 1:
18200  * for i in range(extent): # <<<<<<<<<<<<<<
18201  * memcpy(data, item, itemsize)
18202  * data += stride
18203  */
18204  __pyx_t_2 = __pyx_v_extent;
18205  __pyx_t_3 = __pyx_t_2;
18206  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18207  __pyx_v_i = __pyx_t_4;
18208 
18209  /* "View.MemoryView":1416
18210  * if ndim == 1:
18211  * for i in range(extent):
18212  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
18213  * data += stride
18214  * else:
18215  */
18216  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
18217 
18218  /* "View.MemoryView":1417
18219  * for i in range(extent):
18220  * memcpy(data, item, itemsize)
18221  * data += stride # <<<<<<<<<<<<<<
18222  * else:
18223  * for i in range(extent):
18224  */
18225  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
18226  }
18227 
18228  /* "View.MemoryView":1414
18229  * cdef Py_ssize_t extent = shape[0]
18230  *
18231  * if ndim == 1: # <<<<<<<<<<<<<<
18232  * for i in range(extent):
18233  * memcpy(data, item, itemsize)
18234  */
18235  goto __pyx_L3;
18236  }
18237 
18238  /* "View.MemoryView":1419
18239  * data += stride
18240  * else:
18241  * for i in range(extent): # <<<<<<<<<<<<<<
18242  * _slice_assign_scalar(data, shape + 1, strides + 1,
18243  * ndim - 1, itemsize, item)
18244  */
18245  /*else*/ {
18246  __pyx_t_2 = __pyx_v_extent;
18247  __pyx_t_3 = __pyx_t_2;
18248  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18249  __pyx_v_i = __pyx_t_4;
18250 
18251  /* "View.MemoryView":1420
18252  * else:
18253  * for i in range(extent):
18254  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
18255  * ndim - 1, itemsize, item)
18256  * data += stride
18257  */
18258  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
18259 
18260  /* "View.MemoryView":1422
18261  * _slice_assign_scalar(data, shape + 1, strides + 1,
18262  * ndim - 1, itemsize, item)
18263  * data += stride # <<<<<<<<<<<<<<
18264  *
18265  *
18266  */
18267  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
18268  }
18269  }
18270  __pyx_L3:;
18271 
18272  /* "View.MemoryView":1407
18273  *
18274  * @cname('__pyx_memoryview__slice_assign_scalar')
18275  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
18276  * Py_ssize_t *strides, int ndim,
18277  * size_t itemsize, void *item) nogil:
18278  */
18279 
18280  /* function exit code */
18281 }
18282 
18283 /* "(tree fragment)":1
18284  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
18285  * cdef object __pyx_PickleError
18286  * cdef object __pyx_result
18287  */
18288 
18289 /* Python wrapper */
18290 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18291 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
18292 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18293  PyObject *__pyx_v___pyx_type = 0;
18294  long __pyx_v___pyx_checksum;
18295  PyObject *__pyx_v___pyx_state = 0;
18296  int __pyx_lineno = 0;
18297  const char *__pyx_filename = NULL;
18298  int __pyx_clineno = 0;
18299  PyObject *__pyx_r = 0;
18300  __Pyx_RefNannyDeclarations
18301  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
18302  {
18303  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
18304  PyObject* values[3] = {0,0,0};
18305  if (unlikely(__pyx_kwds)) {
18306  Py_ssize_t kw_args;
18307  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18308  switch (pos_args) {
18309  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18310  CYTHON_FALLTHROUGH;
18311  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18312  CYTHON_FALLTHROUGH;
18313  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18314  CYTHON_FALLTHROUGH;
18315  case 0: break;
18316  default: goto __pyx_L5_argtuple_error;
18317  }
18318  kw_args = PyDict_Size(__pyx_kwds);
18319  switch (pos_args) {
18320  case 0:
18321  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
18322  else goto __pyx_L5_argtuple_error;
18323  CYTHON_FALLTHROUGH;
18324  case 1:
18325  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
18326  else {
18327  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error)
18328  }
18329  CYTHON_FALLTHROUGH;
18330  case 2:
18331  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
18332  else {
18333  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error)
18334  }
18335  }
18336  if (unlikely(kw_args > 0)) {
18337  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(0, 1, __pyx_L3_error)
18338  }
18339  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
18340  goto __pyx_L5_argtuple_error;
18341  } else {
18342  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18343  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18344  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18345  }
18346  __pyx_v___pyx_type = values[0];
18347  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error)
18348  __pyx_v___pyx_state = values[2];
18349  }
18350  goto __pyx_L4_argument_unpacking_done;
18351  __pyx_L5_argtuple_error:;
18352  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1, __pyx_L3_error)
18353  __pyx_L3_error:;
18354  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
18355  __Pyx_RefNannyFinishContext();
18356  return NULL;
18357  __pyx_L4_argument_unpacking_done:;
18358  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
18359 
18360  /* function exit code */
18361  __Pyx_RefNannyFinishContext();
18362  return __pyx_r;
18363 }
18364 
18365 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) {
18366  PyObject *__pyx_v___pyx_PickleError = 0;
18367  PyObject *__pyx_v___pyx_result = 0;
18368  PyObject *__pyx_r = NULL;
18369  __Pyx_RefNannyDeclarations
18370  PyObject *__pyx_t_1 = NULL;
18371  int __pyx_t_2;
18372  int __pyx_t_3;
18373  PyObject *__pyx_t_4 = NULL;
18374  PyObject *__pyx_t_5 = NULL;
18375  PyObject *__pyx_t_6 = NULL;
18376  int __pyx_lineno = 0;
18377  const char *__pyx_filename = NULL;
18378  int __pyx_clineno = 0;
18379  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
18380 
18381  /* "(tree fragment)":4
18382  * cdef object __pyx_PickleError
18383  * cdef object __pyx_result
18384  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
18385  * from pickle import PickleError as __pyx_PickleError
18386  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
18387  */
18388  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
18389  __Pyx_GOTREF(__pyx_t_1);
18390  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__23, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4, __pyx_L1_error)
18391  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18392  __pyx_t_3 = (__pyx_t_2 != 0);
18393  if (__pyx_t_3) {
18394 
18395  /* "(tree fragment)":5
18396  * cdef object __pyx_result
18397  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
18398  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
18399  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
18400  * __pyx_result = Enum.__new__(__pyx_type)
18401  */
18402  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
18403  __Pyx_GOTREF(__pyx_t_1);
18404  __Pyx_INCREF(__pyx_n_s_PickleError);
18405  __Pyx_GIVEREF(__pyx_n_s_PickleError);
18406  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
18407  __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error)
18408  __Pyx_GOTREF(__pyx_t_4);
18409  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18410  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
18411  __Pyx_GOTREF(__pyx_t_1);
18412  __Pyx_INCREF(__pyx_t_1);
18413  __pyx_v___pyx_PickleError = __pyx_t_1;
18414  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18415  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18416 
18417  /* "(tree fragment)":6
18418  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
18419  * from pickle import PickleError as __pyx_PickleError
18420  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
18421  * __pyx_result = Enum.__new__(__pyx_type)
18422  * if __pyx_state is not None:
18423  */
18424  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
18425  __Pyx_GOTREF(__pyx_t_1);
18426  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6, __pyx_L1_error)
18427  __Pyx_GOTREF(__pyx_t_5);
18428  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18429  __Pyx_INCREF(__pyx_v___pyx_PickleError);
18430  __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
18431  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
18432  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
18433  if (likely(__pyx_t_6)) {
18434  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18435  __Pyx_INCREF(__pyx_t_6);
18436  __Pyx_INCREF(function);
18437  __Pyx_DECREF_SET(__pyx_t_1, function);
18438  }
18439  }
18440  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
18441  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18442  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18443  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
18444  __Pyx_GOTREF(__pyx_t_4);
18445  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18446  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
18447  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18448  __PYX_ERR(0, 6, __pyx_L1_error)
18449 
18450  /* "(tree fragment)":4
18451  * cdef object __pyx_PickleError
18452  * cdef object __pyx_result
18453  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
18454  * from pickle import PickleError as __pyx_PickleError
18455  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
18456  */
18457  }
18458 
18459  /* "(tree fragment)":7
18460  * from pickle import PickleError as __pyx_PickleError
18461  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
18462  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
18463  * if __pyx_state is not None:
18464  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18465  */
18466  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
18467  __Pyx_GOTREF(__pyx_t_1);
18468  __pyx_t_5 = NULL;
18469  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
18470  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
18471  if (likely(__pyx_t_5)) {
18472  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18473  __Pyx_INCREF(__pyx_t_5);
18474  __Pyx_INCREF(function);
18475  __Pyx_DECREF_SET(__pyx_t_1, function);
18476  }
18477  }
18478  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
18479  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18480  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7, __pyx_L1_error)
18481  __Pyx_GOTREF(__pyx_t_4);
18482  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18483  __pyx_v___pyx_result = __pyx_t_4;
18484  __pyx_t_4 = 0;
18485 
18486  /* "(tree fragment)":8
18487  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
18488  * __pyx_result = Enum.__new__(__pyx_type)
18489  * if __pyx_state is not None: # <<<<<<<<<<<<<<
18490  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18491  * return __pyx_result
18492  */
18493  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
18494  __pyx_t_2 = (__pyx_t_3 != 0);
18495  if (__pyx_t_2) {
18496 
18497  /* "(tree fragment)":9
18498  * __pyx_result = Enum.__new__(__pyx_type)
18499  * if __pyx_state is not None:
18500  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
18501  * return __pyx_result
18502  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18503  */
18504  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 9, __pyx_L1_error)
18505  __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error)
18506  __Pyx_GOTREF(__pyx_t_4);
18507  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18508 
18509  /* "(tree fragment)":8
18510  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
18511  * __pyx_result = Enum.__new__(__pyx_type)
18512  * if __pyx_state is not None: # <<<<<<<<<<<<<<
18513  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18514  * return __pyx_result
18515  */
18516  }
18517 
18518  /* "(tree fragment)":10
18519  * if __pyx_state is not None:
18520  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18521  * return __pyx_result # <<<<<<<<<<<<<<
18522  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18523  * __pyx_result.name = __pyx_state[0]
18524  */
18525  __Pyx_XDECREF(__pyx_r);
18526  __Pyx_INCREF(__pyx_v___pyx_result);
18527  __pyx_r = __pyx_v___pyx_result;
18528  goto __pyx_L0;
18529 
18530  /* "(tree fragment)":1
18531  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
18532  * cdef object __pyx_PickleError
18533  * cdef object __pyx_result
18534  */
18535 
18536  /* function exit code */
18537  __pyx_L1_error:;
18538  __Pyx_XDECREF(__pyx_t_1);
18539  __Pyx_XDECREF(__pyx_t_4);
18540  __Pyx_XDECREF(__pyx_t_5);
18541  __Pyx_XDECREF(__pyx_t_6);
18542  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
18543  __pyx_r = NULL;
18544  __pyx_L0:;
18545  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
18546  __Pyx_XDECREF(__pyx_v___pyx_result);
18547  __Pyx_XGIVEREF(__pyx_r);
18548  __Pyx_RefNannyFinishContext();
18549  return __pyx_r;
18550 }
18551 
18552 /* "(tree fragment)":11
18553  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18554  * return __pyx_result
18555  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
18556  * __pyx_result.name = __pyx_state[0]
18557  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18558  */
18559 
18560 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
18561  PyObject *__pyx_r = NULL;
18562  __Pyx_RefNannyDeclarations
18563  PyObject *__pyx_t_1 = NULL;
18564  int __pyx_t_2;
18565  Py_ssize_t __pyx_t_3;
18566  int __pyx_t_4;
18567  int __pyx_t_5;
18568  PyObject *__pyx_t_6 = NULL;
18569  PyObject *__pyx_t_7 = NULL;
18570  PyObject *__pyx_t_8 = NULL;
18571  int __pyx_lineno = 0;
18572  const char *__pyx_filename = NULL;
18573  int __pyx_clineno = 0;
18574  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
18575 
18576  /* "(tree fragment)":12
18577  * return __pyx_result
18578  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18579  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
18580  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18581  * __pyx_result.__dict__.update(__pyx_state[1])
18582  */
18583  if (unlikely(__pyx_v___pyx_state == Py_None)) {
18584  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
18585  __PYX_ERR(0, 12, __pyx_L1_error)
18586  }
18587  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
18588  __Pyx_GOTREF(__pyx_t_1);
18589  __Pyx_GIVEREF(__pyx_t_1);
18590  __Pyx_GOTREF(__pyx_v___pyx_result->name);
18591  __Pyx_DECREF(__pyx_v___pyx_result->name);
18592  __pyx_v___pyx_result->name = __pyx_t_1;
18593  __pyx_t_1 = 0;
18594 
18595  /* "(tree fragment)":13
18596  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18597  * __pyx_result.name = __pyx_state[0]
18598  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
18599  * __pyx_result.__dict__.update(__pyx_state[1])
18600  */
18601  if (unlikely(__pyx_v___pyx_state == Py_None)) {
18602  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
18603  __PYX_ERR(0, 13, __pyx_L1_error)
18604  }
18605  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
18606  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
18607  if (__pyx_t_4) {
18608  } else {
18609  __pyx_t_2 = __pyx_t_4;
18610  goto __pyx_L4_bool_binop_done;
18611  }
18612  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
18613  __pyx_t_5 = (__pyx_t_4 != 0);
18614  __pyx_t_2 = __pyx_t_5;
18615  __pyx_L4_bool_binop_done:;
18616  if (__pyx_t_2) {
18617 
18618  /* "(tree fragment)":14
18619  * __pyx_result.name = __pyx_state[0]
18620  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18621  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
18622  */
18623  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
18624  __Pyx_GOTREF(__pyx_t_6);
18625  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14, __pyx_L1_error)
18626  __Pyx_GOTREF(__pyx_t_7);
18627  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18628  if (unlikely(__pyx_v___pyx_state == Py_None)) {
18629  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
18630  __PYX_ERR(0, 14, __pyx_L1_error)
18631  }
18632  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
18633  __Pyx_GOTREF(__pyx_t_6);
18634  __pyx_t_8 = NULL;
18635  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
18636  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
18637  if (likely(__pyx_t_8)) {
18638  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18639  __Pyx_INCREF(__pyx_t_8);
18640  __Pyx_INCREF(function);
18641  __Pyx_DECREF_SET(__pyx_t_7, function);
18642  }
18643  }
18644  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
18645  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18646  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18647  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
18648  __Pyx_GOTREF(__pyx_t_1);
18649  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18650  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18651 
18652  /* "(tree fragment)":13
18653  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18654  * __pyx_result.name = __pyx_state[0]
18655  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
18656  * __pyx_result.__dict__.update(__pyx_state[1])
18657  */
18658  }
18659 
18660  /* "(tree fragment)":11
18661  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18662  * return __pyx_result
18663  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
18664  * __pyx_result.name = __pyx_state[0]
18665  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18666  */
18667 
18668  /* function exit code */
18669  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18670  goto __pyx_L0;
18671  __pyx_L1_error:;
18672  __Pyx_XDECREF(__pyx_t_1);
18673  __Pyx_XDECREF(__pyx_t_6);
18674  __Pyx_XDECREF(__pyx_t_7);
18675  __Pyx_XDECREF(__pyx_t_8);
18676  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
18677  __pyx_r = 0;
18678  __pyx_L0:;
18679  __Pyx_XGIVEREF(__pyx_r);
18680  __Pyx_RefNannyFinishContext();
18681  return __pyx_r;
18682 }
18683 
18684 /* "BufferFormatFromTypeInfo":1463
18685  *
18686  * @cname('__pyx_format_from_typeinfo')
18687  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
18688  * cdef __Pyx_StructField *field
18689  * cdef __pyx_typeinfo_string fmt
18690  */
18691 
18692 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) {
18693  __Pyx_StructField *__pyx_v_field;
18694  struct __pyx_typeinfo_string __pyx_v_fmt;
18695  PyObject *__pyx_v_part = 0;
18696  PyObject *__pyx_v_result = 0;
18697  PyObject *__pyx_v_alignment = NULL;
18698  PyObject *__pyx_v_parts = NULL;
18699  PyObject *__pyx_v_extents = NULL;
18700  int __pyx_v_i;
18701  PyObject *__pyx_r = NULL;
18702  __Pyx_RefNannyDeclarations
18703  int __pyx_t_1;
18704  PyObject *__pyx_t_2 = NULL;
18705  __Pyx_StructField *__pyx_t_3;
18706  PyObject *__pyx_t_4 = NULL;
18707  PyObject *__pyx_t_5 = NULL;
18708  int __pyx_t_6;
18709  int __pyx_t_7;
18710  int __pyx_t_8;
18711  int __pyx_t_9;
18712  int __pyx_lineno = 0;
18713  const char *__pyx_filename = NULL;
18714  int __pyx_clineno = 0;
18715  __Pyx_RefNannySetupContext("format_from_typeinfo", 0);
18716 
18717  /* "BufferFormatFromTypeInfo":1468
18718  * cdef bytes part, result
18719  *
18720  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
18721  * assert type.fields != NULL
18722  * assert type.fields.type != NULL
18723  */
18724  __pyx_t_1 = ((__pyx_v_type->typegroup == 'S') != 0);
18725  if (__pyx_t_1) {
18726 
18727  /* "BufferFormatFromTypeInfo":1469
18728  *
18729  * if type.typegroup == 'S':
18730  * assert type.fields != NULL # <<<<<<<<<<<<<<
18731  * assert type.fields.type != NULL
18732  *
18733  */
18734  #ifndef CYTHON_WITHOUT_ASSERTIONS
18735  if (unlikely(!Py_OptimizeFlag)) {
18736  if (unlikely(!((__pyx_v_type->fields != NULL) != 0))) {
18737  PyErr_SetNone(PyExc_AssertionError);
18738  __PYX_ERR(0, 1469, __pyx_L1_error)
18739  }
18740  }
18741  #endif
18742 
18743  /* "BufferFormatFromTypeInfo":1470
18744  * if type.typegroup == 'S':
18745  * assert type.fields != NULL
18746  * assert type.fields.type != NULL # <<<<<<<<<<<<<<
18747  *
18748  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
18749  */
18750  #ifndef CYTHON_WITHOUT_ASSERTIONS
18751  if (unlikely(!Py_OptimizeFlag)) {
18752  if (unlikely(!((__pyx_v_type->fields->type != NULL) != 0))) {
18753  PyErr_SetNone(PyExc_AssertionError);
18754  __PYX_ERR(0, 1470, __pyx_L1_error)
18755  }
18756  }
18757  #endif
18758 
18759  /* "BufferFormatFromTypeInfo":1472
18760  * assert type.fields.type != NULL
18761  *
18762  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
18763  * alignment = b'^'
18764  * else:
18765  */
18766  __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0);
18767  if (__pyx_t_1) {
18768 
18769  /* "BufferFormatFromTypeInfo":1473
18770  *
18771  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
18772  * alignment = b'^' # <<<<<<<<<<<<<<
18773  * else:
18774  * alignment = b''
18775  */
18776  __Pyx_INCREF(__pyx_kp_b__24);
18777  __pyx_v_alignment = __pyx_kp_b__24;
18778 
18779  /* "BufferFormatFromTypeInfo":1472
18780  * assert type.fields.type != NULL
18781  *
18782  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
18783  * alignment = b'^'
18784  * else:
18785  */
18786  goto __pyx_L4;
18787  }
18788 
18789  /* "BufferFormatFromTypeInfo":1475
18790  * alignment = b'^'
18791  * else:
18792  * alignment = b'' # <<<<<<<<<<<<<<
18793  *
18794  * parts = [b"T{"]
18795  */
18796  /*else*/ {
18797  __Pyx_INCREF(__pyx_kp_b__25);
18798  __pyx_v_alignment = __pyx_kp_b__25;
18799  }
18800  __pyx_L4:;
18801 
18802  /* "BufferFormatFromTypeInfo":1477
18803  * alignment = b''
18804  *
18805  * parts = [b"T{"] # <<<<<<<<<<<<<<
18806  * field = type.fields
18807  *
18808  */
18809  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
18810  __Pyx_GOTREF(__pyx_t_2);
18811  __Pyx_INCREF(__pyx_kp_b_T);
18812  __Pyx_GIVEREF(__pyx_kp_b_T);
18813  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_b_T);
18814  __pyx_v_parts = ((PyObject*)__pyx_t_2);
18815  __pyx_t_2 = 0;
18816 
18817  /* "BufferFormatFromTypeInfo":1478
18818  *
18819  * parts = [b"T{"]
18820  * field = type.fields # <<<<<<<<<<<<<<
18821  *
18822  * while field.type:
18823  */
18824  __pyx_t_3 = __pyx_v_type->fields;
18825  __pyx_v_field = __pyx_t_3;
18826 
18827  /* "BufferFormatFromTypeInfo":1480
18828  * field = type.fields
18829  *
18830  * while field.type: # <<<<<<<<<<<<<<
18831  * part = format_from_typeinfo(field.type)
18832  * parts.append(part + b':' + field.name + b':')
18833  */
18834  while (1) {
18835  __pyx_t_1 = (__pyx_v_field->type != 0);
18836  if (!__pyx_t_1) break;
18837 
18838  /* "BufferFormatFromTypeInfo":1481
18839  *
18840  * while field.type:
18841  * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<<
18842  * parts.append(part + b':' + field.name + b':')
18843  * field += 1
18844  */
18845  __pyx_t_2 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L1_error)
18846  __Pyx_GOTREF(__pyx_t_2);
18847  __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_2));
18848  __pyx_t_2 = 0;
18849 
18850  /* "BufferFormatFromTypeInfo":1482
18851  * while field.type:
18852  * part = format_from_typeinfo(field.type)
18853  * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<<
18854  * field += 1
18855  *
18856  */
18857  __pyx_t_2 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__26); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
18858  __Pyx_GOTREF(__pyx_t_2);
18859  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L1_error)
18860  __Pyx_GOTREF(__pyx_t_4);
18861  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1482, __pyx_L1_error)
18862  __Pyx_GOTREF(__pyx_t_5);
18863  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18864  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18865  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__26); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L1_error)
18866  __Pyx_GOTREF(__pyx_t_4);
18867  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18868  __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1482, __pyx_L1_error)
18869  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18870 
18871  /* "BufferFormatFromTypeInfo":1483
18872  * part = format_from_typeinfo(field.type)
18873  * parts.append(part + b':' + field.name + b':')
18874  * field += 1 # <<<<<<<<<<<<<<
18875  *
18876  * result = alignment.join(parts) + b'}'
18877  */
18878  __pyx_v_field = (__pyx_v_field + 1);
18879  }
18880 
18881  /* "BufferFormatFromTypeInfo":1485
18882  * field += 1
18883  *
18884  * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<<
18885  * else:
18886  * fmt = __Pyx_TypeInfoToFormat(type)
18887  */
18888  __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L1_error)
18889  __Pyx_GOTREF(__pyx_t_4);
18890  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_b__27); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __pyx_L1_error)
18891  __Pyx_GOTREF(__pyx_t_5);
18892  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18893  if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1485, __pyx_L1_error)
18894  __pyx_v_result = ((PyObject*)__pyx_t_5);
18895  __pyx_t_5 = 0;
18896 
18897  /* "BufferFormatFromTypeInfo":1468
18898  * cdef bytes part, result
18899  *
18900  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
18901  * assert type.fields != NULL
18902  * assert type.fields.type != NULL
18903  */
18904  goto __pyx_L3;
18905  }
18906 
18907  /* "BufferFormatFromTypeInfo":1487
18908  * result = alignment.join(parts) + b'}'
18909  * else:
18910  * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<<
18911  * if type.arraysize[0]:
18912  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
18913  */
18914  /*else*/ {
18915  __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type);
18916 
18917  /* "BufferFormatFromTypeInfo":1488
18918  * else:
18919  * fmt = __Pyx_TypeInfoToFormat(type)
18920  * if type.arraysize[0]: # <<<<<<<<<<<<<<
18921  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
18922  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
18923  */
18924  __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0);
18925  if (__pyx_t_1) {
18926 
18927  /* "BufferFormatFromTypeInfo":1489
18928  * fmt = __Pyx_TypeInfoToFormat(type)
18929  * if type.arraysize[0]:
18930  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] # <<<<<<<<<<<<<<
18931  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
18932  * else:
18933  */
18934  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L1_error)
18935  __Pyx_GOTREF(__pyx_t_5);
18936  __pyx_t_7 = __pyx_v_type->ndim;
18937  __pyx_t_8 = __pyx_t_7;
18938  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
18939  __pyx_v_i = __pyx_t_9;
18940  __pyx_t_4 = __Pyx_PyInt_FromSize_t((__pyx_v_type->arraysize[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1489, __pyx_L1_error)
18941  __Pyx_GOTREF(__pyx_t_4);
18942  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
18943  __Pyx_GOTREF(__pyx_t_2);
18944  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18945  if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1489, __pyx_L1_error)
18946  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18947  }
18948  __pyx_v_extents = ((PyObject*)__pyx_t_5);
18949  __pyx_t_5 = 0;
18950 
18951  /* "BufferFormatFromTypeInfo":1490
18952  * if type.arraysize[0]:
18953  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
18954  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string # <<<<<<<<<<<<<<
18955  * else:
18956  * result = fmt.string
18957  */
18958  __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__28, __pyx_v_extents); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
18959  __Pyx_GOTREF(__pyx_t_5);
18960  __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
18961  __Pyx_GOTREF(__pyx_t_2);
18962  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18963  __pyx_t_5 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
18964  __Pyx_GOTREF(__pyx_t_5);
18965  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18966  __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
18967  __Pyx_GOTREF(__pyx_t_2);
18968  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
18969  __Pyx_GOTREF(__pyx_t_4);
18970  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18971  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18972  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1490, __pyx_L1_error)
18973  __pyx_v_result = ((PyObject*)__pyx_t_4);
18974  __pyx_t_4 = 0;
18975 
18976  /* "BufferFormatFromTypeInfo":1488
18977  * else:
18978  * fmt = __Pyx_TypeInfoToFormat(type)
18979  * if type.arraysize[0]: # <<<<<<<<<<<<<<
18980  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
18981  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
18982  */
18983  goto __pyx_L7;
18984  }
18985 
18986  /* "BufferFormatFromTypeInfo":1492
18987  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
18988  * else:
18989  * result = fmt.string # <<<<<<<<<<<<<<
18990  *
18991  * return result
18992  */
18993  /*else*/ {
18994  __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1492, __pyx_L1_error)
18995  __Pyx_GOTREF(__pyx_t_4);
18996  __pyx_v_result = ((PyObject*)__pyx_t_4);
18997  __pyx_t_4 = 0;
18998  }
18999  __pyx_L7:;
19000  }
19001  __pyx_L3:;
19002 
19003  /* "BufferFormatFromTypeInfo":1494
19004  * result = fmt.string
19005  *
19006  * return result # <<<<<<<<<<<<<<
19007  */
19008  __Pyx_XDECREF(__pyx_r);
19009  __Pyx_INCREF(__pyx_v_result);
19010  __pyx_r = __pyx_v_result;
19011  goto __pyx_L0;
19012 
19013  /* "BufferFormatFromTypeInfo":1463
19014  *
19015  * @cname('__pyx_format_from_typeinfo')
19016  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
19017  * cdef __Pyx_StructField *field
19018  * cdef __pyx_typeinfo_string fmt
19019  */
19020 
19021  /* function exit code */
19022  __pyx_L1_error:;
19023  __Pyx_XDECREF(__pyx_t_2);
19024  __Pyx_XDECREF(__pyx_t_4);
19025  __Pyx_XDECREF(__pyx_t_5);
19026  __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
19027  __pyx_r = 0;
19028  __pyx_L0:;
19029  __Pyx_XDECREF(__pyx_v_part);
19030  __Pyx_XDECREF(__pyx_v_result);
19031  __Pyx_XDECREF(__pyx_v_alignment);
19032  __Pyx_XDECREF(__pyx_v_parts);
19033  __Pyx_XDECREF(__pyx_v_extents);
19034  __Pyx_XGIVEREF(__pyx_r);
19035  __Pyx_RefNannyFinishContext();
19036  return __pyx_r;
19037 }
19038 
19039 static PyObject *__pyx_tp_new_14flcbdfWrappers_FLCBDF_integrator(PyTypeObject *t, PyObject *a, PyObject *k) {
19040  PyObject *o;
19041  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19042  o = (*t->tp_alloc)(t, 0);
19043  } else {
19044  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19045  }
19046  if (unlikely(!o)) return 0;
19047  if (unlikely(__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_27__cinit__(o, a, k) < 0)) goto bad;
19048  return o;
19049  bad:
19050  Py_DECREF(o); o = 0;
19051  return NULL;
19052 }
19053 
19054 static void __pyx_tp_dealloc_14flcbdfWrappers_FLCBDF_integrator(PyObject *o) {
19055  #if CYTHON_USE_TP_FINALIZE
19056  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
19057  if (PyObject_CallFinalizerFromDealloc(o)) return;
19058  }
19059  #endif
19060  {
19061  PyObject *etype, *eval, *etb;
19062  PyErr_Fetch(&etype, &eval, &etb);
19063  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19064  __pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_29__dealloc__(o);
19065  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19066  PyErr_Restore(etype, eval, etb);
19067  }
19068  (*Py_TYPE(o)->tp_free)(o);
19069 }
19070 
19071 static PyMethodDef __pyx_methods_14flcbdfWrappers_FLCBDF_integrator[] = {
19072  {"choose_dt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_1choose_dt, METH_VARARGS|METH_KEYWORDS, 0},
19073  {"set_dt", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_3set_dt, METH_O, 0},
19074  {"set_order", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_5set_order, METH_O, 0},
19075  {"initialize_dt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_7initialize_dt, METH_VARARGS|METH_KEYWORDS, 0},
19076  {"setInitialGuess", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_9setInitialGuess, METH_O, 0},
19077  {"lastStepErrorOk", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_11lastStepErrorOk, METH_O, 0},
19078  {"calculate_yprime", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_13calculate_yprime, METH_VARARGS|METH_KEYWORDS, 0},
19079  {"stepTaken", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_15stepTaken, METH_O, 0},
19080  {"retryStep_errorFailure", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_17retryStep_errorFailure, METH_NOARGS, 0},
19081  {"retryStep_solverFailure", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_19retryStep_solverFailure, METH_NOARGS, 0},
19082  {"initializeTimeHistory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_21initializeTimeHistory, METH_VARARGS|METH_KEYWORDS, 0},
19083  {"setTolerances", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_23setTolerances, METH_VARARGS|METH_KEYWORDS, 0},
19084  {"getCurrentAlpha", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_25getCurrentAlpha, METH_NOARGS, 0},
19085  {"__reduce_cython__", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_31__reduce_cython__, METH_NOARGS, 0},
19086  {"__setstate_cython__", (PyCFunction)__pyx_pw_14flcbdfWrappers_17FLCBDF_integrator_33__setstate_cython__, METH_O, 0},
19087  {0, 0, 0, 0}
19088 };
19089 
19090 static PyTypeObject __pyx_type_14flcbdfWrappers_FLCBDF_integrator = {
19091  PyVarObject_HEAD_INIT(0, 0)
19092  "flcbdfWrappers.FLCBDF_integrator", /*tp_name*/
19093  sizeof(struct __pyx_obj_14flcbdfWrappers_FLCBDF_integrator), /*tp_basicsize*/
19094  0, /*tp_itemsize*/
19095  __pyx_tp_dealloc_14flcbdfWrappers_FLCBDF_integrator, /*tp_dealloc*/
19096  #if PY_VERSION_HEX < 0x030800b4
19097  0, /*tp_print*/
19098  #endif
19099  #if PY_VERSION_HEX >= 0x030800b4
19100  0, /*tp_vectorcall_offset*/
19101  #endif
19102  0, /*tp_getattr*/
19103  0, /*tp_setattr*/
19104  #if PY_MAJOR_VERSION < 3
19105  0, /*tp_compare*/
19106  #endif
19107  #if PY_MAJOR_VERSION >= 3
19108  0, /*tp_as_async*/
19109  #endif
19110  0, /*tp_repr*/
19111  0, /*tp_as_number*/
19112  0, /*tp_as_sequence*/
19113  0, /*tp_as_mapping*/
19114  0, /*tp_hash*/
19115  0, /*tp_call*/
19116  0, /*tp_str*/
19117  0, /*tp_getattro*/
19118  0, /*tp_setattro*/
19119  0, /*tp_as_buffer*/
19120  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19121  0, /*tp_doc*/
19122  0, /*tp_traverse*/
19123  0, /*tp_clear*/
19124  0, /*tp_richcompare*/
19125  0, /*tp_weaklistoffset*/
19126  0, /*tp_iter*/
19127  0, /*tp_iternext*/
19128  __pyx_methods_14flcbdfWrappers_FLCBDF_integrator, /*tp_methods*/
19129  0, /*tp_members*/
19130  0, /*tp_getset*/
19131  0, /*tp_base*/
19132  0, /*tp_dict*/
19133  0, /*tp_descr_get*/
19134  0, /*tp_descr_set*/
19135  0, /*tp_dictoffset*/
19136  0, /*tp_init*/
19137  0, /*tp_alloc*/
19138  __pyx_tp_new_14flcbdfWrappers_FLCBDF_integrator, /*tp_new*/
19139  0, /*tp_free*/
19140  0, /*tp_is_gc*/
19141  0, /*tp_bases*/
19142  0, /*tp_mro*/
19143  0, /*tp_cache*/
19144  0, /*tp_subclasses*/
19145  0, /*tp_weaklist*/
19146  0, /*tp_del*/
19147  0, /*tp_version_tag*/
19148  #if PY_VERSION_HEX >= 0x030400a1
19149  0, /*tp_finalize*/
19150  #endif
19151  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
19152  0, /*tp_vectorcall*/
19153  #endif
19154  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19155  0, /*tp_print*/
19156  #endif
19157  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
19158  0, /*tp_pypy_flags*/
19159  #endif
19160 };
19161 static struct __pyx_vtabstruct_array __pyx_vtable_array;
19162 
19163 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
19164  struct __pyx_array_obj *p;
19165  PyObject *o;
19166  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19167  o = (*t->tp_alloc)(t, 0);
19168  } else {
19169  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19170  }
19171  if (unlikely(!o)) return 0;
19172  p = ((struct __pyx_array_obj *)o);
19173  p->__pyx_vtab = __pyx_vtabptr_array;
19174  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
19175  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
19176  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
19177  return o;
19178  bad:
19179  Py_DECREF(o); o = 0;
19180  return NULL;
19181 }
19182 
19183 static void __pyx_tp_dealloc_array(PyObject *o) {
19184  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
19185  #if CYTHON_USE_TP_FINALIZE
19186  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
19187  if (PyObject_CallFinalizerFromDealloc(o)) return;
19188  }
19189  #endif
19190  {
19191  PyObject *etype, *eval, *etb;
19192  PyErr_Fetch(&etype, &eval, &etb);
19193  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19194  __pyx_array___dealloc__(o);
19195  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19196  PyErr_Restore(etype, eval, etb);
19197  }
19198  Py_CLEAR(p->mode);
19199  Py_CLEAR(p->_format);
19200  (*Py_TYPE(o)->tp_free)(o);
19201 }
19202 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
19203  PyObject *r;
19204  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19205  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19206  Py_DECREF(x);
19207  return r;
19208 }
19209 
19210 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
19211  if (v) {
19212  return __pyx_array___setitem__(o, i, v);
19213  }
19214  else {
19215  PyErr_Format(PyExc_NotImplementedError,
19216  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
19217  return -1;
19218  }
19219 }
19220 
19221 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
19222  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
19223  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
19224  PyErr_Clear();
19225  v = __pyx_array___getattr__(o, n);
19226  }
19227  return v;
19228 }
19229 
19230 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
19231  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
19232 }
19233 
19234 static PyMethodDef __pyx_methods_array[] = {
19235  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
19236  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
19237  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
19238  {0, 0, 0, 0}
19239 };
19240 
19241 static struct PyGetSetDef __pyx_getsets_array[] = {
19242  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
19243  {0, 0, 0, 0, 0}
19244 };
19245 
19246 static PySequenceMethods __pyx_tp_as_sequence_array = {
19247  __pyx_array___len__, /*sq_length*/
19248  0, /*sq_concat*/
19249  0, /*sq_repeat*/
19250  __pyx_sq_item_array, /*sq_item*/
19251  0, /*sq_slice*/
19252  0, /*sq_ass_item*/
19253  0, /*sq_ass_slice*/
19254  0, /*sq_contains*/
19255  0, /*sq_inplace_concat*/
19256  0, /*sq_inplace_repeat*/
19257 };
19258 
19259 static PyMappingMethods __pyx_tp_as_mapping_array = {
19260  __pyx_array___len__, /*mp_length*/
19261  __pyx_array___getitem__, /*mp_subscript*/
19262  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
19263 };
19264 
19265 static PyBufferProcs __pyx_tp_as_buffer_array = {
19266  #if PY_MAJOR_VERSION < 3
19267  0, /*bf_getreadbuffer*/
19268  #endif
19269  #if PY_MAJOR_VERSION < 3
19270  0, /*bf_getwritebuffer*/
19271  #endif
19272  #if PY_MAJOR_VERSION < 3
19273  0, /*bf_getsegcount*/
19274  #endif
19275  #if PY_MAJOR_VERSION < 3
19276  0, /*bf_getcharbuffer*/
19277  #endif
19278  __pyx_array_getbuffer, /*bf_getbuffer*/
19279  0, /*bf_releasebuffer*/
19280 };
19281 
19282 static PyTypeObject __pyx_type___pyx_array = {
19283  PyVarObject_HEAD_INIT(0, 0)
19284  "flcbdfWrappers.array", /*tp_name*/
19285  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
19286  0, /*tp_itemsize*/
19287  __pyx_tp_dealloc_array, /*tp_dealloc*/
19288  #if PY_VERSION_HEX < 0x030800b4
19289  0, /*tp_print*/
19290  #endif
19291  #if PY_VERSION_HEX >= 0x030800b4
19292  0, /*tp_vectorcall_offset*/
19293  #endif
19294  0, /*tp_getattr*/
19295  0, /*tp_setattr*/
19296  #if PY_MAJOR_VERSION < 3
19297  0, /*tp_compare*/
19298  #endif
19299  #if PY_MAJOR_VERSION >= 3
19300  0, /*tp_as_async*/
19301  #endif
19302  0, /*tp_repr*/
19303  0, /*tp_as_number*/
19304  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
19305  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
19306  0, /*tp_hash*/
19307  0, /*tp_call*/
19308  0, /*tp_str*/
19309  __pyx_tp_getattro_array, /*tp_getattro*/
19310  0, /*tp_setattro*/
19311  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
19312  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19313  0, /*tp_doc*/
19314  0, /*tp_traverse*/
19315  0, /*tp_clear*/
19316  0, /*tp_richcompare*/
19317  0, /*tp_weaklistoffset*/
19318  0, /*tp_iter*/
19319  0, /*tp_iternext*/
19320  __pyx_methods_array, /*tp_methods*/
19321  0, /*tp_members*/
19322  __pyx_getsets_array, /*tp_getset*/
19323  0, /*tp_base*/
19324  0, /*tp_dict*/
19325  0, /*tp_descr_get*/
19326  0, /*tp_descr_set*/
19327  0, /*tp_dictoffset*/
19328  0, /*tp_init*/
19329  0, /*tp_alloc*/
19330  __pyx_tp_new_array, /*tp_new*/
19331  0, /*tp_free*/
19332  0, /*tp_is_gc*/
19333  0, /*tp_bases*/
19334  0, /*tp_mro*/
19335  0, /*tp_cache*/
19336  0, /*tp_subclasses*/
19337  0, /*tp_weaklist*/
19338  0, /*tp_del*/
19339  0, /*tp_version_tag*/
19340  #if PY_VERSION_HEX >= 0x030400a1
19341  0, /*tp_finalize*/
19342  #endif
19343  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
19344  0, /*tp_vectorcall*/
19345  #endif
19346  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19347  0, /*tp_print*/
19348  #endif
19349  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
19350  0, /*tp_pypy_flags*/
19351  #endif
19352 };
19353 
19354 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19355  struct __pyx_MemviewEnum_obj *p;
19356  PyObject *o;
19357  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19358  o = (*t->tp_alloc)(t, 0);
19359  } else {
19360  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19361  }
19362  if (unlikely(!o)) return 0;
19363  p = ((struct __pyx_MemviewEnum_obj *)o);
19364  p->name = Py_None; Py_INCREF(Py_None);
19365  return o;
19366 }
19367 
19368 static void __pyx_tp_dealloc_Enum(PyObject *o) {
19369  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
19370  #if CYTHON_USE_TP_FINALIZE
19371  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
19372  if (PyObject_CallFinalizerFromDealloc(o)) return;
19373  }
19374  #endif
19375  PyObject_GC_UnTrack(o);
19376  Py_CLEAR(p->name);
19377  (*Py_TYPE(o)->tp_free)(o);
19378 }
19379 
19380 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
19381  int e;
19382  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
19383  if (p->name) {
19384  e = (*v)(p->name, a); if (e) return e;
19385  }
19386  return 0;
19387 }
19388 
19389 static int __pyx_tp_clear_Enum(PyObject *o) {
19390  PyObject* tmp;
19391  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
19392  tmp = ((PyObject*)p->name);
19393  p->name = Py_None; Py_INCREF(Py_None);
19394  Py_XDECREF(tmp);
19395  return 0;
19396 }
19397 
19398 static PyMethodDef __pyx_methods_Enum[] = {
19399  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
19400  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
19401  {0, 0, 0, 0}
19402 };
19403 
19404 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
19405  PyVarObject_HEAD_INIT(0, 0)
19406  "flcbdfWrappers.Enum", /*tp_name*/
19407  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
19408  0, /*tp_itemsize*/
19409  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
19410  #if PY_VERSION_HEX < 0x030800b4
19411  0, /*tp_print*/
19412  #endif
19413  #if PY_VERSION_HEX >= 0x030800b4
19414  0, /*tp_vectorcall_offset*/
19415  #endif
19416  0, /*tp_getattr*/
19417  0, /*tp_setattr*/
19418  #if PY_MAJOR_VERSION < 3
19419  0, /*tp_compare*/
19420  #endif
19421  #if PY_MAJOR_VERSION >= 3
19422  0, /*tp_as_async*/
19423  #endif
19424  __pyx_MemviewEnum___repr__, /*tp_repr*/
19425  0, /*tp_as_number*/
19426  0, /*tp_as_sequence*/
19427  0, /*tp_as_mapping*/
19428  0, /*tp_hash*/
19429  0, /*tp_call*/
19430  0, /*tp_str*/
19431  0, /*tp_getattro*/
19432  0, /*tp_setattro*/
19433  0, /*tp_as_buffer*/
19434  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19435  0, /*tp_doc*/
19436  __pyx_tp_traverse_Enum, /*tp_traverse*/
19437  __pyx_tp_clear_Enum, /*tp_clear*/
19438  0, /*tp_richcompare*/
19439  0, /*tp_weaklistoffset*/
19440  0, /*tp_iter*/
19441  0, /*tp_iternext*/
19442  __pyx_methods_Enum, /*tp_methods*/
19443  0, /*tp_members*/
19444  0, /*tp_getset*/
19445  0, /*tp_base*/
19446  0, /*tp_dict*/
19447  0, /*tp_descr_get*/
19448  0, /*tp_descr_set*/
19449  0, /*tp_dictoffset*/
19450  __pyx_MemviewEnum___init__, /*tp_init*/
19451  0, /*tp_alloc*/
19452  __pyx_tp_new_Enum, /*tp_new*/
19453  0, /*tp_free*/
19454  0, /*tp_is_gc*/
19455  0, /*tp_bases*/
19456  0, /*tp_mro*/
19457  0, /*tp_cache*/
19458  0, /*tp_subclasses*/
19459  0, /*tp_weaklist*/
19460  0, /*tp_del*/
19461  0, /*tp_version_tag*/
19462  #if PY_VERSION_HEX >= 0x030400a1
19463  0, /*tp_finalize*/
19464  #endif
19465  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
19466  0, /*tp_vectorcall*/
19467  #endif
19468  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19469  0, /*tp_print*/
19470  #endif
19471  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
19472  0, /*tp_pypy_flags*/
19473  #endif
19474 };
19475 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
19476 
19477 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
19478  struct __pyx_memoryview_obj *p;
19479  PyObject *o;
19480  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19481  o = (*t->tp_alloc)(t, 0);
19482  } else {
19483  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19484  }
19485  if (unlikely(!o)) return 0;
19486  p = ((struct __pyx_memoryview_obj *)o);
19487  p->__pyx_vtab = __pyx_vtabptr_memoryview;
19488  p->obj = Py_None; Py_INCREF(Py_None);
19489  p->_size = Py_None; Py_INCREF(Py_None);
19490  p->_array_interface = Py_None; Py_INCREF(Py_None);
19491  p->view.obj = NULL;
19492  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
19493  return o;
19494  bad:
19495  Py_DECREF(o); o = 0;
19496  return NULL;
19497 }
19498 
19499 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
19500  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
19501  #if CYTHON_USE_TP_FINALIZE
19502  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
19503  if (PyObject_CallFinalizerFromDealloc(o)) return;
19504  }
19505  #endif
19506  PyObject_GC_UnTrack(o);
19507  {
19508  PyObject *etype, *eval, *etb;
19509  PyErr_Fetch(&etype, &eval, &etb);
19510  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19511  __pyx_memoryview___dealloc__(o);
19512  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19513  PyErr_Restore(etype, eval, etb);
19514  }
19515  Py_CLEAR(p->obj);
19516  Py_CLEAR(p->_size);
19517  Py_CLEAR(p->_array_interface);
19518  (*Py_TYPE(o)->tp_free)(o);
19519 }
19520 
19521 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
19522  int e;
19523  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
19524  if (p->obj) {
19525  e = (*v)(p->obj, a); if (e) return e;
19526  }
19527  if (p->_size) {
19528  e = (*v)(p->_size, a); if (e) return e;
19529  }
19530  if (p->_array_interface) {
19531  e = (*v)(p->_array_interface, a); if (e) return e;
19532  }
19533  if (p->view.obj) {
19534  e = (*v)(p->view.obj, a); if (e) return e;
19535  }
19536  return 0;
19537 }
19538 
19539 static int __pyx_tp_clear_memoryview(PyObject *o) {
19540  PyObject* tmp;
19541  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
19542  tmp = ((PyObject*)p->obj);
19543  p->obj = Py_None; Py_INCREF(Py_None);
19544  Py_XDECREF(tmp);
19545  tmp = ((PyObject*)p->_size);
19546  p->_size = Py_None; Py_INCREF(Py_None);
19547  Py_XDECREF(tmp);
19548  tmp = ((PyObject*)p->_array_interface);
19549  p->_array_interface = Py_None; Py_INCREF(Py_None);
19550  Py_XDECREF(tmp);
19551  Py_CLEAR(p->view.obj);
19552  return 0;
19553 }
19554 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
19555  PyObject *r;
19556  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19557  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19558  Py_DECREF(x);
19559  return r;
19560 }
19561 
19562 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
19563  if (v) {
19564  return __pyx_memoryview___setitem__(o, i, v);
19565  }
19566  else {
19567  PyErr_Format(PyExc_NotImplementedError,
19568  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
19569  return -1;
19570  }
19571 }
19572 
19573 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
19574  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
19575 }
19576 
19577 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
19578  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
19579 }
19580 
19581 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
19582  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
19583 }
19584 
19585 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
19586  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
19587 }
19588 
19589 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
19590  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
19591 }
19592 
19593 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
19594  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
19595 }
19596 
19597 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
19598  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
19599 }
19600 
19601 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
19602  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
19603 }
19604 
19605 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
19606  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
19607 }
19608 
19609 static PyMethodDef __pyx_methods_memoryview[] = {
19610  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
19611  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
19612  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
19613  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
19614  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
19615  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
19616  {0, 0, 0, 0}
19617 };
19618 
19619 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
19620  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
19621  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
19622  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
19623  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
19624  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
19625  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
19626  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
19627  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
19628  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
19629  {0, 0, 0, 0, 0}
19630 };
19631 
19632 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
19633  __pyx_memoryview___len__, /*sq_length*/
19634  0, /*sq_concat*/
19635  0, /*sq_repeat*/
19636  __pyx_sq_item_memoryview, /*sq_item*/
19637  0, /*sq_slice*/
19638  0, /*sq_ass_item*/
19639  0, /*sq_ass_slice*/
19640  0, /*sq_contains*/
19641  0, /*sq_inplace_concat*/
19642  0, /*sq_inplace_repeat*/
19643 };
19644 
19645 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
19646  __pyx_memoryview___len__, /*mp_length*/
19647  __pyx_memoryview___getitem__, /*mp_subscript*/
19648  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
19649 };
19650 
19651 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
19652  #if PY_MAJOR_VERSION < 3
19653  0, /*bf_getreadbuffer*/
19654  #endif
19655  #if PY_MAJOR_VERSION < 3
19656  0, /*bf_getwritebuffer*/
19657  #endif
19658  #if PY_MAJOR_VERSION < 3
19659  0, /*bf_getsegcount*/
19660  #endif
19661  #if PY_MAJOR_VERSION < 3
19662  0, /*bf_getcharbuffer*/
19663  #endif
19664  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
19665  0, /*bf_releasebuffer*/
19666 };
19667 
19668 static PyTypeObject __pyx_type___pyx_memoryview = {
19669  PyVarObject_HEAD_INIT(0, 0)
19670  "flcbdfWrappers.memoryview", /*tp_name*/
19671  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
19672  0, /*tp_itemsize*/
19673  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
19674  #if PY_VERSION_HEX < 0x030800b4
19675  0, /*tp_print*/
19676  #endif
19677  #if PY_VERSION_HEX >= 0x030800b4
19678  0, /*tp_vectorcall_offset*/
19679  #endif
19680  0, /*tp_getattr*/
19681  0, /*tp_setattr*/
19682  #if PY_MAJOR_VERSION < 3
19683  0, /*tp_compare*/
19684  #endif
19685  #if PY_MAJOR_VERSION >= 3
19686  0, /*tp_as_async*/
19687  #endif
19688  __pyx_memoryview___repr__, /*tp_repr*/
19689  0, /*tp_as_number*/
19690  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
19691  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
19692  0, /*tp_hash*/
19693  0, /*tp_call*/
19694  __pyx_memoryview___str__, /*tp_str*/
19695  0, /*tp_getattro*/
19696  0, /*tp_setattro*/
19697  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
19698  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19699  0, /*tp_doc*/
19700  __pyx_tp_traverse_memoryview, /*tp_traverse*/
19701  __pyx_tp_clear_memoryview, /*tp_clear*/
19702  0, /*tp_richcompare*/
19703  0, /*tp_weaklistoffset*/
19704  0, /*tp_iter*/
19705  0, /*tp_iternext*/
19706  __pyx_methods_memoryview, /*tp_methods*/
19707  0, /*tp_members*/
19708  __pyx_getsets_memoryview, /*tp_getset*/
19709  0, /*tp_base*/
19710  0, /*tp_dict*/
19711  0, /*tp_descr_get*/
19712  0, /*tp_descr_set*/
19713  0, /*tp_dictoffset*/
19714  0, /*tp_init*/
19715  0, /*tp_alloc*/
19716  __pyx_tp_new_memoryview, /*tp_new*/
19717  0, /*tp_free*/
19718  0, /*tp_is_gc*/
19719  0, /*tp_bases*/
19720  0, /*tp_mro*/
19721  0, /*tp_cache*/
19722  0, /*tp_subclasses*/
19723  0, /*tp_weaklist*/
19724  0, /*tp_del*/
19725  0, /*tp_version_tag*/
19726  #if PY_VERSION_HEX >= 0x030400a1
19727  0, /*tp_finalize*/
19728  #endif
19729  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
19730  0, /*tp_vectorcall*/
19731  #endif
19732  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19733  0, /*tp_print*/
19734  #endif
19735  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
19736  0, /*tp_pypy_flags*/
19737  #endif
19738 };
19739 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
19740 
19741 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
19742  struct __pyx_memoryviewslice_obj *p;
19743  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
19744  if (unlikely(!o)) return 0;
19745  p = ((struct __pyx_memoryviewslice_obj *)o);
19746  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
19747  p->from_object = Py_None; Py_INCREF(Py_None);
19748  p->from_slice.memview = NULL;
19749  return o;
19750 }
19751 
19752 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
19753  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
19754  #if CYTHON_USE_TP_FINALIZE
19755  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
19756  if (PyObject_CallFinalizerFromDealloc(o)) return;
19757  }
19758  #endif
19759  PyObject_GC_UnTrack(o);
19760  {
19761  PyObject *etype, *eval, *etb;
19762  PyErr_Fetch(&etype, &eval, &etb);
19763  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19764  __pyx_memoryviewslice___dealloc__(o);
19765  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19766  PyErr_Restore(etype, eval, etb);
19767  }
19768  Py_CLEAR(p->from_object);
19769  PyObject_GC_Track(o);
19770  __pyx_tp_dealloc_memoryview(o);
19771 }
19772 
19773 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
19774  int e;
19775  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
19776  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
19777  if (p->from_object) {
19778  e = (*v)(p->from_object, a); if (e) return e;
19779  }
19780  return 0;
19781 }
19782 
19783 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
19784  PyObject* tmp;
19785  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
19786  __pyx_tp_clear_memoryview(o);
19787  tmp = ((PyObject*)p->from_object);
19788  p->from_object = Py_None; Py_INCREF(Py_None);
19789  Py_XDECREF(tmp);
19790  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
19791  return 0;
19792 }
19793 
19794 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
19795  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
19796 }
19797 
19798 static PyMethodDef __pyx_methods__memoryviewslice[] = {
19799  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
19800  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
19801  {0, 0, 0, 0}
19802 };
19803 
19804 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
19805  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
19806  {0, 0, 0, 0, 0}
19807 };
19808 
19809 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
19810  PyVarObject_HEAD_INIT(0, 0)
19811  "flcbdfWrappers._memoryviewslice", /*tp_name*/
19812  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
19813  0, /*tp_itemsize*/
19814  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
19815  #if PY_VERSION_HEX < 0x030800b4
19816  0, /*tp_print*/
19817  #endif
19818  #if PY_VERSION_HEX >= 0x030800b4
19819  0, /*tp_vectorcall_offset*/
19820  #endif
19821  0, /*tp_getattr*/
19822  0, /*tp_setattr*/
19823  #if PY_MAJOR_VERSION < 3
19824  0, /*tp_compare*/
19825  #endif
19826  #if PY_MAJOR_VERSION >= 3
19827  0, /*tp_as_async*/
19828  #endif
19829  #if CYTHON_COMPILING_IN_PYPY
19830  __pyx_memoryview___repr__, /*tp_repr*/
19831  #else
19832  0, /*tp_repr*/
19833  #endif
19834  0, /*tp_as_number*/
19835  0, /*tp_as_sequence*/
19836  0, /*tp_as_mapping*/
19837  0, /*tp_hash*/
19838  0, /*tp_call*/
19839  #if CYTHON_COMPILING_IN_PYPY
19840  __pyx_memoryview___str__, /*tp_str*/
19841  #else
19842  0, /*tp_str*/
19843  #endif
19844  0, /*tp_getattro*/
19845  0, /*tp_setattro*/
19846  0, /*tp_as_buffer*/
19847  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19848  "Internal class for passing memoryview slices to Python", /*tp_doc*/
19849  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
19850  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
19851  0, /*tp_richcompare*/
19852  0, /*tp_weaklistoffset*/
19853  0, /*tp_iter*/
19854  0, /*tp_iternext*/
19855  __pyx_methods__memoryviewslice, /*tp_methods*/
19856  0, /*tp_members*/
19857  __pyx_getsets__memoryviewslice, /*tp_getset*/
19858  0, /*tp_base*/
19859  0, /*tp_dict*/
19860  0, /*tp_descr_get*/
19861  0, /*tp_descr_set*/
19862  0, /*tp_dictoffset*/
19863  0, /*tp_init*/
19864  0, /*tp_alloc*/
19865  __pyx_tp_new__memoryviewslice, /*tp_new*/
19866  0, /*tp_free*/
19867  0, /*tp_is_gc*/
19868  0, /*tp_bases*/
19869  0, /*tp_mro*/
19870  0, /*tp_cache*/
19871  0, /*tp_subclasses*/
19872  0, /*tp_weaklist*/
19873  0, /*tp_del*/
19874  0, /*tp_version_tag*/
19875  #if PY_VERSION_HEX >= 0x030400a1
19876  0, /*tp_finalize*/
19877  #endif
19878  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
19879  0, /*tp_vectorcall*/
19880  #endif
19881  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19882  0, /*tp_print*/
19883  #endif
19884  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
19885  0, /*tp_pypy_flags*/
19886  #endif
19887 };
19888 
19889 static PyMethodDef __pyx_methods[] = {
19890  {0, 0, 0, 0}
19891 };
19892 
19893 #if PY_MAJOR_VERSION >= 3
19894 #if CYTHON_PEP489_MULTI_PHASE_INIT
19895 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19896 static int __pyx_pymod_exec_flcbdfWrappers(PyObject* module); /*proto*/
19897 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19898  {Py_mod_create, (void*)__pyx_pymod_create},
19899  {Py_mod_exec, (void*)__pyx_pymod_exec_flcbdfWrappers},
19900  {0, NULL}
19901 };
19902 #endif
19903 
19904 static struct PyModuleDef __pyx_moduledef = {
19905  PyModuleDef_HEAD_INIT,
19906  "flcbdfWrappers",
19907  0, /* m_doc */
19908  #if CYTHON_PEP489_MULTI_PHASE_INIT
19909  0, /* m_size */
19910  #else
19911  -1, /* m_size */
19912  #endif
19913  __pyx_methods /* m_methods */,
19914  #if CYTHON_PEP489_MULTI_PHASE_INIT
19915  __pyx_moduledef_slots, /* m_slots */
19916  #else
19917  NULL, /* m_reload */
19918  #endif
19919  NULL, /* m_traverse */
19920  NULL, /* m_clear */
19921  NULL /* m_free */
19922 };
19923 #endif
19924 #ifndef CYTHON_SMALL_CODE
19925 #if defined(__clang__)
19926  #define CYTHON_SMALL_CODE
19927 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
19928  #define CYTHON_SMALL_CODE __attribute__((cold))
19929 #else
19930  #define CYTHON_SMALL_CODE
19931 #endif
19932 #endif
19933 
19934 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19935  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
19936  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
19937  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
19938  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
19939  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
19940  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
19941  {&__pyx_n_s_Dy, __pyx_k_Dy, sizeof(__pyx_k_Dy), 0, 0, 1, 1},
19942  {&__pyx_n_s_Dyprime, __pyx_k_Dyprime, sizeof(__pyx_k_Dyprime), 0, 0, 1, 1},
19943  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
19944  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
19945  {&__pyx_n_s_FLCBDF_integrator, __pyx_k_FLCBDF_integrator, sizeof(__pyx_k_FLCBDF_integrator), 0, 0, 1, 1},
19946  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
19947  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
19948  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19949  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
19950  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
19951  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
19952  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
19953  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
19954  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
19955  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
19956  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
19957  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
19958  {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0},
19959  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19960  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
19961  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19962  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
19963  {&__pyx_kp_b__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 0, 0},
19964  {&__pyx_kp_b__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 0, 0},
19965  {&__pyx_kp_b__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 0, 0},
19966  {&__pyx_kp_b__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 0, 0},
19967  {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0},
19968  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
19969  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
19970  {&__pyx_n_s_atol, __pyx_k_atol, sizeof(__pyx_k_atol), 0, 0, 1, 1},
19971  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
19972  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
19973  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
19974  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
19975  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19976  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
19977  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
19978  {&__pyx_n_s_dV, __pyx_k_dV, sizeof(__pyx_k_dV), 0, 0, 1, 1},
19979  {&__pyx_kp_s_data__0_d___1_s_txt, __pyx_k_data__0_d___1_s_txt, sizeof(__pyx_k_data__0_d___1_s_txt), 0, 0, 1, 0},
19980  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
19981  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
19982  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
19983  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
19984  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
19985  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
19986  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
19987  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
19988  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
19989  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19990  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
19991  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
19992  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19993  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
19994  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
19995  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
19996  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19997  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
19998  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
19999  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
20000  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
20001  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
20002  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
20003  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
20004  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
20005  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
20006  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
20007  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
20008  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
20009  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
20010  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
20011  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
20012  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
20013  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
20014  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
20015  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
20016  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
20017  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
20018  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
20019  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
20020  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
20021  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
20022  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
20023  {&__pyx_n_s_rtol, __pyx_k_rtol, sizeof(__pyx_k_rtol), 0, 0, 1, 1},
20024  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
20025  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
20026  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
20027  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
20028  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
20029  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
20030  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
20031  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
20032  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
20033  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
20034  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
20035  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
20036  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
20037  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
20038  {&__pyx_n_s_t0, __pyx_k_t0, sizeof(__pyx_k_t0), 0, 0, 1, 1},
20039  {&__pyx_n_s_tOut, __pyx_k_tOut, sizeof(__pyx_k_tOut), 0, 0, 1, 1},
20040  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
20041  {&__pyx_n_s_tout, __pyx_k_tout, sizeof(__pyx_k_tout), 0, 0, 1, 1},
20042  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
20043  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
20044  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
20045  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
20046  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
20047  {&__pyx_n_s_yName, __pyx_k_yName, sizeof(__pyx_k_yName), 0, 0, 1, 1},
20048  {&__pyx_n_s_yPrime, __pyx_k_yPrime, sizeof(__pyx_k_yPrime), 0, 0, 1, 1},
20049  {&__pyx_n_s_yprime, __pyx_k_yprime, sizeof(__pyx_k_yprime), 0, 0, 1, 1},
20050  {0, 0, 0, 0, 0, 0, 0}
20051 };
20052 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
20053  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
20054  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error)
20055  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 133, __pyx_L1_error)
20056  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 148, __pyx_L1_error)
20057  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 151, __pyx_L1_error)
20058  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 180, __pyx_L1_error)
20059  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 404, __pyx_L1_error)
20060  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 613, __pyx_L1_error)
20061  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 832, __pyx_L1_error)
20062  return 0;
20063  __pyx_L1_error:;
20064  return -1;
20065 }
20066 
20067 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
20068  __Pyx_RefNannyDeclarations
20069  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
20070 
20071  /* "flcbdfWrappers.pyx":31
20072  * def setInitialGuess(self, np.ndarray y):
20073  * yn = np.asarray(<double[:self.flcbdf.yn.ldim_]> self.flcbdf.yn.p_)
20074  * y[:] = yn # <<<<<<<<<<<<<<
20075  *
20076  * def lastStepErrorOk(self, np.ndarray y):
20077  */
20078  __pyx_slice_ = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice_)) __PYX_ERR(1, 31, __pyx_L1_error)
20079  __Pyx_GOTREF(__pyx_slice_);
20080  __Pyx_GIVEREF(__pyx_slice_);
20081 
20082  /* "(tree fragment)":2
20083  * def __reduce_cython__(self):
20084  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20085  * def __setstate_cython__(self, __pyx_state):
20086  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20087  */
20088  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2, __pyx_L1_error)
20089  __Pyx_GOTREF(__pyx_tuple__2);
20090  __Pyx_GIVEREF(__pyx_tuple__2);
20091 
20092  /* "(tree fragment)":4
20093  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20094  * def __setstate_cython__(self, __pyx_state):
20095  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20096  */
20097  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 4, __pyx_L1_error)
20098  __Pyx_GOTREF(__pyx_tuple__3);
20099  __Pyx_GIVEREF(__pyx_tuple__3);
20100 
20101  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
20102  * __pyx_import_array()
20103  * except Exception:
20104  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
20105  *
20106  * cdef inline int import_umath() except -1:
20107  */
20108  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 945, __pyx_L1_error)
20109  __Pyx_GOTREF(__pyx_tuple__4);
20110  __Pyx_GIVEREF(__pyx_tuple__4);
20111 
20112  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
20113  * _import_umath()
20114  * except Exception:
20115  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
20116  *
20117  * cdef inline int import_ufunc() except -1:
20118  */
20119  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 951, __pyx_L1_error)
20120  __Pyx_GOTREF(__pyx_tuple__5);
20121  __Pyx_GIVEREF(__pyx_tuple__5);
20122 
20123  /* "View.MemoryView":133
20124  *
20125  * if not self.ndim:
20126  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
20127  *
20128  * if itemsize <= 0:
20129  */
20130  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 133, __pyx_L1_error)
20131  __Pyx_GOTREF(__pyx_tuple__6);
20132  __Pyx_GIVEREF(__pyx_tuple__6);
20133 
20134  /* "View.MemoryView":136
20135  *
20136  * if itemsize <= 0:
20137  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
20138  *
20139  * if not isinstance(format, bytes):
20140  */
20141  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 136, __pyx_L1_error)
20142  __Pyx_GOTREF(__pyx_tuple__7);
20143  __Pyx_GIVEREF(__pyx_tuple__7);
20144 
20145  /* "View.MemoryView":148
20146  *
20147  * if not self._shape:
20148  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
20149  *
20150  *
20151  */
20152  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 148, __pyx_L1_error)
20153  __Pyx_GOTREF(__pyx_tuple__8);
20154  __Pyx_GIVEREF(__pyx_tuple__8);
20155 
20156  /* "View.MemoryView":176
20157  * self.data = <char *>malloc(self.len)
20158  * if not self.data:
20159  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
20160  *
20161  * if self.dtype_is_object:
20162  */
20163  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 176, __pyx_L1_error)
20164  __Pyx_GOTREF(__pyx_tuple__9);
20165  __Pyx_GIVEREF(__pyx_tuple__9);
20166 
20167  /* "View.MemoryView":192
20168  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20169  * if not (flags & bufmode):
20170  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
20171  * info.buf = self.data
20172  * info.len = self.len
20173  */
20174  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 192, __pyx_L1_error)
20175  __Pyx_GOTREF(__pyx_tuple__10);
20176  __Pyx_GIVEREF(__pyx_tuple__10);
20177 
20178  /* "(tree fragment)":2
20179  * def __reduce_cython__(self):
20180  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20181  * def __setstate_cython__(self, __pyx_state):
20182  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20183  */
20184  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2, __pyx_L1_error)
20185  __Pyx_GOTREF(__pyx_tuple__11);
20186  __Pyx_GIVEREF(__pyx_tuple__11);
20187 
20188  /* "(tree fragment)":4
20189  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20190  * def __setstate_cython__(self, __pyx_state):
20191  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20192  */
20193  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 4, __pyx_L1_error)
20194  __Pyx_GOTREF(__pyx_tuple__12);
20195  __Pyx_GIVEREF(__pyx_tuple__12);
20196 
20197  /* "View.MemoryView":418
20198  * def __setitem__(memoryview self, object index, object value):
20199  * if self.view.readonly:
20200  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
20201  *
20202  * have_slices, index = _unellipsify(index, self.view.ndim)
20203  */
20204  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 418, __pyx_L1_error)
20205  __Pyx_GOTREF(__pyx_tuple__13);
20206  __Pyx_GIVEREF(__pyx_tuple__13);
20207 
20208  /* "View.MemoryView":495
20209  * result = struct.unpack(self.view.format, bytesitem)
20210  * except struct.error:
20211  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
20212  * else:
20213  * if len(self.view.format) == 1:
20214  */
20215  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 495, __pyx_L1_error)
20216  __Pyx_GOTREF(__pyx_tuple__14);
20217  __Pyx_GIVEREF(__pyx_tuple__14);
20218 
20219  /* "View.MemoryView":520
20220  * def __getbuffer__(self, Py_buffer *info, int flags):
20221  * if flags & PyBUF_WRITABLE and self.view.readonly:
20222  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
20223  *
20224  * if flags & PyBUF_ND:
20225  */
20226  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 520, __pyx_L1_error)
20227  __Pyx_GOTREF(__pyx_tuple__15);
20228  __Pyx_GIVEREF(__pyx_tuple__15);
20229 
20230  /* "View.MemoryView":570
20231  * if self.view.strides == NULL:
20232  *
20233  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
20234  *
20235  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
20236  */
20237  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 570, __pyx_L1_error)
20238  __Pyx_GOTREF(__pyx_tuple__16);
20239  __Pyx_GIVEREF(__pyx_tuple__16);
20240 
20241  /* "View.MemoryView":577
20242  * def suboffsets(self):
20243  * if self.view.suboffsets == NULL:
20244  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
20245  *
20246  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
20247  */
20248  __pyx_tuple__17 = PyTuple_New(1); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 577, __pyx_L1_error)
20249  __Pyx_GOTREF(__pyx_tuple__17);
20250  __Pyx_INCREF(__pyx_int_neg_1);
20251  __Pyx_GIVEREF(__pyx_int_neg_1);
20252  PyTuple_SET_ITEM(__pyx_tuple__17, 0, __pyx_int_neg_1);
20253  __Pyx_GIVEREF(__pyx_tuple__17);
20254 
20255  /* "(tree fragment)":2
20256  * def __reduce_cython__(self):
20257  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20258  * def __setstate_cython__(self, __pyx_state):
20259  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20260  */
20261  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 2, __pyx_L1_error)
20262  __Pyx_GOTREF(__pyx_tuple__18);
20263  __Pyx_GIVEREF(__pyx_tuple__18);
20264 
20265  /* "(tree fragment)":4
20266  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20267  * def __setstate_cython__(self, __pyx_state):
20268  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20269  */
20270  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 4, __pyx_L1_error)
20271  __Pyx_GOTREF(__pyx_tuple__19);
20272  __Pyx_GIVEREF(__pyx_tuple__19);
20273 
20274  /* "View.MemoryView":703
20275  * for suboffset in suboffsets[:ndim]:
20276  * if suboffset >= 0:
20277  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
20278  *
20279  *
20280  */
20281  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 703, __pyx_L1_error)
20282  __Pyx_GOTREF(__pyx_tuple__20);
20283  __Pyx_GIVEREF(__pyx_tuple__20);
20284 
20285  /* "(tree fragment)":2
20286  * def __reduce_cython__(self):
20287  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20288  * def __setstate_cython__(self, __pyx_state):
20289  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20290  */
20291  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 2, __pyx_L1_error)
20292  __Pyx_GOTREF(__pyx_tuple__21);
20293  __Pyx_GIVEREF(__pyx_tuple__21);
20294 
20295  /* "(tree fragment)":4
20296  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20297  * def __setstate_cython__(self, __pyx_state):
20298  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20299  */
20300  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 4, __pyx_L1_error)
20301  __Pyx_GOTREF(__pyx_tuple__22);
20302  __Pyx_GIVEREF(__pyx_tuple__22);
20303  __pyx_tuple__23 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 4, __pyx_L1_error)
20304  __Pyx_GOTREF(__pyx_tuple__23);
20305  __Pyx_GIVEREF(__pyx_tuple__23);
20306 
20307  /* "View.MemoryView":286
20308  * return self.name
20309  *
20310  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
20311  * cdef strided = Enum("<strided and direct>") # default
20312  * cdef indirect = Enum("<strided and indirect>")
20313  */
20314  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 286, __pyx_L1_error)
20315  __Pyx_GOTREF(__pyx_tuple__29);
20316  __Pyx_GIVEREF(__pyx_tuple__29);
20317 
20318  /* "View.MemoryView":287
20319  *
20320  * cdef generic = Enum("<strided and direct or indirect>")
20321  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
20322  * cdef indirect = Enum("<strided and indirect>")
20323  *
20324  */
20325  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 287, __pyx_L1_error)
20326  __Pyx_GOTREF(__pyx_tuple__30);
20327  __Pyx_GIVEREF(__pyx_tuple__30);
20328 
20329  /* "View.MemoryView":288
20330  * cdef generic = Enum("<strided and direct or indirect>")
20331  * cdef strided = Enum("<strided and direct>") # default
20332  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
20333  *
20334  *
20335  */
20336  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 288, __pyx_L1_error)
20337  __Pyx_GOTREF(__pyx_tuple__31);
20338  __Pyx_GIVEREF(__pyx_tuple__31);
20339 
20340  /* "View.MemoryView":291
20341  *
20342  *
20343  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
20344  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
20345  *
20346  */
20347  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 291, __pyx_L1_error)
20348  __Pyx_GOTREF(__pyx_tuple__32);
20349  __Pyx_GIVEREF(__pyx_tuple__32);
20350 
20351  /* "View.MemoryView":292
20352  *
20353  * cdef contiguous = Enum("<contiguous and direct>")
20354  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
20355  *
20356  *
20357  */
20358  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 292, __pyx_L1_error)
20359  __Pyx_GOTREF(__pyx_tuple__33);
20360  __Pyx_GIVEREF(__pyx_tuple__33);
20361 
20362  /* "(tree fragment)":1
20363  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
20364  * cdef object __pyx_PickleError
20365  * cdef object __pyx_result
20366  */
20367  __pyx_tuple__34 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1, __pyx_L1_error)
20368  __Pyx_GOTREF(__pyx_tuple__34);
20369  __Pyx_GIVEREF(__pyx_tuple__34);
20370  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1, __pyx_L1_error)
20371  __Pyx_RefNannyFinishContext();
20372  return 0;
20373  __pyx_L1_error:;
20374  __Pyx_RefNannyFinishContext();
20375  return -1;
20376 }
20377 
20378 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
20379  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
20380  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
20381  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
20382  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(1, 1, __pyx_L1_error)
20383  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(1, 1, __pyx_L1_error)
20384  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(1, 1, __pyx_L1_error)
20385  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error)
20386  return 0;
20387  __pyx_L1_error:;
20388  return -1;
20389 }
20390 
20391 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
20392 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
20393 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
20394 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
20395 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
20396 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
20397 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
20398 
20399 static int __Pyx_modinit_global_init_code(void) {
20400  __Pyx_RefNannyDeclarations
20401  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
20402  /*--- Global init code ---*/
20403  generic = Py_None; Py_INCREF(Py_None);
20404  strided = Py_None; Py_INCREF(Py_None);
20405  indirect = Py_None; Py_INCREF(Py_None);
20406  contiguous = Py_None; Py_INCREF(Py_None);
20407  indirect_contiguous = Py_None; Py_INCREF(Py_None);
20408  __Pyx_RefNannyFinishContext();
20409  return 0;
20410 }
20411 
20412 static int __Pyx_modinit_variable_export_code(void) {
20413  __Pyx_RefNannyDeclarations
20414  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
20415  /*--- Variable export code ---*/
20416  __Pyx_RefNannyFinishContext();
20417  return 0;
20418 }
20419 
20420 static int __Pyx_modinit_function_export_code(void) {
20421  __Pyx_RefNannyDeclarations
20422  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
20423  /*--- Function export code ---*/
20424  __Pyx_RefNannyFinishContext();
20425  return 0;
20426 }
20427 
20428 static int __Pyx_modinit_type_init_code(void) {
20429  __Pyx_RefNannyDeclarations
20430  int __pyx_lineno = 0;
20431  const char *__pyx_filename = NULL;
20432  int __pyx_clineno = 0;
20433  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
20434  /*--- Type init code ---*/
20435  if (PyType_Ready(&__pyx_type_14flcbdfWrappers_FLCBDF_integrator) < 0) __PYX_ERR(1, 5, __pyx_L1_error)
20436  #if PY_VERSION_HEX < 0x030800B1
20437  __pyx_type_14flcbdfWrappers_FLCBDF_integrator.tp_print = 0;
20438  #endif
20439  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_14flcbdfWrappers_FLCBDF_integrator.tp_dictoffset && __pyx_type_14flcbdfWrappers_FLCBDF_integrator.tp_getattro == PyObject_GenericGetAttr)) {
20440  __pyx_type_14flcbdfWrappers_FLCBDF_integrator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20441  }
20442  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FLCBDF_integrator, (PyObject *)&__pyx_type_14flcbdfWrappers_FLCBDF_integrator) < 0) __PYX_ERR(1, 5, __pyx_L1_error)
20443  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_14flcbdfWrappers_FLCBDF_integrator) < 0) __PYX_ERR(1, 5, __pyx_L1_error)
20444  __pyx_ptype_14flcbdfWrappers_FLCBDF_integrator = &__pyx_type_14flcbdfWrappers_FLCBDF_integrator;
20445  __pyx_vtabptr_array = &__pyx_vtable_array;
20446  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
20447  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
20448  #if PY_VERSION_HEX < 0x030800B1
20449  __pyx_type___pyx_array.tp_print = 0;
20450  #endif
20451  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
20452  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
20453  __pyx_array_type = &__pyx_type___pyx_array;
20454  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
20455  #if PY_VERSION_HEX < 0x030800B1
20456  __pyx_type___pyx_MemviewEnum.tp_print = 0;
20457  #endif
20458  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
20459  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20460  }
20461  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
20462  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
20463  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
20464  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
20465  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
20466  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
20467  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
20468  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
20469  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
20470  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
20471  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
20472  #if PY_VERSION_HEX < 0x030800B1
20473  __pyx_type___pyx_memoryview.tp_print = 0;
20474  #endif
20475  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
20476  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20477  }
20478  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
20479  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
20480  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
20481  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
20482  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
20483  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
20484  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
20485  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
20486  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
20487  #if PY_VERSION_HEX < 0x030800B1
20488  __pyx_type___pyx_memoryviewslice.tp_print = 0;
20489  #endif
20490  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
20491  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20492  }
20493  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
20494  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
20495  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
20496  __Pyx_RefNannyFinishContext();
20497  return 0;
20498  __pyx_L1_error:;
20499  __Pyx_RefNannyFinishContext();
20500  return -1;
20501 }
20502 
20503 static int __Pyx_modinit_type_import_code(void) {
20504  __Pyx_RefNannyDeclarations
20505  PyObject *__pyx_t_1 = NULL;
20506  int __pyx_lineno = 0;
20507  const char *__pyx_filename = NULL;
20508  int __pyx_clineno = 0;
20509  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
20510  /*--- Type import code ---*/
20511  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
20512  __Pyx_GOTREF(__pyx_t_1);
20513  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
20514  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
20515  sizeof(PyTypeObject),
20516  #else
20517  sizeof(PyHeapTypeObject),
20518  #endif
20519  __Pyx_ImportType_CheckSize_Warn);
20520  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
20521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20522  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error)
20523  __Pyx_GOTREF(__pyx_t_1);
20524  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
20525  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error)
20526  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
20527  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error)
20528  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
20529  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error)
20530  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
20531  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error)
20532  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20533  if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error)
20534  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20535  if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error)
20536  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20537  if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error)
20538  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20539  if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error)
20540  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20541  if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error)
20542  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20543  if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error)
20544  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20545  if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error)
20546  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20547  if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error)
20548  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20549  if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error)
20550  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
20551  if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error)
20552  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
20553  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error)
20554  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20555  __Pyx_RefNannyFinishContext();
20556  return 0;
20557  __pyx_L1_error:;
20558  __Pyx_XDECREF(__pyx_t_1);
20559  __Pyx_RefNannyFinishContext();
20560  return -1;
20561 }
20562 
20563 static int __Pyx_modinit_variable_import_code(void) {
20564  __Pyx_RefNannyDeclarations
20565  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
20566  /*--- Variable import code ---*/
20567  __Pyx_RefNannyFinishContext();
20568  return 0;
20569 }
20570 
20571 static int __Pyx_modinit_function_import_code(void) {
20572  __Pyx_RefNannyDeclarations
20573  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
20574  /*--- Function import code ---*/
20575  __Pyx_RefNannyFinishContext();
20576  return 0;
20577 }
20578 
20579 
20580 #ifndef CYTHON_NO_PYINIT_EXPORT
20581 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20582 #elif PY_MAJOR_VERSION < 3
20583 #ifdef __cplusplus
20584 #define __Pyx_PyMODINIT_FUNC extern "C" void
20585 #else
20586 #define __Pyx_PyMODINIT_FUNC void
20587 #endif
20588 #else
20589 #ifdef __cplusplus
20590 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
20591 #else
20592 #define __Pyx_PyMODINIT_FUNC PyObject *
20593 #endif
20594 #endif
20595 
20596 
20597 #if PY_MAJOR_VERSION < 3
20598 __Pyx_PyMODINIT_FUNC initflcbdfWrappers(void) CYTHON_SMALL_CODE; /*proto*/
20599 __Pyx_PyMODINIT_FUNC initflcbdfWrappers(void)
20600 #else
20601 __Pyx_PyMODINIT_FUNC PyInit_flcbdfWrappers(void) CYTHON_SMALL_CODE; /*proto*/
20602 __Pyx_PyMODINIT_FUNC PyInit_flcbdfWrappers(void)
20603 #if CYTHON_PEP489_MULTI_PHASE_INIT
20604 {
20605  return PyModuleDef_Init(&__pyx_moduledef);
20606 }
20607 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
20608  #if PY_VERSION_HEX >= 0x030700A1
20609  static PY_INT64_T main_interpreter_id = -1;
20610  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
20611  if (main_interpreter_id == -1) {
20612  main_interpreter_id = current_id;
20613  return (unlikely(current_id == -1)) ? -1 : 0;
20614  } else if (unlikely(main_interpreter_id != current_id))
20615  #else
20616  static PyInterpreterState *main_interpreter = NULL;
20617  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
20618  if (!main_interpreter) {
20619  main_interpreter = current_interpreter;
20620  } else if (unlikely(main_interpreter != current_interpreter))
20621  #endif
20622  {
20623  PyErr_SetString(
20624  PyExc_ImportError,
20625  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
20626  return -1;
20627  }
20628  return 0;
20629 }
20630 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
20631  PyObject *value = PyObject_GetAttrString(spec, from_name);
20632  int result = 0;
20633  if (likely(value)) {
20634  if (allow_none || value != Py_None) {
20635  result = PyDict_SetItemString(moddict, to_name, value);
20636  }
20637  Py_DECREF(value);
20638  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
20639  PyErr_Clear();
20640  } else {
20641  result = -1;
20642  }
20643  return result;
20644 }
20645 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
20646  PyObject *module = NULL, *moddict, *modname;
20647  if (__Pyx_check_single_interpreter())
20648  return NULL;
20649  if (__pyx_m)
20650  return __Pyx_NewRef(__pyx_m);
20651  modname = PyObject_GetAttrString(spec, "name");
20652  if (unlikely(!modname)) goto bad;
20653  module = PyModule_NewObject(modname);
20654  Py_DECREF(modname);
20655  if (unlikely(!module)) goto bad;
20656  moddict = PyModule_GetDict(module);
20657  if (unlikely(!moddict)) goto bad;
20658  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
20659  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
20660  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
20661  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
20662  return module;
20663 bad:
20664  Py_XDECREF(module);
20665  return NULL;
20666 }
20667 
20668 
20669 static CYTHON_SMALL_CODE int __pyx_pymod_exec_flcbdfWrappers(PyObject *__pyx_pyinit_module)
20670 #endif
20671 #endif
20672 {
20673  PyObject *__pyx_t_1 = NULL;
20674  static PyThread_type_lock __pyx_t_2[8];
20675  int __pyx_lineno = 0;
20676  const char *__pyx_filename = NULL;
20677  int __pyx_clineno = 0;
20678  __Pyx_RefNannyDeclarations
20679  #if CYTHON_PEP489_MULTI_PHASE_INIT
20680  if (__pyx_m) {
20681  if (__pyx_m == __pyx_pyinit_module) return 0;
20682  PyErr_SetString(PyExc_RuntimeError, "Module 'flcbdfWrappers' has already been imported. Re-initialisation is not supported.");
20683  return -1;
20684  }
20685  #elif PY_MAJOR_VERSION >= 3
20686  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
20687  #endif
20688  #if CYTHON_REFNANNY
20689 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20690 if (!__Pyx_RefNanny) {
20691  PyErr_Clear();
20692  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20693  if (!__Pyx_RefNanny)
20694  Py_FatalError("failed to import 'refnanny' module");
20695 }
20696 #endif
20697  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_flcbdfWrappers(void)", 0);
20698  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20699  #ifdef __Pxy_PyFrame_Initialize_Offsets
20700  __Pxy_PyFrame_Initialize_Offsets();
20701  #endif
20702  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
20703  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
20704  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
20705  #ifdef __Pyx_CyFunction_USED
20706  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20707  #endif
20708  #ifdef __Pyx_FusedFunction_USED
20709  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20710  #endif
20711  #ifdef __Pyx_Coroutine_USED
20712  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20713  #endif
20714  #ifdef __Pyx_Generator_USED
20715  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20716  #endif
20717  #ifdef __Pyx_AsyncGen_USED
20718  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20719  #endif
20720  #ifdef __Pyx_StopAsyncIteration_USED
20721  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20722  #endif
20723  /*--- Library function declarations ---*/
20724  /*--- Threads initialization code ---*/
20725  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20726  PyEval_InitThreads();
20727  #endif
20728  /*--- Module creation code ---*/
20729  #if CYTHON_PEP489_MULTI_PHASE_INIT
20730  __pyx_m = __pyx_pyinit_module;
20731  Py_INCREF(__pyx_m);
20732  #else
20733  #if PY_MAJOR_VERSION < 3
20734  __pyx_m = Py_InitModule4("flcbdfWrappers", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20735  #else
20736  __pyx_m = PyModule_Create(&__pyx_moduledef);
20737  #endif
20738  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
20739  #endif
20740  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
20741  Py_INCREF(__pyx_d);
20742  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
20743  Py_INCREF(__pyx_b);
20744  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
20745  Py_INCREF(__pyx_cython_runtime);
20746  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
20747  /*--- Initialize various global constants etc. ---*/
20748  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20749  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20750  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20751  #endif
20752  if (__pyx_module_is_main_flcbdfWrappers) {
20753  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20754  }
20755  #if PY_MAJOR_VERSION >= 3
20756  {
20757  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
20758  if (!PyDict_GetItemString(modules, "flcbdfWrappers")) {
20759  if (unlikely(PyDict_SetItemString(modules, "flcbdfWrappers", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
20760  }
20761  }
20762  #endif
20763  /*--- Builtin init code ---*/
20764  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20765  /*--- Constants init code ---*/
20766  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20767  /*--- Global type/function init code ---*/
20768  (void)__Pyx_modinit_global_init_code();
20769  (void)__Pyx_modinit_variable_export_code();
20770  (void)__Pyx_modinit_function_export_code();
20771  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
20772  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
20773  (void)__Pyx_modinit_variable_import_code();
20774  (void)__Pyx_modinit_function_import_code();
20775  /*--- Execution code ---*/
20776  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20777  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20778  #endif
20779 
20780  /* "flcbdfWrappers.pyx":2
20781  * # A type of -*- python -*- file
20782  * import numpy as np # <<<<<<<<<<<<<<
20783  * cimport numpy as np
20784  *
20785  */
20786  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
20787  __Pyx_GOTREF(__pyx_t_1);
20788  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(1, 2, __pyx_L1_error)
20789  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20790 
20791  /* "flcbdfWrappers.pyx":1
20792  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
20793  * import numpy as np
20794  * cimport numpy as np
20795  */
20796  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
20797  __Pyx_GOTREF(__pyx_t_1);
20798  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
20799  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20800 
20801  /* "View.MemoryView":209
20802  * info.obj = self
20803  *
20804  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
20805  *
20806  * def __dealloc__(array self):
20807  */
20808  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
20809  __Pyx_GOTREF(__pyx_t_1);
20810  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
20811  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20812  PyType_Modified(__pyx_array_type);
20813 
20814  /* "View.MemoryView":286
20815  * return self.name
20816  *
20817  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
20818  * cdef strided = Enum("<strided and direct>") # default
20819  * cdef indirect = Enum("<strided and indirect>")
20820  */
20821  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
20822  __Pyx_GOTREF(__pyx_t_1);
20823  __Pyx_XGOTREF(generic);
20824  __Pyx_DECREF_SET(generic, __pyx_t_1);
20825  __Pyx_GIVEREF(__pyx_t_1);
20826  __pyx_t_1 = 0;
20827 
20828  /* "View.MemoryView":287
20829  *
20830  * cdef generic = Enum("<strided and direct or indirect>")
20831  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
20832  * cdef indirect = Enum("<strided and indirect>")
20833  *
20834  */
20835  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
20836  __Pyx_GOTREF(__pyx_t_1);
20837  __Pyx_XGOTREF(strided);
20838  __Pyx_DECREF_SET(strided, __pyx_t_1);
20839  __Pyx_GIVEREF(__pyx_t_1);
20840  __pyx_t_1 = 0;
20841 
20842  /* "View.MemoryView":288
20843  * cdef generic = Enum("<strided and direct or indirect>")
20844  * cdef strided = Enum("<strided and direct>") # default
20845  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
20846  *
20847  *
20848  */
20849  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
20850  __Pyx_GOTREF(__pyx_t_1);
20851  __Pyx_XGOTREF(indirect);
20852  __Pyx_DECREF_SET(indirect, __pyx_t_1);
20853  __Pyx_GIVEREF(__pyx_t_1);
20854  __pyx_t_1 = 0;
20855 
20856  /* "View.MemoryView":291
20857  *
20858  *
20859  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
20860  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
20861  *
20862  */
20863  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
20864  __Pyx_GOTREF(__pyx_t_1);
20865  __Pyx_XGOTREF(contiguous);
20866  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
20867  __Pyx_GIVEREF(__pyx_t_1);
20868  __pyx_t_1 = 0;
20869 
20870  /* "View.MemoryView":292
20871  *
20872  * cdef contiguous = Enum("<contiguous and direct>")
20873  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
20874  *
20875  *
20876  */
20877  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
20878  __Pyx_GOTREF(__pyx_t_1);
20879  __Pyx_XGOTREF(indirect_contiguous);
20880  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
20881  __Pyx_GIVEREF(__pyx_t_1);
20882  __pyx_t_1 = 0;
20883 
20884  /* "View.MemoryView":316
20885  *
20886  * DEF THREAD_LOCKS_PREALLOCATED = 8
20887  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
20888  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
20889  * PyThread_allocate_lock(),
20890  */
20891  __pyx_memoryview_thread_locks_used = 0;
20892 
20893  /* "View.MemoryView":317
20894  * DEF THREAD_LOCKS_PREALLOCATED = 8
20895  * cdef int __pyx_memoryview_thread_locks_used = 0
20896  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
20897  * PyThread_allocate_lock(),
20898  * PyThread_allocate_lock(),
20899  */
20900  __pyx_t_2[0] = PyThread_allocate_lock();
20901  __pyx_t_2[1] = PyThread_allocate_lock();
20902  __pyx_t_2[2] = PyThread_allocate_lock();
20903  __pyx_t_2[3] = PyThread_allocate_lock();
20904  __pyx_t_2[4] = PyThread_allocate_lock();
20905  __pyx_t_2[5] = PyThread_allocate_lock();
20906  __pyx_t_2[6] = PyThread_allocate_lock();
20907  __pyx_t_2[7] = PyThread_allocate_lock();
20908  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_2, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
20909 
20910  /* "View.MemoryView":549
20911  * info.obj = self
20912  *
20913  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
20914  *
20915  *
20916  */
20917  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
20918  __Pyx_GOTREF(__pyx_t_1);
20919  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
20920  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20921  PyType_Modified(__pyx_memoryview_type);
20922 
20923  /* "View.MemoryView":995
20924  * return self.from_object
20925  *
20926  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
20927  *
20928  *
20929  */
20930  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
20931  __Pyx_GOTREF(__pyx_t_1);
20932  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 995, __pyx_L1_error)
20933  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20934  PyType_Modified(__pyx_memoryviewslice_type);
20935 
20936  /* "(tree fragment)":1
20937  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
20938  * cdef object __pyx_PickleError
20939  * cdef object __pyx_result
20940  */
20941  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20942  __Pyx_GOTREF(__pyx_t_1);
20943  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20944  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20945 
20946  /* "BufferFormatFromTypeInfo":1463
20947  *
20948  * @cname('__pyx_format_from_typeinfo')
20949  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
20950  * cdef __Pyx_StructField *field
20951  * cdef __pyx_typeinfo_string fmt
20952  */
20953 
20954  /*--- Wrapped vars code ---*/
20955 
20956  goto __pyx_L0;
20957  __pyx_L1_error:;
20958  __Pyx_XDECREF(__pyx_t_1);
20959  if (__pyx_m) {
20960  if (__pyx_d) {
20961  __Pyx_AddTraceback("init flcbdfWrappers", __pyx_clineno, __pyx_lineno, __pyx_filename);
20962  }
20963  Py_CLEAR(__pyx_m);
20964  } else if (!PyErr_Occurred()) {
20965  PyErr_SetString(PyExc_ImportError, "init flcbdfWrappers");
20966  }
20967  __pyx_L0:;
20968  __Pyx_RefNannyFinishContext();
20969  #if CYTHON_PEP489_MULTI_PHASE_INIT
20970  return (__pyx_m != NULL) ? 0 : -1;
20971  #elif PY_MAJOR_VERSION >= 3
20972  return __pyx_m;
20973  #else
20974  return;
20975  #endif
20976 }
20977 
20978 /* --- Runtime support code --- */
20979 /* Refnanny */
20980 #if CYTHON_REFNANNY
20981 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20982  PyObject *m = NULL, *p = NULL;
20983  void *r = NULL;
20984  m = PyImport_ImportModule(modname);
20985  if (!m) goto end;
20986  p = PyObject_GetAttrString(m, "RefNannyAPI");
20987  if (!p) goto end;
20988  r = PyLong_AsVoidPtr(p);
20989 end:
20990  Py_XDECREF(p);
20991  Py_XDECREF(m);
20992  return (__Pyx_RefNannyAPIStruct *)r;
20993 }
20994 #endif
20995 
20996 /* PyObjectGetAttrStr */
20997 #if CYTHON_USE_TYPE_SLOTS
20998 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20999  PyTypeObject* tp = Py_TYPE(obj);
21000  if (likely(tp->tp_getattro))
21001  return tp->tp_getattro(obj, attr_name);
21002 #if PY_MAJOR_VERSION < 3
21003  if (likely(tp->tp_getattr))
21004  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
21005 #endif
21006  return PyObject_GetAttr(obj, attr_name);
21007 }
21008 #endif
21009 
21010 /* GetBuiltinName */
21011 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
21012  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
21013  if (unlikely(!result)) {
21014  PyErr_Format(PyExc_NameError,
21015 #if PY_MAJOR_VERSION >= 3
21016  "name '%U' is not defined", name);
21017 #else
21018  "name '%.200s' is not defined", PyString_AS_STRING(name));
21019 #endif
21020  }
21021  return result;
21022 }
21023 
21024 /* RaiseArgTupleInvalid */
21025 static void __Pyx_RaiseArgtupleInvalid(
21026  const char* func_name,
21027  int exact,
21028  Py_ssize_t num_min,
21029  Py_ssize_t num_max,
21030  Py_ssize_t num_found)
21031 {
21032  Py_ssize_t num_expected;
21033  const char *more_or_less;
21034  if (num_found < num_min) {
21035  num_expected = num_min;
21036  more_or_less = "at least";
21037  } else {
21038  num_expected = num_max;
21039  more_or_less = "at most";
21040  }
21041  if (exact) {
21042  more_or_less = "exactly";
21043  }
21044  PyErr_Format(PyExc_TypeError,
21045  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21046  func_name, more_or_less, num_expected,
21047  (num_expected == 1) ? "" : "s", num_found);
21048 }
21049 
21050 /* RaiseDoubleKeywords */
21051 static void __Pyx_RaiseDoubleKeywordsError(
21052  const char* func_name,
21053  PyObject* kw_name)
21054 {
21055  PyErr_Format(PyExc_TypeError,
21056  #if PY_MAJOR_VERSION >= 3
21057  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21058  #else
21059  "%s() got multiple values for keyword argument '%s'", func_name,
21060  PyString_AsString(kw_name));
21061  #endif
21062 }
21063 
21064 /* ParseKeywords */
21065 static int __Pyx_ParseOptionalKeywords(
21066  PyObject *kwds,
21067  PyObject **argnames[],
21068  PyObject *kwds2,
21069  PyObject *values[],
21070  Py_ssize_t num_pos_args,
21071  const char* function_name)
21072 {
21073  PyObject *key = 0, *value = 0;
21074  Py_ssize_t pos = 0;
21075  PyObject*** name;
21076  PyObject*** first_kw_arg = argnames + num_pos_args;
21077  while (PyDict_Next(kwds, &pos, &key, &value)) {
21078  name = first_kw_arg;
21079  while (*name && (**name != key)) name++;
21080  if (*name) {
21081  values[name-argnames] = value;
21082  continue;
21083  }
21084  name = first_kw_arg;
21085  #if PY_MAJOR_VERSION < 3
21086  if (likely(PyString_Check(key))) {
21087  while (*name) {
21088  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21089  && _PyString_Eq(**name, key)) {
21090  values[name-argnames] = value;
21091  break;
21092  }
21093  name++;
21094  }
21095  if (*name) continue;
21096  else {
21097  PyObject*** argname = argnames;
21098  while (argname != first_kw_arg) {
21099  if ((**argname == key) || (
21100  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21101  && _PyString_Eq(**argname, key))) {
21102  goto arg_passed_twice;
21103  }
21104  argname++;
21105  }
21106  }
21107  } else
21108  #endif
21109  if (likely(PyUnicode_Check(key))) {
21110  while (*name) {
21111  int cmp = (**name == key) ? 0 :
21112  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21113  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
21114  #endif
21115  PyUnicode_Compare(**name, key);
21116  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21117  if (cmp == 0) {
21118  values[name-argnames] = value;
21119  break;
21120  }
21121  name++;
21122  }
21123  if (*name) continue;
21124  else {
21125  PyObject*** argname = argnames;
21126  while (argname != first_kw_arg) {
21127  int cmp = (**argname == key) ? 0 :
21128  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21129  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
21130  #endif
21131  PyUnicode_Compare(**argname, key);
21132  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21133  if (cmp == 0) goto arg_passed_twice;
21134  argname++;
21135  }
21136  }
21137  } else
21138  goto invalid_keyword_type;
21139  if (kwds2) {
21140  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21141  } else {
21142  goto invalid_keyword;
21143  }
21144  }
21145  return 0;
21146 arg_passed_twice:
21147  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21148  goto bad;
21149 invalid_keyword_type:
21150  PyErr_Format(PyExc_TypeError,
21151  "%.200s() keywords must be strings", function_name);
21152  goto bad;
21153 invalid_keyword:
21154  PyErr_Format(PyExc_TypeError,
21155  #if PY_MAJOR_VERSION < 3
21156  "%.200s() got an unexpected keyword argument '%.200s'",
21157  function_name, PyString_AsString(key));
21158  #else
21159  "%s() got an unexpected keyword argument '%U'",
21160  function_name, key);
21161  #endif
21162 bad:
21163  return -1;
21164 }
21165 
21166 /* ArgTypeTest */
21167 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21168 {
21169  if (unlikely(!type)) {
21170  PyErr_SetString(PyExc_SystemError, "Missing type object");
21171  return 0;
21172  }
21173  else if (exact) {
21174  #if PY_MAJOR_VERSION == 2
21175  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21176  #endif
21177  }
21178  else {
21179  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21180  }
21181  PyErr_Format(PyExc_TypeError,
21182  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21183  name, type->tp_name, Py_TYPE(obj)->tp_name);
21184  return 0;
21185 }
21186 
21187 /* PyDictVersioning */
21188 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
21189 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
21190  PyObject *dict = Py_TYPE(obj)->tp_dict;
21191  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
21192 }
21193 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
21194  PyObject **dictptr = NULL;
21195  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
21196  if (offset) {
21197 #if CYTHON_COMPILING_IN_CPYTHON
21198  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
21199 #else
21200  dictptr = _PyObject_GetDictPtr(obj);
21201 #endif
21202  }
21203  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
21204 }
21205 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
21206  PyObject *dict = Py_TYPE(obj)->tp_dict;
21207  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
21208  return 0;
21209  return obj_dict_version == __Pyx_get_object_dict_version(obj);
21210 }
21211 #endif
21212 
21213 /* GetModuleGlobalName */
21214 #if CYTHON_USE_DICT_VERSIONS
21215 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
21216 #else
21217 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
21218 #endif
21219 {
21220  PyObject *result;
21221 #if !CYTHON_AVOID_BORROWED_REFS
21222 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
21223  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
21224  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21225  if (likely(result)) {
21226  return __Pyx_NewRef(result);
21227  } else if (unlikely(PyErr_Occurred())) {
21228  return NULL;
21229  }
21230 #else
21231  result = PyDict_GetItem(__pyx_d, name);
21232  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21233  if (likely(result)) {
21234  return __Pyx_NewRef(result);
21235  }
21236 #endif
21237 #else
21238  result = PyObject_GetItem(__pyx_d, name);
21239  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21240  if (likely(result)) {
21241  return __Pyx_NewRef(result);
21242  }
21243  PyErr_Clear();
21244 #endif
21245  return __Pyx_GetBuiltinName(name);
21246 }
21247 
21248 /* PyCFunctionFastCall */
21249 #if CYTHON_FAST_PYCCALL
21250 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
21251  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
21252  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
21253  PyObject *self = PyCFunction_GET_SELF(func);
21254  int flags = PyCFunction_GET_FLAGS(func);
21255  assert(PyCFunction_Check(func));
21256  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
21257  assert(nargs >= 0);
21258  assert(nargs == 0 || args != NULL);
21259  /* _PyCFunction_FastCallDict() must not be called with an exception set,
21260  because it may clear it (directly or indirectly) and so the
21261  caller loses its exception */
21262  assert(!PyErr_Occurred());
21263  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
21264  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
21265  } else {
21266  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
21267  }
21268 }
21269 #endif
21270 
21271 /* PyFunctionFastCall */
21272 #if CYTHON_FAST_PYCALL
21273 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
21274  PyObject *globals) {
21275  PyFrameObject *f;
21276  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21277  PyObject **fastlocals;
21278  Py_ssize_t i;
21279  PyObject *result;
21280  assert(globals != NULL);
21281  /* XXX Perhaps we should create a specialized
21282  PyFrame_New() that doesn't take locals, but does
21283  take builtins without sanity checking them.
21284  */
21285  assert(tstate != NULL);
21286  f = PyFrame_New(tstate, co, globals, NULL);
21287  if (f == NULL) {
21288  return NULL;
21289  }
21290  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
21291  for (i = 0; i < na; i++) {
21292  Py_INCREF(*args);
21293  fastlocals[i] = *args++;
21294  }
21295  result = PyEval_EvalFrameEx(f,0);
21296  ++tstate->recursion_depth;
21297  Py_DECREF(f);
21298  --tstate->recursion_depth;
21299  return result;
21300 }
21301 #if 1 || PY_VERSION_HEX < 0x030600B1
21302 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
21303  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
21304  PyObject *globals = PyFunction_GET_GLOBALS(func);
21305  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
21306  PyObject *closure;
21307 #if PY_MAJOR_VERSION >= 3
21308  PyObject *kwdefs;
21309 #endif
21310  PyObject *kwtuple, **k;
21311  PyObject **d;
21312  Py_ssize_t nd;
21313  Py_ssize_t nk;
21314  PyObject *result;
21315  assert(kwargs == NULL || PyDict_Check(kwargs));
21316  nk = kwargs ? PyDict_Size(kwargs) : 0;
21317  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
21318  return NULL;
21319  }
21320  if (
21321 #if PY_MAJOR_VERSION >= 3
21322  co->co_kwonlyargcount == 0 &&
21323 #endif
21324  likely(kwargs == NULL || nk == 0) &&
21325  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
21326  if (argdefs == NULL && co->co_argcount == nargs) {
21327  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
21328  goto done;
21329  }
21330  else if (nargs == 0 && argdefs != NULL
21331  && co->co_argcount == Py_SIZE(argdefs)) {
21332  /* function called with no arguments, but all parameters have
21333  a default value: use default values as arguments .*/
21334  args = &PyTuple_GET_ITEM(argdefs, 0);
21335  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
21336  goto done;
21337  }
21338  }
21339  if (kwargs != NULL) {
21340  Py_ssize_t pos, i;
21341  kwtuple = PyTuple_New(2 * nk);
21342  if (kwtuple == NULL) {
21343  result = NULL;
21344  goto done;
21345  }
21346  k = &PyTuple_GET_ITEM(kwtuple, 0);
21347  pos = i = 0;
21348  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
21349  Py_INCREF(k[i]);
21350  Py_INCREF(k[i+1]);
21351  i += 2;
21352  }
21353  nk = i / 2;
21354  }
21355  else {
21356  kwtuple = NULL;
21357  k = NULL;
21358  }
21359  closure = PyFunction_GET_CLOSURE(func);
21360 #if PY_MAJOR_VERSION >= 3
21361  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
21362 #endif
21363  if (argdefs != NULL) {
21364  d = &PyTuple_GET_ITEM(argdefs, 0);
21365  nd = Py_SIZE(argdefs);
21366  }
21367  else {
21368  d = NULL;
21369  nd = 0;
21370  }
21371 #if PY_MAJOR_VERSION >= 3
21372  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
21373  args, (int)nargs,
21374  k, (int)nk,
21375  d, (int)nd, kwdefs, closure);
21376 #else
21377  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
21378  args, (int)nargs,
21379  k, (int)nk,
21380  d, (int)nd, closure);
21381 #endif
21382  Py_XDECREF(kwtuple);
21383 done:
21384  Py_LeaveRecursiveCall();
21385  return result;
21386 }
21387 #endif
21388 #endif
21389 
21390 /* PyObjectCall */
21391 #if CYTHON_COMPILING_IN_CPYTHON
21392 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
21393  PyObject *result;
21394  ternaryfunc call = Py_TYPE(func)->tp_call;
21395  if (unlikely(!call))
21396  return PyObject_Call(func, arg, kw);
21397  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21398  return NULL;
21399  result = (*call)(func, arg, kw);
21400  Py_LeaveRecursiveCall();
21401  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21402  PyErr_SetString(
21403  PyExc_SystemError,
21404  "NULL result without error in PyObject_Call");
21405  }
21406  return result;
21407 }
21408 #endif
21409 
21410 /* PyObjectCall2Args */
21411 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21412  PyObject *args, *result = NULL;
21413  #if CYTHON_FAST_PYCALL
21414  if (PyFunction_Check(function)) {
21415  PyObject *args[2] = {arg1, arg2};
21416  return __Pyx_PyFunction_FastCall(function, args, 2);
21417  }
21418  #endif
21419  #if CYTHON_FAST_PYCCALL
21420  if (__Pyx_PyFastCFunction_Check(function)) {
21421  PyObject *args[2] = {arg1, arg2};
21422  return __Pyx_PyCFunction_FastCall(function, args, 2);
21423  }
21424  #endif
21425  args = PyTuple_New(2);
21426  if (unlikely(!args)) goto done;
21427  Py_INCREF(arg1);
21428  PyTuple_SET_ITEM(args, 0, arg1);
21429  Py_INCREF(arg2);
21430  PyTuple_SET_ITEM(args, 1, arg2);
21431  Py_INCREF(function);
21432  result = __Pyx_PyObject_Call(function, args, NULL);
21433  Py_DECREF(args);
21434  Py_DECREF(function);
21435 done:
21436  return result;
21437 }
21438 
21439 /* PyObjectCallMethO */
21440 #if CYTHON_COMPILING_IN_CPYTHON
21441 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21442  PyObject *self, *result;
21443  PyCFunction cfunc;
21444  cfunc = PyCFunction_GET_FUNCTION(func);
21445  self = PyCFunction_GET_SELF(func);
21446  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21447  return NULL;
21448  result = cfunc(self, arg);
21449  Py_LeaveRecursiveCall();
21450  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21451  PyErr_SetString(
21452  PyExc_SystemError,
21453  "NULL result without error in PyObject_Call");
21454  }
21455  return result;
21456 }
21457 #endif
21458 
21459 /* PyObjectCallOneArg */
21460 #if CYTHON_COMPILING_IN_CPYTHON
21461 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21462  PyObject *result;
21463  PyObject *args = PyTuple_New(1);
21464  if (unlikely(!args)) return NULL;
21465  Py_INCREF(arg);
21466  PyTuple_SET_ITEM(args, 0, arg);
21467  result = __Pyx_PyObject_Call(func, args, NULL);
21468  Py_DECREF(args);
21469  return result;
21470 }
21471 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21472 #if CYTHON_FAST_PYCALL
21473  if (PyFunction_Check(func)) {
21474  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21475  }
21476 #endif
21477  if (likely(PyCFunction_Check(func))) {
21478  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21479  return __Pyx_PyObject_CallMethO(func, arg);
21480 #if CYTHON_FAST_PYCCALL
21481  } else if (__Pyx_PyFastCFunction_Check(func)) {
21482  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21483 #endif
21484  }
21485  }
21486  return __Pyx__PyObject_CallOneArg(func, arg);
21487 }
21488 #else
21489 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21490  PyObject *result;
21491  PyObject *args = PyTuple_Pack(1, arg);
21492  if (unlikely(!args)) return NULL;
21493  result = __Pyx_PyObject_Call(func, args, NULL);
21494  Py_DECREF(args);
21495  return result;
21496 }
21497 #endif
21498 
21499 /* SliceObject */
21500 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
21501  Py_ssize_t cstart, Py_ssize_t cstop,
21502  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
21503  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
21504 #if CYTHON_USE_TYPE_SLOTS
21505  PyMappingMethods* mp;
21506 #if PY_MAJOR_VERSION < 3
21507  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
21508  if (likely(ms && ms->sq_ass_slice)) {
21509  if (!has_cstart) {
21510  if (_py_start && (*_py_start != Py_None)) {
21511  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
21512  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
21513  } else
21514  cstart = 0;
21515  }
21516  if (!has_cstop) {
21517  if (_py_stop && (*_py_stop != Py_None)) {
21518  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
21519  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
21520  } else
21521  cstop = PY_SSIZE_T_MAX;
21522  }
21523  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
21524  Py_ssize_t l = ms->sq_length(obj);
21525  if (likely(l >= 0)) {
21526  if (cstop < 0) {
21527  cstop += l;
21528  if (cstop < 0) cstop = 0;
21529  }
21530  if (cstart < 0) {
21531  cstart += l;
21532  if (cstart < 0) cstart = 0;
21533  }
21534  } else {
21535  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21536  goto bad;
21537  PyErr_Clear();
21538  }
21539  }
21540  return ms->sq_ass_slice(obj, cstart, cstop, value);
21541  }
21542 #endif
21543  mp = Py_TYPE(obj)->tp_as_mapping;
21544  if (likely(mp && mp->mp_ass_subscript))
21545 #endif
21546  {
21547  int result;
21548  PyObject *py_slice, *py_start, *py_stop;
21549  if (_py_slice) {
21550  py_slice = *_py_slice;
21551  } else {
21552  PyObject* owned_start = NULL;
21553  PyObject* owned_stop = NULL;
21554  if (_py_start) {
21555  py_start = *_py_start;
21556  } else {
21557  if (has_cstart) {
21558  owned_start = py_start = PyInt_FromSsize_t(cstart);
21559  if (unlikely(!py_start)) goto bad;
21560  } else
21561  py_start = Py_None;
21562  }
21563  if (_py_stop) {
21564  py_stop = *_py_stop;
21565  } else {
21566  if (has_cstop) {
21567  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
21568  if (unlikely(!py_stop)) {
21569  Py_XDECREF(owned_start);
21570  goto bad;
21571  }
21572  } else
21573  py_stop = Py_None;
21574  }
21575  py_slice = PySlice_New(py_start, py_stop, Py_None);
21576  Py_XDECREF(owned_start);
21577  Py_XDECREF(owned_stop);
21578  if (unlikely(!py_slice)) goto bad;
21579  }
21580 #if CYTHON_USE_TYPE_SLOTS
21581  result = mp->mp_ass_subscript(obj, py_slice, value);
21582 #else
21583  result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
21584 #endif
21585  if (!_py_slice) {
21586  Py_DECREF(py_slice);
21587  }
21588  return result;
21589  }
21590  PyErr_Format(PyExc_TypeError,
21591  "'%.200s' object does not support slice %.10s",
21592  Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
21593 bad:
21594  return -1;
21595 }
21596 
21597 /* PyObjectCallNoArg */
21598 #if CYTHON_COMPILING_IN_CPYTHON
21599 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21600 #if CYTHON_FAST_PYCALL
21601  if (PyFunction_Check(func)) {
21602  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21603  }
21604 #endif
21605 #ifdef __Pyx_CyFunction_USED
21606  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
21607 #else
21608  if (likely(PyCFunction_Check(func)))
21609 #endif
21610  {
21611  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21612  return __Pyx_PyObject_CallMethO(func, NULL);
21613  }
21614  }
21615  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21616 }
21617 #endif
21618 
21619 /* PyErrFetchRestore */
21620 #if CYTHON_FAST_THREAD_STATE
21621 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21622  PyObject *tmp_type, *tmp_value, *tmp_tb;
21623  tmp_type = tstate->curexc_type;
21624  tmp_value = tstate->curexc_value;
21625  tmp_tb = tstate->curexc_traceback;
21626  tstate->curexc_type = type;
21627  tstate->curexc_value = value;
21628  tstate->curexc_traceback = tb;
21629  Py_XDECREF(tmp_type);
21630  Py_XDECREF(tmp_value);
21631  Py_XDECREF(tmp_tb);
21632 }
21633 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21634  *type = tstate->curexc_type;
21635  *value = tstate->curexc_value;
21636  *tb = tstate->curexc_traceback;
21637  tstate->curexc_type = 0;
21638  tstate->curexc_value = 0;
21639  tstate->curexc_traceback = 0;
21640 }
21641 #endif
21642 
21643 /* RaiseException */
21644 #if PY_MAJOR_VERSION < 3
21645 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21646  CYTHON_UNUSED PyObject *cause) {
21647  __Pyx_PyThreadState_declare
21648  Py_XINCREF(type);
21649  if (!value || value == Py_None)
21650  value = NULL;
21651  else
21652  Py_INCREF(value);
21653  if (!tb || tb == Py_None)
21654  tb = NULL;
21655  else {
21656  Py_INCREF(tb);
21657  if (!PyTraceBack_Check(tb)) {
21658  PyErr_SetString(PyExc_TypeError,
21659  "raise: arg 3 must be a traceback or None");
21660  goto raise_error;
21661  }
21662  }
21663  if (PyType_Check(type)) {
21664 #if CYTHON_COMPILING_IN_PYPY
21665  if (!value) {
21666  Py_INCREF(Py_None);
21667  value = Py_None;
21668  }
21669 #endif
21670  PyErr_NormalizeException(&type, &value, &tb);
21671  } else {
21672  if (value) {
21673  PyErr_SetString(PyExc_TypeError,
21674  "instance exception may not have a separate value");
21675  goto raise_error;
21676  }
21677  value = type;
21678  type = (PyObject*) Py_TYPE(type);
21679  Py_INCREF(type);
21680  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21681  PyErr_SetString(PyExc_TypeError,
21682  "raise: exception class must be a subclass of BaseException");
21683  goto raise_error;
21684  }
21685  }
21686  __Pyx_PyThreadState_assign
21687  __Pyx_ErrRestore(type, value, tb);
21688  return;
21689 raise_error:
21690  Py_XDECREF(value);
21691  Py_XDECREF(type);
21692  Py_XDECREF(tb);
21693  return;
21694 }
21695 #else
21696 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21697  PyObject* owned_instance = NULL;
21698  if (tb == Py_None) {
21699  tb = 0;
21700  } else if (tb && !PyTraceBack_Check(tb)) {
21701  PyErr_SetString(PyExc_TypeError,
21702  "raise: arg 3 must be a traceback or None");
21703  goto bad;
21704  }
21705  if (value == Py_None)
21706  value = 0;
21707  if (PyExceptionInstance_Check(type)) {
21708  if (value) {
21709  PyErr_SetString(PyExc_TypeError,
21710  "instance exception may not have a separate value");
21711  goto bad;
21712  }
21713  value = type;
21714  type = (PyObject*) Py_TYPE(value);
21715  } else if (PyExceptionClass_Check(type)) {
21716  PyObject *instance_class = NULL;
21717  if (value && PyExceptionInstance_Check(value)) {
21718  instance_class = (PyObject*) Py_TYPE(value);
21719  if (instance_class != type) {
21720  int is_subclass = PyObject_IsSubclass(instance_class, type);
21721  if (!is_subclass) {
21722  instance_class = NULL;
21723  } else if (unlikely(is_subclass == -1)) {
21724  goto bad;
21725  } else {
21726  type = instance_class;
21727  }
21728  }
21729  }
21730  if (!instance_class) {
21731  PyObject *args;
21732  if (!value)
21733  args = PyTuple_New(0);
21734  else if (PyTuple_Check(value)) {
21735  Py_INCREF(value);
21736  args = value;
21737  } else
21738  args = PyTuple_Pack(1, value);
21739  if (!args)
21740  goto bad;
21741  owned_instance = PyObject_Call(type, args, NULL);
21742  Py_DECREF(args);
21743  if (!owned_instance)
21744  goto bad;
21745  value = owned_instance;
21746  if (!PyExceptionInstance_Check(value)) {
21747  PyErr_Format(PyExc_TypeError,
21748  "calling %R should have returned an instance of "
21749  "BaseException, not %R",
21750  type, Py_TYPE(value));
21751  goto bad;
21752  }
21753  }
21754  } else {
21755  PyErr_SetString(PyExc_TypeError,
21756  "raise: exception class must be a subclass of BaseException");
21757  goto bad;
21758  }
21759  if (cause) {
21760  PyObject *fixed_cause;
21761  if (cause == Py_None) {
21762  fixed_cause = NULL;
21763  } else if (PyExceptionClass_Check(cause)) {
21764  fixed_cause = PyObject_CallObject(cause, NULL);
21765  if (fixed_cause == NULL)
21766  goto bad;
21767  } else if (PyExceptionInstance_Check(cause)) {
21768  fixed_cause = cause;
21769  Py_INCREF(fixed_cause);
21770  } else {
21771  PyErr_SetString(PyExc_TypeError,
21772  "exception causes must derive from "
21773  "BaseException");
21774  goto bad;
21775  }
21776  PyException_SetCause(value, fixed_cause);
21777  }
21778  PyErr_SetObject(type, value);
21779  if (tb) {
21780 #if CYTHON_COMPILING_IN_PYPY
21781  PyObject *tmp_type, *tmp_value, *tmp_tb;
21782  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21783  Py_INCREF(tb);
21784  PyErr_Restore(tmp_type, tmp_value, tb);
21785  Py_XDECREF(tmp_tb);
21786 #else
21787  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21788  PyObject* tmp_tb = tstate->curexc_traceback;
21789  if (tb != tmp_tb) {
21790  Py_INCREF(tb);
21791  tstate->curexc_traceback = tb;
21792  Py_XDECREF(tmp_tb);
21793  }
21794 #endif
21795  }
21796 bad:
21797  Py_XDECREF(owned_instance);
21798  return;
21799 }
21800 #endif
21801 
21802 /* GetTopmostException */
21803 #if CYTHON_USE_EXC_INFO_STACK
21804 static _PyErr_StackItem *
21805 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
21806 {
21807  _PyErr_StackItem *exc_info = tstate->exc_info;
21808  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
21809  exc_info->previous_item != NULL)
21810  {
21811  exc_info = exc_info->previous_item;
21812  }
21813  return exc_info;
21814 }
21815 #endif
21816 
21817 /* SaveResetException */
21818 #if CYTHON_FAST_THREAD_STATE
21819 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21820  #if CYTHON_USE_EXC_INFO_STACK
21821  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
21822  *type = exc_info->exc_type;
21823  *value = exc_info->exc_value;
21824  *tb = exc_info->exc_traceback;
21825  #else
21826  *type = tstate->exc_type;
21827  *value = tstate->exc_value;
21828  *tb = tstate->exc_traceback;
21829  #endif
21830  Py_XINCREF(*type);
21831  Py_XINCREF(*value);
21832  Py_XINCREF(*tb);
21833 }
21834 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21835  PyObject *tmp_type, *tmp_value, *tmp_tb;
21836  #if CYTHON_USE_EXC_INFO_STACK
21837  _PyErr_StackItem *exc_info = tstate->exc_info;
21838  tmp_type = exc_info->exc_type;
21839  tmp_value = exc_info->exc_value;
21840  tmp_tb = exc_info->exc_traceback;
21841  exc_info->exc_type = type;
21842  exc_info->exc_value = value;
21843  exc_info->exc_traceback = tb;
21844  #else
21845  tmp_type = tstate->exc_type;
21846  tmp_value = tstate->exc_value;
21847  tmp_tb = tstate->exc_traceback;
21848  tstate->exc_type = type;
21849  tstate->exc_value = value;
21850  tstate->exc_traceback = tb;
21851  #endif
21852  Py_XDECREF(tmp_type);
21853  Py_XDECREF(tmp_value);
21854  Py_XDECREF(tmp_tb);
21855 }
21856 #endif
21857 
21858 /* PyErrExceptionMatches */
21859 #if CYTHON_FAST_THREAD_STATE
21860 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21861  Py_ssize_t i, n;
21862  n = PyTuple_GET_SIZE(tuple);
21863 #if PY_MAJOR_VERSION >= 3
21864  for (i=0; i<n; i++) {
21865  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21866  }
21867 #endif
21868  for (i=0; i<n; i++) {
21869  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21870  }
21871  return 0;
21872 }
21873 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21874  PyObject *exc_type = tstate->curexc_type;
21875  if (exc_type == err) return 1;
21876  if (unlikely(!exc_type)) return 0;
21877  if (unlikely(PyTuple_Check(err)))
21878  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21879  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21880 }
21881 #endif
21882 
21883 /* GetException */
21884 #if CYTHON_FAST_THREAD_STATE
21885 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
21886 #else
21887 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
21888 #endif
21889 {
21890  PyObject *local_type, *local_value, *local_tb;
21891 #if CYTHON_FAST_THREAD_STATE
21892  PyObject *tmp_type, *tmp_value, *tmp_tb;
21893  local_type = tstate->curexc_type;
21894  local_value = tstate->curexc_value;
21895  local_tb = tstate->curexc_traceback;
21896  tstate->curexc_type = 0;
21897  tstate->curexc_value = 0;
21898  tstate->curexc_traceback = 0;
21899 #else
21900  PyErr_Fetch(&local_type, &local_value, &local_tb);
21901 #endif
21902  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21903 #if CYTHON_FAST_THREAD_STATE
21904  if (unlikely(tstate->curexc_type))
21905 #else
21906  if (unlikely(PyErr_Occurred()))
21907 #endif
21908  goto bad;
21909  #if PY_MAJOR_VERSION >= 3
21910  if (local_tb) {
21911  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21912  goto bad;
21913  }
21914  #endif
21915  Py_XINCREF(local_tb);
21916  Py_XINCREF(local_type);
21917  Py_XINCREF(local_value);
21918  *type = local_type;
21919  *value = local_value;
21920  *tb = local_tb;
21921 #if CYTHON_FAST_THREAD_STATE
21922  #if CYTHON_USE_EXC_INFO_STACK
21923  {
21924  _PyErr_StackItem *exc_info = tstate->exc_info;
21925  tmp_type = exc_info->exc_type;
21926  tmp_value = exc_info->exc_value;
21927  tmp_tb = exc_info->exc_traceback;
21928  exc_info->exc_type = local_type;
21929  exc_info->exc_value = local_value;
21930  exc_info->exc_traceback = local_tb;
21931  }
21932  #else
21933  tmp_type = tstate->exc_type;
21934  tmp_value = tstate->exc_value;
21935  tmp_tb = tstate->exc_traceback;
21936  tstate->exc_type = local_type;
21937  tstate->exc_value = local_value;
21938  tstate->exc_traceback = local_tb;
21939  #endif
21940  Py_XDECREF(tmp_type);
21941  Py_XDECREF(tmp_value);
21942  Py_XDECREF(tmp_tb);
21943 #else
21944  PyErr_SetExcInfo(local_type, local_value, local_tb);
21945 #endif
21946  return 0;
21947 bad:
21948  *type = 0;
21949  *value = 0;
21950  *tb = 0;
21951  Py_XDECREF(local_type);
21952  Py_XDECREF(local_value);
21953  Py_XDECREF(local_tb);
21954  return -1;
21955 }
21956 
21957 /* BytesEquals */
21958 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21959 #if CYTHON_COMPILING_IN_PYPY
21960  return PyObject_RichCompareBool(s1, s2, equals);
21961 #else
21962  if (s1 == s2) {
21963  return (equals == Py_EQ);
21964  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21965  const char *ps1, *ps2;
21966  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21967  if (length != PyBytes_GET_SIZE(s2))
21968  return (equals == Py_NE);
21969  ps1 = PyBytes_AS_STRING(s1);
21970  ps2 = PyBytes_AS_STRING(s2);
21971  if (ps1[0] != ps2[0]) {
21972  return (equals == Py_NE);
21973  } else if (length == 1) {
21974  return (equals == Py_EQ);
21975  } else {
21976  int result;
21977 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
21978  Py_hash_t hash1, hash2;
21979  hash1 = ((PyBytesObject*)s1)->ob_shash;
21980  hash2 = ((PyBytesObject*)s2)->ob_shash;
21981  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21982  return (equals == Py_NE);
21983  }
21984 #endif
21985  result = memcmp(ps1, ps2, (size_t)length);
21986  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21987  }
21988  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21989  return (equals == Py_NE);
21990  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21991  return (equals == Py_NE);
21992  } else {
21993  int result;
21994  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21995  if (!py_result)
21996  return -1;
21997  result = __Pyx_PyObject_IsTrue(py_result);
21998  Py_DECREF(py_result);
21999  return result;
22000  }
22001 #endif
22002 }
22003 
22004 /* UnicodeEquals */
22005 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22006 #if CYTHON_COMPILING_IN_PYPY
22007  return PyObject_RichCompareBool(s1, s2, equals);
22008 #else
22009 #if PY_MAJOR_VERSION < 3
22010  PyObject* owned_ref = NULL;
22011 #endif
22012  int s1_is_unicode, s2_is_unicode;
22013  if (s1 == s2) {
22014  goto return_eq;
22015  }
22016  s1_is_unicode = PyUnicode_CheckExact(s1);
22017  s2_is_unicode = PyUnicode_CheckExact(s2);
22018 #if PY_MAJOR_VERSION < 3
22019  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22020  owned_ref = PyUnicode_FromObject(s2);
22021  if (unlikely(!owned_ref))
22022  return -1;
22023  s2 = owned_ref;
22024  s2_is_unicode = 1;
22025  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22026  owned_ref = PyUnicode_FromObject(s1);
22027  if (unlikely(!owned_ref))
22028  return -1;
22029  s1 = owned_ref;
22030  s1_is_unicode = 1;
22031  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22032  return __Pyx_PyBytes_Equals(s1, s2, equals);
22033  }
22034 #endif
22035  if (s1_is_unicode & s2_is_unicode) {
22036  Py_ssize_t length;
22037  int kind;
22038  void *data1, *data2;
22039  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22040  return -1;
22041  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22042  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22043  goto return_ne;
22044  }
22045 #if CYTHON_USE_UNICODE_INTERNALS
22046  {
22047  Py_hash_t hash1, hash2;
22048  #if CYTHON_PEP393_ENABLED
22049  hash1 = ((PyASCIIObject*)s1)->hash;
22050  hash2 = ((PyASCIIObject*)s2)->hash;
22051  #else
22052  hash1 = ((PyUnicodeObject*)s1)->hash;
22053  hash2 = ((PyUnicodeObject*)s2)->hash;
22054  #endif
22055  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22056  goto return_ne;
22057  }
22058  }
22059 #endif
22060  kind = __Pyx_PyUnicode_KIND(s1);
22061  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22062  goto return_ne;
22063  }
22064  data1 = __Pyx_PyUnicode_DATA(s1);
22065  data2 = __Pyx_PyUnicode_DATA(s2);
22066  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22067  goto return_ne;
22068  } else if (length == 1) {
22069  goto return_eq;
22070  } else {
22071  int result = memcmp(data1, data2, (size_t)(length * kind));
22072  #if PY_MAJOR_VERSION < 3
22073  Py_XDECREF(owned_ref);
22074  #endif
22075  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22076  }
22077  } else if ((s1 == Py_None) & s2_is_unicode) {
22078  goto return_ne;
22079  } else if ((s2 == Py_None) & s1_is_unicode) {
22080  goto return_ne;
22081  } else {
22082  int result;
22083  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22084  #if PY_MAJOR_VERSION < 3
22085  Py_XDECREF(owned_ref);
22086  #endif
22087  if (!py_result)
22088  return -1;
22089  result = __Pyx_PyObject_IsTrue(py_result);
22090  Py_DECREF(py_result);
22091  return result;
22092  }
22093 return_eq:
22094  #if PY_MAJOR_VERSION < 3
22095  Py_XDECREF(owned_ref);
22096  #endif
22097  return (equals == Py_EQ);
22098 return_ne:
22099  #if PY_MAJOR_VERSION < 3
22100  Py_XDECREF(owned_ref);
22101  #endif
22102  return (equals == Py_NE);
22103 #endif
22104 }
22105 
22106 /* DivInt[Py_ssize_t] */
22107 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
22108  Py_ssize_t q = a / b;
22109  Py_ssize_t r = a - q*b;
22110  q -= ((r != 0) & ((r ^ b) < 0));
22111  return q;
22112 }
22113 
22114 /* GetAttr */
22115 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
22116 #if CYTHON_USE_TYPE_SLOTS
22117 #if PY_MAJOR_VERSION >= 3
22118  if (likely(PyUnicode_Check(n)))
22119 #else
22120  if (likely(PyString_Check(n)))
22121 #endif
22122  return __Pyx_PyObject_GetAttrStr(o, n);
22123 #endif
22124  return PyObject_GetAttr(o, n);
22125 }
22126 
22127 /* GetItemInt */
22128 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
22129  PyObject *r;
22130  if (!j) return NULL;
22131  r = PyObject_GetItem(o, j);
22132  Py_DECREF(j);
22133  return r;
22134 }
22135 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
22136  CYTHON_NCP_UNUSED int wraparound,
22137  CYTHON_NCP_UNUSED int boundscheck) {
22138 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22139  Py_ssize_t wrapped_i = i;
22140  if (wraparound & unlikely(i < 0)) {
22141  wrapped_i += PyList_GET_SIZE(o);
22142  }
22143  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
22144  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
22145  Py_INCREF(r);
22146  return r;
22147  }
22148  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
22149 #else
22150  return PySequence_GetItem(o, i);
22151 #endif
22152 }
22153 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
22154  CYTHON_NCP_UNUSED int wraparound,
22155  CYTHON_NCP_UNUSED int boundscheck) {
22156 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22157  Py_ssize_t wrapped_i = i;
22158  if (wraparound & unlikely(i < 0)) {
22159  wrapped_i += PyTuple_GET_SIZE(o);
22160  }
22161  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
22162  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
22163  Py_INCREF(r);
22164  return r;
22165  }
22166  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
22167 #else
22168  return PySequence_GetItem(o, i);
22169 #endif
22170 }
22171 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
22172  CYTHON_NCP_UNUSED int wraparound,
22173  CYTHON_NCP_UNUSED int boundscheck) {
22174 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
22175  if (is_list || PyList_CheckExact(o)) {
22176  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
22177  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
22178  PyObject *r = PyList_GET_ITEM(o, n);
22179  Py_INCREF(r);
22180  return r;
22181  }
22182  }
22183  else if (PyTuple_CheckExact(o)) {
22184  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
22185  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
22186  PyObject *r = PyTuple_GET_ITEM(o, n);
22187  Py_INCREF(r);
22188  return r;
22189  }
22190  } else {
22191  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
22192  if (likely(m && m->sq_item)) {
22193  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
22194  Py_ssize_t l = m->sq_length(o);
22195  if (likely(l >= 0)) {
22196  i += l;
22197  } else {
22198  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
22199  return NULL;
22200  PyErr_Clear();
22201  }
22202  }
22203  return m->sq_item(o, i);
22204  }
22205  }
22206 #else
22207  if (is_list || PySequence_Check(o)) {
22208  return PySequence_GetItem(o, i);
22209  }
22210 #endif
22211  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
22212 }
22213 
22214 /* ObjectGetItem */
22215 #if CYTHON_USE_TYPE_SLOTS
22216 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
22217  PyObject *runerr;
22218  Py_ssize_t key_value;
22219  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
22220  if (unlikely(!(m && m->sq_item))) {
22221  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
22222  return NULL;
22223  }
22224  key_value = __Pyx_PyIndex_AsSsize_t(index);
22225  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
22226  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
22227  }
22228  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
22229  PyErr_Clear();
22230  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
22231  }
22232  return NULL;
22233 }
22234 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
22235  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
22236  if (likely(m && m->mp_subscript)) {
22237  return m->mp_subscript(obj, key);
22238  }
22239  return __Pyx_PyObject_GetIndex(obj, key);
22240 }
22241 #endif
22242 
22243 /* decode_c_string */
22244 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
22245  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
22246  const char* encoding, const char* errors,
22247  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
22248  Py_ssize_t length;
22249  if (unlikely((start < 0) | (stop < 0))) {
22250  size_t slen = strlen(cstring);
22251  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
22252  PyErr_SetString(PyExc_OverflowError,
22253  "c-string too long to convert to Python");
22254  return NULL;
22255  }
22256  length = (Py_ssize_t) slen;
22257  if (start < 0) {
22258  start += length;
22259  if (start < 0)
22260  start = 0;
22261  }
22262  if (stop < 0)
22263  stop += length;
22264  }
22265  if (unlikely(stop <= start))
22266  return __Pyx_NewRef(__pyx_empty_unicode);
22267  length = stop - start;
22268  cstring += start;
22269  if (decode_func) {
22270  return decode_func(cstring, length, errors);
22271  } else {
22272  return PyUnicode_Decode(cstring, length, encoding, errors);
22273  }
22274 }
22275 
22276 /* GetAttr3 */
22277 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
22278  __Pyx_PyThreadState_declare
22279  __Pyx_PyThreadState_assign
22280  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
22281  return NULL;
22282  __Pyx_PyErr_Clear();
22283  Py_INCREF(d);
22284  return d;
22285 }
22286 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
22287  PyObject *r = __Pyx_GetAttr(o, n);
22288  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
22289 }
22290 
22291 /* RaiseTooManyValuesToUnpack */
22292 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
22293  PyErr_Format(PyExc_ValueError,
22294  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
22295 }
22296 
22297 /* RaiseNeedMoreValuesToUnpack */
22298 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
22299  PyErr_Format(PyExc_ValueError,
22300  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
22301  index, (index == 1) ? "" : "s");
22302 }
22303 
22304 /* RaiseNoneIterError */
22305 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
22306  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
22307 }
22308 
22309 /* ExtTypeTest */
22310 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
22311  if (unlikely(!type)) {
22312  PyErr_SetString(PyExc_SystemError, "Missing type object");
22313  return 0;
22314  }
22315  if (likely(__Pyx_TypeCheck(obj, type)))
22316  return 1;
22317  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
22318  Py_TYPE(obj)->tp_name, type->tp_name);
22319  return 0;
22320 }
22321 
22322 /* SwapException */
22323 #if CYTHON_FAST_THREAD_STATE
22324 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22325  PyObject *tmp_type, *tmp_value, *tmp_tb;
22326  #if CYTHON_USE_EXC_INFO_STACK
22327  _PyErr_StackItem *exc_info = tstate->exc_info;
22328  tmp_type = exc_info->exc_type;
22329  tmp_value = exc_info->exc_value;
22330  tmp_tb = exc_info->exc_traceback;
22331  exc_info->exc_type = *type;
22332  exc_info->exc_value = *value;
22333  exc_info->exc_traceback = *tb;
22334  #else
22335  tmp_type = tstate->exc_type;
22336  tmp_value = tstate->exc_value;
22337  tmp_tb = tstate->exc_traceback;
22338  tstate->exc_type = *type;
22339  tstate->exc_value = *value;
22340  tstate->exc_traceback = *tb;
22341  #endif
22342  *type = tmp_type;
22343  *value = tmp_value;
22344  *tb = tmp_tb;
22345 }
22346 #else
22347 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22348  PyObject *tmp_type, *tmp_value, *tmp_tb;
22349  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22350  PyErr_SetExcInfo(*type, *value, *tb);
22351  *type = tmp_type;
22352  *value = tmp_value;
22353  *tb = tmp_tb;
22354 }
22355 #endif
22356 
22357 /* Import */
22358 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
22359  PyObject *empty_list = 0;
22360  PyObject *module = 0;
22361  PyObject *global_dict = 0;
22362  PyObject *empty_dict = 0;
22363  PyObject *list;
22364  #if PY_MAJOR_VERSION < 3
22365  PyObject *py_import;
22366  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
22367  if (!py_import)
22368  goto bad;
22369  #endif
22370  if (from_list)
22371  list = from_list;
22372  else {
22373  empty_list = PyList_New(0);
22374  if (!empty_list)
22375  goto bad;
22376  list = empty_list;
22377  }
22378  global_dict = PyModule_GetDict(__pyx_m);
22379  if (!global_dict)
22380  goto bad;
22381  empty_dict = PyDict_New();
22382  if (!empty_dict)
22383  goto bad;
22384  {
22385  #if PY_MAJOR_VERSION >= 3
22386  if (level == -1) {
22387  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
22388  module = PyImport_ImportModuleLevelObject(
22389  name, global_dict, empty_dict, list, 1);
22390  if (!module) {
22391  if (!PyErr_ExceptionMatches(PyExc_ImportError))
22392  goto bad;
22393  PyErr_Clear();
22394  }
22395  }
22396  level = 0;
22397  }
22398  #endif
22399  if (!module) {
22400  #if PY_MAJOR_VERSION < 3
22401  PyObject *py_level = PyInt_FromLong(level);
22402  if (!py_level)
22403  goto bad;
22404  module = PyObject_CallFunctionObjArgs(py_import,
22405  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
22406  Py_DECREF(py_level);
22407  #else
22408  module = PyImport_ImportModuleLevelObject(
22409  name, global_dict, empty_dict, list, level);
22410  #endif
22411  }
22412  }
22413 bad:
22414  #if PY_MAJOR_VERSION < 3
22415  Py_XDECREF(py_import);
22416  #endif
22417  Py_XDECREF(empty_list);
22418  Py_XDECREF(empty_dict);
22419  return module;
22420 }
22421 
22422 /* FastTypeChecks */
22423 #if CYTHON_COMPILING_IN_CPYTHON
22424 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22425  while (a) {
22426  a = a->tp_base;
22427  if (a == b)
22428  return 1;
22429  }
22430  return b == &PyBaseObject_Type;
22431 }
22432 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22433  PyObject *mro;
22434  if (a == b) return 1;
22435  mro = a->tp_mro;
22436  if (likely(mro)) {
22437  Py_ssize_t i, n;
22438  n = PyTuple_GET_SIZE(mro);
22439  for (i = 0; i < n; i++) {
22440  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22441  return 1;
22442  }
22443  return 0;
22444  }
22445  return __Pyx_InBases(a, b);
22446 }
22447 #if PY_MAJOR_VERSION == 2
22448 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22449  PyObject *exception, *value, *tb;
22450  int res;
22451  __Pyx_PyThreadState_declare
22452  __Pyx_PyThreadState_assign
22453  __Pyx_ErrFetch(&exception, &value, &tb);
22454  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22455  if (unlikely(res == -1)) {
22456  PyErr_WriteUnraisable(err);
22457  res = 0;
22458  }
22459  if (!res) {
22460  res = PyObject_IsSubclass(err, exc_type2);
22461  if (unlikely(res == -1)) {
22462  PyErr_WriteUnraisable(err);
22463  res = 0;
22464  }
22465  }
22466  __Pyx_ErrRestore(exception, value, tb);
22467  return res;
22468 }
22469 #else
22470 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22471  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22472  if (!res) {
22473  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22474  }
22475  return res;
22476 }
22477 #endif
22478 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22479  Py_ssize_t i, n;
22480  assert(PyExceptionClass_Check(exc_type));
22481  n = PyTuple_GET_SIZE(tuple);
22482 #if PY_MAJOR_VERSION >= 3
22483  for (i=0; i<n; i++) {
22484  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22485  }
22486 #endif
22487  for (i=0; i<n; i++) {
22488  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22489  #if PY_MAJOR_VERSION < 3
22490  if (likely(exc_type == t)) return 1;
22491  #endif
22492  if (likely(PyExceptionClass_Check(t))) {
22493  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22494  } else {
22495  }
22496  }
22497  return 0;
22498 }
22499 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22500  if (likely(err == exc_type)) return 1;
22501  if (likely(PyExceptionClass_Check(err))) {
22502  if (likely(PyExceptionClass_Check(exc_type))) {
22503  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22504  } else if (likely(PyTuple_Check(exc_type))) {
22505  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22506  } else {
22507  }
22508  }
22509  return PyErr_GivenExceptionMatches(err, exc_type);
22510 }
22511 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22512  assert(PyExceptionClass_Check(exc_type1));
22513  assert(PyExceptionClass_Check(exc_type2));
22514  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22515  if (likely(PyExceptionClass_Check(err))) {
22516  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22517  }
22518  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22519 }
22520 #endif
22521 
22522 /* PyIntBinop */
22523 #if !CYTHON_COMPILING_IN_PYPY
22524 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
22525  (void)inplace;
22526  (void)zerodivision_check;
22527  #if PY_MAJOR_VERSION < 3
22528  if (likely(PyInt_CheckExact(op1))) {
22529  const long b = intval;
22530  long x;
22531  long a = PyInt_AS_LONG(op1);
22532  x = (long)((unsigned long)a + b);
22533  if (likely((x^a) >= 0 || (x^b) >= 0))
22534  return PyInt_FromLong(x);
22535  return PyLong_Type.tp_as_number->nb_add(op1, op2);
22536  }
22537  #endif
22538  #if CYTHON_USE_PYLONG_INTERNALS
22539  if (likely(PyLong_CheckExact(op1))) {
22540  const long b = intval;
22541  long a, x;
22542 #ifdef HAVE_LONG_LONG
22543  const PY_LONG_LONG llb = intval;
22544  PY_LONG_LONG lla, llx;
22545 #endif
22546  const digit* digits = ((PyLongObject*)op1)->ob_digit;
22547  const Py_ssize_t size = Py_SIZE(op1);
22548  if (likely(__Pyx_sst_abs(size) <= 1)) {
22549  a = likely(size) ? digits[0] : 0;
22550  if (size == -1) a = -a;
22551  } else {
22552  switch (size) {
22553  case -2:
22554  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22555  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22556  break;
22557 #ifdef HAVE_LONG_LONG
22558  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
22559  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22560  goto long_long;
22561 #endif
22562  }
22563  CYTHON_FALLTHROUGH;
22564  case 2:
22565  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22566  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22567  break;
22568 #ifdef HAVE_LONG_LONG
22569  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
22570  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22571  goto long_long;
22572 #endif
22573  }
22574  CYTHON_FALLTHROUGH;
22575  case -3:
22576  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22577  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22578  break;
22579 #ifdef HAVE_LONG_LONG
22580  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
22581  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22582  goto long_long;
22583 #endif
22584  }
22585  CYTHON_FALLTHROUGH;
22586  case 3:
22587  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22588  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22589  break;
22590 #ifdef HAVE_LONG_LONG
22591  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
22592  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22593  goto long_long;
22594 #endif
22595  }
22596  CYTHON_FALLTHROUGH;
22597  case -4:
22598  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22599  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22600  break;
22601 #ifdef HAVE_LONG_LONG
22602  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
22603  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22604  goto long_long;
22605 #endif
22606  }
22607  CYTHON_FALLTHROUGH;
22608  case 4:
22609  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22610  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22611  break;
22612 #ifdef HAVE_LONG_LONG
22613  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
22614  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22615  goto long_long;
22616 #endif
22617  }
22618  CYTHON_FALLTHROUGH;
22619  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
22620  }
22621  }
22622  x = a + b;
22623  return PyLong_FromLong(x);
22624 #ifdef HAVE_LONG_LONG
22625  long_long:
22626  llx = lla + llb;
22627  return PyLong_FromLongLong(llx);
22628 #endif
22629 
22630 
22631  }
22632  #endif
22633  if (PyFloat_CheckExact(op1)) {
22634  const long b = intval;
22635  double a = PyFloat_AS_DOUBLE(op1);
22636  double result;
22637  PyFPE_START_PROTECT("add", return NULL)
22638  result = ((double)a) + (double)b;
22639  PyFPE_END_PROTECT(result)
22640  return PyFloat_FromDouble(result);
22641  }
22642  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
22643 }
22644 #endif
22645 
22646 /* None */
22647 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
22648  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
22649 }
22650 
22651 /* DivInt[long] */
22652 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
22653  long q = a / b;
22654  long r = a - q*b;
22655  q -= ((r != 0) & ((r ^ b) < 0));
22656  return q;
22657 }
22658 
22659 /* ImportFrom */
22660 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
22661  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
22662  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
22663  PyErr_Format(PyExc_ImportError,
22664  #if PY_MAJOR_VERSION < 3
22665  "cannot import name %.230s", PyString_AS_STRING(name));
22666  #else
22667  "cannot import name %S", name);
22668  #endif
22669  }
22670  return value;
22671 }
22672 
22673 /* HasAttr */
22674 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
22675  PyObject *r;
22676  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
22677  PyErr_SetString(PyExc_TypeError,
22678  "hasattr(): attribute name must be string");
22679  return -1;
22680  }
22681  r = __Pyx_GetAttr(o, n);
22682  if (unlikely(!r)) {
22683  PyErr_Clear();
22684  return 0;
22685  } else {
22686  Py_DECREF(r);
22687  return 1;
22688  }
22689 }
22690 
22691 /* StringJoin */
22692 #if !CYTHON_COMPILING_IN_CPYTHON
22693 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
22694  return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
22695 }
22696 #endif
22697 
22698 /* PyObject_GenericGetAttrNoDict */
22699 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22700 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
22701  PyErr_Format(PyExc_AttributeError,
22702 #if PY_MAJOR_VERSION >= 3
22703  "'%.50s' object has no attribute '%U'",
22704  tp->tp_name, attr_name);
22705 #else
22706  "'%.50s' object has no attribute '%.400s'",
22707  tp->tp_name, PyString_AS_STRING(attr_name));
22708 #endif
22709  return NULL;
22710 }
22711 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
22712  PyObject *descr;
22713  PyTypeObject *tp = Py_TYPE(obj);
22714  if (unlikely(!PyString_Check(attr_name))) {
22715  return PyObject_GenericGetAttr(obj, attr_name);
22716  }
22717  assert(!tp->tp_dictoffset);
22718  descr = _PyType_Lookup(tp, attr_name);
22719  if (unlikely(!descr)) {
22720  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
22721  }
22722  Py_INCREF(descr);
22723  #if PY_MAJOR_VERSION < 3
22724  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
22725  #endif
22726  {
22727  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
22728  if (unlikely(f)) {
22729  PyObject *res = f(descr, obj, (PyObject *)tp);
22730  Py_DECREF(descr);
22731  return res;
22732  }
22733  }
22734  return descr;
22735 }
22736 #endif
22737 
22738 /* PyObject_GenericGetAttr */
22739 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22740 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
22741  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
22742  return PyObject_GenericGetAttr(obj, attr_name);
22743  }
22744  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
22745 }
22746 #endif
22747 
22748 /* PyObjectGetAttrStrNoError */
22749 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
22750  __Pyx_PyThreadState_declare
22751  __Pyx_PyThreadState_assign
22752  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
22753  __Pyx_PyErr_Clear();
22754 }
22755 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
22756  PyObject *result;
22757 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
22758  PyTypeObject* tp = Py_TYPE(obj);
22759  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
22760  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
22761  }
22762 #endif
22763  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
22764  if (unlikely(!result)) {
22765  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
22766  }
22767  return result;
22768 }
22769 
22770 /* SetupReduce */
22771 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
22772  int ret;
22773  PyObject *name_attr;
22774  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
22775  if (likely(name_attr)) {
22776  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
22777  } else {
22778  ret = -1;
22779  }
22780  if (unlikely(ret < 0)) {
22781  PyErr_Clear();
22782  ret = 0;
22783  }
22784  Py_XDECREF(name_attr);
22785  return ret;
22786 }
22787 static int __Pyx_setup_reduce(PyObject* type_obj) {
22788  int ret = 0;
22789  PyObject *object_reduce = NULL;
22790  PyObject *object_getstate = NULL;
22791  PyObject *object_reduce_ex = NULL;
22792  PyObject *reduce = NULL;
22793  PyObject *reduce_ex = NULL;
22794  PyObject *reduce_cython = NULL;
22795  PyObject *setstate = NULL;
22796  PyObject *setstate_cython = NULL;
22797  PyObject *getstate = NULL;
22798 #if CYTHON_USE_PYTYPE_LOOKUP
22799  getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
22800 #else
22801  getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
22802  if (!getstate && PyErr_Occurred()) {
22803  goto __PYX_BAD;
22804  }
22805 #endif
22806  if (getstate) {
22807 #if CYTHON_USE_PYTYPE_LOOKUP
22808  object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
22809 #else
22810  object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
22811  if (!object_getstate && PyErr_Occurred()) {
22812  goto __PYX_BAD;
22813  }
22814 #endif
22815  if (object_getstate != getstate) {
22816  goto __PYX_GOOD;
22817  }
22818  }
22819 #if CYTHON_USE_PYTYPE_LOOKUP
22820  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
22821 #else
22822  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
22823 #endif
22824  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
22825  if (reduce_ex == object_reduce_ex) {
22826 #if CYTHON_USE_PYTYPE_LOOKUP
22827  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
22828 #else
22829  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
22830 #endif
22831  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
22832  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22833  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
22834  if (likely(reduce_cython)) {
22835  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22836  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22837  } else if (reduce == object_reduce || PyErr_Occurred()) {
22838  goto __PYX_BAD;
22839  }
22840  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22841  if (!setstate) PyErr_Clear();
22842  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22843  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
22844  if (likely(setstate_cython)) {
22845  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22846  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22847  } else if (!setstate || PyErr_Occurred()) {
22848  goto __PYX_BAD;
22849  }
22850  }
22851  PyType_Modified((PyTypeObject*)type_obj);
22852  }
22853  }
22854  goto __PYX_GOOD;
22855 __PYX_BAD:
22856  if (!PyErr_Occurred())
22857  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22858  ret = -1;
22859 __PYX_GOOD:
22860 #if !CYTHON_USE_PYTYPE_LOOKUP
22861  Py_XDECREF(object_reduce);
22862  Py_XDECREF(object_reduce_ex);
22863  Py_XDECREF(object_getstate);
22864  Py_XDECREF(getstate);
22865 #endif
22866  Py_XDECREF(reduce);
22867  Py_XDECREF(reduce_ex);
22868  Py_XDECREF(reduce_cython);
22869  Py_XDECREF(setstate);
22870  Py_XDECREF(setstate_cython);
22871  return ret;
22872 }
22873 
22874 /* SetVTable */
22875 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
22876 #if PY_VERSION_HEX >= 0x02070000
22877  PyObject *ob = PyCapsule_New(vtable, 0, 0);
22878 #else
22879  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
22880 #endif
22881  if (!ob)
22882  goto bad;
22883  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
22884  goto bad;
22885  Py_DECREF(ob);
22886  return 0;
22887 bad:
22888  Py_XDECREF(ob);
22889  return -1;
22890 }
22891 
22892 /* TypeImport */
22893 #ifndef __PYX_HAVE_RT_ImportType
22894 #define __PYX_HAVE_RT_ImportType
22895 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
22896  size_t size, enum __Pyx_ImportType_CheckSize check_size)
22897 {
22898  PyObject *result = 0;
22899  char warning[200];
22900  Py_ssize_t basicsize;
22901 #ifdef Py_LIMITED_API
22902  PyObject *py_basicsize;
22903 #endif
22904  result = PyObject_GetAttrString(module, class_name);
22905  if (!result)
22906  goto bad;
22907  if (!PyType_Check(result)) {
22908  PyErr_Format(PyExc_TypeError,
22909  "%.200s.%.200s is not a type object",
22910  module_name, class_name);
22911  goto bad;
22912  }
22913 #ifndef Py_LIMITED_API
22914  basicsize = ((PyTypeObject *)result)->tp_basicsize;
22915 #else
22916  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
22917  if (!py_basicsize)
22918  goto bad;
22919  basicsize = PyLong_AsSsize_t(py_basicsize);
22920  Py_DECREF(py_basicsize);
22921  py_basicsize = 0;
22922  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
22923  goto bad;
22924 #endif
22925  if ((size_t)basicsize < size) {
22926  PyErr_Format(PyExc_ValueError,
22927  "%.200s.%.200s size changed, may indicate binary incompatibility. "
22928  "Expected %zd from C header, got %zd from PyObject",
22929  module_name, class_name, size, basicsize);
22930  goto bad;
22931  }
22932  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
22933  PyErr_Format(PyExc_ValueError,
22934  "%.200s.%.200s size changed, may indicate binary incompatibility. "
22935  "Expected %zd from C header, got %zd from PyObject",
22936  module_name, class_name, size, basicsize);
22937  goto bad;
22938  }
22939  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
22940  PyOS_snprintf(warning, sizeof(warning),
22941  "%s.%s size changed, may indicate binary incompatibility. "
22942  "Expected %zd from C header, got %zd from PyObject",
22943  module_name, class_name, size, basicsize);
22944  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
22945  }
22946  return (PyTypeObject *)result;
22947 bad:
22948  Py_XDECREF(result);
22949  return NULL;
22950 }
22951 #endif
22952 
22953 /* CLineInTraceback */
22954 #ifndef CYTHON_CLINE_IN_TRACEBACK
22955 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
22956  PyObject *use_cline;
22957  PyObject *ptype, *pvalue, *ptraceback;
22958 #if CYTHON_COMPILING_IN_CPYTHON
22959  PyObject **cython_runtime_dict;
22960 #endif
22961  if (unlikely(!__pyx_cython_runtime)) {
22962  return c_line;
22963  }
22964  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22965 #if CYTHON_COMPILING_IN_CPYTHON
22966  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22967  if (likely(cython_runtime_dict)) {
22968  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
22969  use_cline, *cython_runtime_dict,
22970  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
22971  } else
22972 #endif
22973  {
22974  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22975  if (use_cline_obj) {
22976  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22977  Py_DECREF(use_cline_obj);
22978  } else {
22979  PyErr_Clear();
22980  use_cline = NULL;
22981  }
22982  }
22983  if (!use_cline) {
22984  c_line = 0;
22985  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22986  }
22987  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
22988  c_line = 0;
22989  }
22990  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22991  return c_line;
22992 }
22993 #endif
22994 
22995 /* CodeObjectCache */
22996 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22997  int start = 0, mid = 0, end = count - 1;
22998  if (end >= 0 && code_line > entries[end].code_line) {
22999  return count;
23000  }
23001  while (start < end) {
23002  mid = start + (end - start) / 2;
23003  if (code_line < entries[mid].code_line) {
23004  end = mid;
23005  } else if (code_line > entries[mid].code_line) {
23006  start = mid + 1;
23007  } else {
23008  return mid;
23009  }
23010  }
23011  if (code_line <= entries[mid].code_line) {
23012  return mid;
23013  } else {
23014  return mid + 1;
23015  }
23016 }
23017 static PyCodeObject *__pyx_find_code_object(int code_line) {
23018  PyCodeObject* code_object;
23019  int pos;
23020  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
23021  return NULL;
23022  }
23023  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23024  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
23025  return NULL;
23026  }
23027  code_object = __pyx_code_cache.entries[pos].code_object;
23028  Py_INCREF(code_object);
23029  return code_object;
23030 }
23031 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
23032  int pos, i;
23033  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
23034  if (unlikely(!code_line)) {
23035  return;
23036  }
23037  if (unlikely(!entries)) {
23038  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
23039  if (likely(entries)) {
23040  __pyx_code_cache.entries = entries;
23041  __pyx_code_cache.max_count = 64;
23042  __pyx_code_cache.count = 1;
23043  entries[0].code_line = code_line;
23044  entries[0].code_object = code_object;
23045  Py_INCREF(code_object);
23046  }
23047  return;
23048  }
23049  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23050  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
23051  PyCodeObject* tmp = entries[pos].code_object;
23052  entries[pos].code_object = code_object;
23053  Py_DECREF(tmp);
23054  return;
23055  }
23056  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
23057  int new_max = __pyx_code_cache.max_count + 64;
23058  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
23059  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
23060  if (unlikely(!entries)) {
23061  return;
23062  }
23063  __pyx_code_cache.entries = entries;
23064  __pyx_code_cache.max_count = new_max;
23065  }
23066  for (i=__pyx_code_cache.count; i>pos; i--) {
23067  entries[i] = entries[i-1];
23068  }
23069  entries[pos].code_line = code_line;
23070  entries[pos].code_object = code_object;
23071  __pyx_code_cache.count++;
23072  Py_INCREF(code_object);
23073 }
23074 
23075 /* AddTraceback */
23076 #include "compile.h"
23077 #include "frameobject.h"
23078 #include "traceback.h"
23079 #if PY_VERSION_HEX >= 0x030b00a6
23080  #ifndef Py_BUILD_CORE
23081  #define Py_BUILD_CORE 1
23082  #endif
23083  #include "internal/pycore_frame.h"
23084 #endif
23085 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
23086  const char *funcname, int c_line,
23087  int py_line, const char *filename) {
23088  PyCodeObject *py_code = NULL;
23089  PyObject *py_funcname = NULL;
23090  #if PY_MAJOR_VERSION < 3
23091  PyObject *py_srcfile = NULL;
23092  py_srcfile = PyString_FromString(filename);
23093  if (!py_srcfile) goto bad;
23094  #endif
23095  if (c_line) {
23096  #if PY_MAJOR_VERSION < 3
23097  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23098  if (!py_funcname) goto bad;
23099  #else
23100  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23101  if (!py_funcname) goto bad;
23102  funcname = PyUnicode_AsUTF8(py_funcname);
23103  if (!funcname) goto bad;
23104  #endif
23105  }
23106  else {
23107  #if PY_MAJOR_VERSION < 3
23108  py_funcname = PyString_FromString(funcname);
23109  if (!py_funcname) goto bad;
23110  #endif
23111  }
23112  #if PY_MAJOR_VERSION < 3
23113  py_code = __Pyx_PyCode_New(
23114  0,
23115  0,
23116  0,
23117  0,
23118  0,
23119  __pyx_empty_bytes, /*PyObject *code,*/
23120  __pyx_empty_tuple, /*PyObject *consts,*/
23121  __pyx_empty_tuple, /*PyObject *names,*/
23122  __pyx_empty_tuple, /*PyObject *varnames,*/
23123  __pyx_empty_tuple, /*PyObject *freevars,*/
23124  __pyx_empty_tuple, /*PyObject *cellvars,*/
23125  py_srcfile, /*PyObject *filename,*/
23126  py_funcname, /*PyObject *name,*/
23127  py_line,
23128  __pyx_empty_bytes /*PyObject *lnotab*/
23129  );
23130  Py_DECREF(py_srcfile);
23131  #else
23132  py_code = PyCode_NewEmpty(filename, funcname, py_line);
23133  #endif
23134  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
23135  return py_code;
23136 bad:
23137  Py_XDECREF(py_funcname);
23138  #if PY_MAJOR_VERSION < 3
23139  Py_XDECREF(py_srcfile);
23140  #endif
23141  return NULL;
23142 }
23143 static void __Pyx_AddTraceback(const char *funcname, int c_line,
23144  int py_line, const char *filename) {
23145  PyCodeObject *py_code = 0;
23146  PyFrameObject *py_frame = 0;
23147  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23148  PyObject *ptype, *pvalue, *ptraceback;
23149  if (c_line) {
23150  c_line = __Pyx_CLineForTraceback(tstate, c_line);
23151  }
23152  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
23153  if (!py_code) {
23154  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
23155  py_code = __Pyx_CreateCodeObjectForTraceback(
23156  funcname, c_line, py_line, filename);
23157  if (!py_code) {
23158  /* If the code object creation fails, then we should clear the
23159  fetched exception references and propagate the new exception */
23160  Py_XDECREF(ptype);
23161  Py_XDECREF(pvalue);
23162  Py_XDECREF(ptraceback);
23163  goto bad;
23164  }
23165  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
23166  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
23167  }
23168  py_frame = PyFrame_New(
23169  tstate, /*PyThreadState *tstate,*/
23170  py_code, /*PyCodeObject *code,*/
23171  __pyx_d, /*PyObject *globals,*/
23172  0 /*PyObject *locals*/
23173  );
23174  if (!py_frame) goto bad;
23175  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
23176  PyTraceBack_Here(py_frame);
23177 bad:
23178  Py_XDECREF(py_code);
23179  Py_XDECREF(py_frame);
23180 }
23181 
23182 /* CIntFromPyVerify */
23183 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
23184  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
23185 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
23186  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
23187 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
23188  {\
23189  func_type value = func_value;\
23190  if (sizeof(target_type) < sizeof(func_type)) {\
23191  if (unlikely(value != (func_type) (target_type) value)) {\
23192  func_type zero = 0;\
23193  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
23194  return (target_type) -1;\
23195  if (is_unsigned && unlikely(value < zero))\
23196  goto raise_neg_overflow;\
23197  else\
23198  goto raise_overflow;\
23199  }\
23200  }\
23201  return (target_type) value;\
23202  }
23203 
23204 /* MemviewDtypeToObject */
23205 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
23206  return (PyObject *) PyFloat_FromDouble(*(double *) itemp);
23207 }
23208 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) {
23209  double value = __pyx_PyFloat_AsDouble(obj);
23210  if ((value == (double)-1) && PyErr_Occurred())
23211  return 0;
23212  *(double *) itemp = value;
23213  return 1;
23214 }
23215 
23216 /* Declarations */
23217 #if CYTHON_CCOMPLEX
23218  #ifdef __cplusplus
23219  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
23220  return ::std::complex< float >(x, y);
23221  }
23222  #else
23223  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
23224  return x + y*(__pyx_t_float_complex)_Complex_I;
23225  }
23226  #endif
23227 #else
23228  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
23229  __pyx_t_float_complex z;
23230  z.real = x;
23231  z.imag = y;
23232  return z;
23233  }
23234 #endif
23235 
23236 /* Arithmetic */
23237 #if CYTHON_CCOMPLEX
23238 #else
23239  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23240  return (a.real == b.real) && (a.imag == b.imag);
23241  }
23242  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23243  __pyx_t_float_complex z;
23244  z.real = a.real + b.real;
23245  z.imag = a.imag + b.imag;
23246  return z;
23247  }
23248  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23249  __pyx_t_float_complex z;
23250  z.real = a.real - b.real;
23251  z.imag = a.imag - b.imag;
23252  return z;
23253  }
23254  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23255  __pyx_t_float_complex z;
23256  z.real = a.real * b.real - a.imag * b.imag;
23257  z.imag = a.real * b.imag + a.imag * b.real;
23258  return z;
23259  }
23260  #if 1
23261  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23262  if (b.imag == 0) {
23263  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
23264  } else if (fabsf(b.real) >= fabsf(b.imag)) {
23265  if (b.real == 0 && b.imag == 0) {
23266  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
23267  } else {
23268  float r = b.imag / b.real;
23269  float s = (float)(1.0) / (b.real + b.imag * r);
23270  return __pyx_t_float_complex_from_parts(
23271  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
23272  }
23273  } else {
23274  float r = b.real / b.imag;
23275  float s = (float)(1.0) / (b.imag + b.real * r);
23276  return __pyx_t_float_complex_from_parts(
23277  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
23278  }
23279  }
23280  #else
23281  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23282  if (b.imag == 0) {
23283  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
23284  } else {
23285  float denom = b.real * b.real + b.imag * b.imag;
23286  return __pyx_t_float_complex_from_parts(
23287  (a.real * b.real + a.imag * b.imag) / denom,
23288  (a.imag * b.real - a.real * b.imag) / denom);
23289  }
23290  }
23291  #endif
23292  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
23293  __pyx_t_float_complex z;
23294  z.real = -a.real;
23295  z.imag = -a.imag;
23296  return z;
23297  }
23298  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
23299  return (a.real == 0) && (a.imag == 0);
23300  }
23301  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
23302  __pyx_t_float_complex z;
23303  z.real = a.real;
23304  z.imag = -a.imag;
23305  return z;
23306  }
23307  #if 1
23308  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
23309  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
23310  return sqrtf(z.real*z.real + z.imag*z.imag);
23311  #else
23312  return hypotf(z.real, z.imag);
23313  #endif
23314  }
23315  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
23316  __pyx_t_float_complex z;
23317  float r, lnr, theta, z_r, z_theta;
23318  if (b.imag == 0 && b.real == (int)b.real) {
23319  if (b.real < 0) {
23320  float denom = a.real * a.real + a.imag * a.imag;
23321  a.real = a.real / denom;
23322  a.imag = -a.imag / denom;
23323  b.real = -b.real;
23324  }
23325  switch ((int)b.real) {
23326  case 0:
23327  z.real = 1;
23328  z.imag = 0;
23329  return z;
23330  case 1:
23331  return a;
23332  case 2:
23333  return __Pyx_c_prod_float(a, a);
23334  case 3:
23335  z = __Pyx_c_prod_float(a, a);
23336  return __Pyx_c_prod_float(z, a);
23337  case 4:
23338  z = __Pyx_c_prod_float(a, a);
23339  return __Pyx_c_prod_float(z, z);
23340  }
23341  }
23342  if (a.imag == 0) {
23343  if (a.real == 0) {
23344  return a;
23345  } else if (b.imag == 0) {
23346  z.real = powf(a.real, b.real);
23347  z.imag = 0;
23348  return z;
23349  } else if (a.real > 0) {
23350  r = a.real;
23351  theta = 0;
23352  } else {
23353  r = -a.real;
23354  theta = atan2f(0.0, -1.0);
23355  }
23356  } else {
23357  r = __Pyx_c_abs_float(a);
23358  theta = atan2f(a.imag, a.real);
23359  }
23360  lnr = logf(r);
23361  z_r = expf(lnr * b.real - theta * b.imag);
23362  z_theta = theta * b.real + lnr * b.imag;
23363  z.real = z_r * cosf(z_theta);
23364  z.imag = z_r * sinf(z_theta);
23365  return z;
23366  }
23367  #endif
23368 #endif
23369 
23370 /* Declarations */
23371 #if CYTHON_CCOMPLEX
23372  #ifdef __cplusplus
23373  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
23374  return ::std::complex< double >(x, y);
23375  }
23376  #else
23377  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
23378  return x + y*(__pyx_t_double_complex)_Complex_I;
23379  }
23380  #endif
23381 #else
23382  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
23383  __pyx_t_double_complex z;
23384  z.real = x;
23385  z.imag = y;
23386  return z;
23387  }
23388 #endif
23389 
23390 /* Arithmetic */
23391 #if CYTHON_CCOMPLEX
23392 #else
23393  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23394  return (a.real == b.real) && (a.imag == b.imag);
23395  }
23396  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23397  __pyx_t_double_complex z;
23398  z.real = a.real + b.real;
23399  z.imag = a.imag + b.imag;
23400  return z;
23401  }
23402  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23403  __pyx_t_double_complex z;
23404  z.real = a.real - b.real;
23405  z.imag = a.imag - b.imag;
23406  return z;
23407  }
23408  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23409  __pyx_t_double_complex z;
23410  z.real = a.real * b.real - a.imag * b.imag;
23411  z.imag = a.real * b.imag + a.imag * b.real;
23412  return z;
23413  }
23414  #if 1
23415  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23416  if (b.imag == 0) {
23417  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
23418  } else if (fabs(b.real) >= fabs(b.imag)) {
23419  if (b.real == 0 && b.imag == 0) {
23420  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
23421  } else {
23422  double r = b.imag / b.real;
23423  double s = (double)(1.0) / (b.real + b.imag * r);
23424  return __pyx_t_double_complex_from_parts(
23425  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
23426  }
23427  } else {
23428  double r = b.real / b.imag;
23429  double s = (double)(1.0) / (b.imag + b.real * r);
23430  return __pyx_t_double_complex_from_parts(
23431  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
23432  }
23433  }
23434  #else
23435  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23436  if (b.imag == 0) {
23437  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
23438  } else {
23439  double denom = b.real * b.real + b.imag * b.imag;
23440  return __pyx_t_double_complex_from_parts(
23441  (a.real * b.real + a.imag * b.imag) / denom,
23442  (a.imag * b.real - a.real * b.imag) / denom);
23443  }
23444  }
23445  #endif
23446  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
23447  __pyx_t_double_complex z;
23448  z.real = -a.real;
23449  z.imag = -a.imag;
23450  return z;
23451  }
23452  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
23453  return (a.real == 0) && (a.imag == 0);
23454  }
23455  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
23456  __pyx_t_double_complex z;
23457  z.real = a.real;
23458  z.imag = -a.imag;
23459  return z;
23460  }
23461  #if 1
23462  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
23463  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
23464  return sqrt(z.real*z.real + z.imag*z.imag);
23465  #else
23466  return hypot(z.real, z.imag);
23467  #endif
23468  }
23469  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
23470  __pyx_t_double_complex z;
23471  double r, lnr, theta, z_r, z_theta;
23472  if (b.imag == 0 && b.real == (int)b.real) {
23473  if (b.real < 0) {
23474  double denom = a.real * a.real + a.imag * a.imag;
23475  a.real = a.real / denom;
23476  a.imag = -a.imag / denom;
23477  b.real = -b.real;
23478  }
23479  switch ((int)b.real) {
23480  case 0:
23481  z.real = 1;
23482  z.imag = 0;
23483  return z;
23484  case 1:
23485  return a;
23486  case 2:
23487  return __Pyx_c_prod_double(a, a);
23488  case 3:
23489  z = __Pyx_c_prod_double(a, a);
23490  return __Pyx_c_prod_double(z, a);
23491  case 4:
23492  z = __Pyx_c_prod_double(a, a);
23493  return __Pyx_c_prod_double(z, z);
23494  }
23495  }
23496  if (a.imag == 0) {
23497  if (a.real == 0) {
23498  return a;
23499  } else if (b.imag == 0) {
23500  z.real = pow(a.real, b.real);
23501  z.imag = 0;
23502  return z;
23503  } else if (a.real > 0) {
23504  r = a.real;
23505  theta = 0;
23506  } else {
23507  r = -a.real;
23508  theta = atan2(0.0, -1.0);
23509  }
23510  } else {
23511  r = __Pyx_c_abs_double(a);
23512  theta = atan2(a.imag, a.real);
23513  }
23514  lnr = log(r);
23515  z_r = exp(lnr * b.real - theta * b.imag);
23516  z_theta = theta * b.real + lnr * b.imag;
23517  z.real = z_r * cos(z_theta);
23518  z.imag = z_r * sin(z_theta);
23519  return z;
23520  }
23521  #endif
23522 #endif
23523 
23524 #if PY_MAJOR_VERSION < 3
23525 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
23526  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
23527  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
23528  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
23529  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
23530  return -1;
23531 }
23532 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
23533  PyObject *obj = view->obj;
23534  if (!obj) return;
23535  if (PyObject_CheckBuffer(obj)) {
23536  PyBuffer_Release(view);
23537  return;
23538  }
23539  if ((0)) {}
23540  view->obj = NULL;
23541  Py_DECREF(obj);
23542 }
23543 #endif
23544 
23545 
23546 /* MemviewSliceIsContig */
23547 static int
23548 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
23549 {
23550  int i, index, step, start;
23551  Py_ssize_t itemsize = mvs.memview->view.itemsize;
23552  if (order == 'F') {
23553  step = 1;
23554  start = 0;
23555  } else {
23556  step = -1;
23557  start = ndim - 1;
23558  }
23559  for (i = 0; i < ndim; i++) {
23560  index = start + step * i;
23561  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
23562  return 0;
23563  itemsize *= mvs.shape[index];
23564  }
23565  return 1;
23566 }
23567 
23568 /* OverlappingSlices */
23569 static void
23570 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
23571  void **out_start, void **out_end,
23572  int ndim, size_t itemsize)
23573 {
23574  char *start, *end;
23575  int i;
23576  start = end = slice->data;
23577  for (i = 0; i < ndim; i++) {
23578  Py_ssize_t stride = slice->strides[i];
23579  Py_ssize_t extent = slice->shape[i];
23580  if (extent == 0) {
23581  *out_start = *out_end = start;
23582  return;
23583  } else {
23584  if (stride > 0)
23585  end += stride * (extent - 1);
23586  else
23587  start += stride * (extent - 1);
23588  }
23589  }
23590  *out_start = start;
23591  *out_end = end + itemsize;
23592 }
23593 static int
23594 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
23595  __Pyx_memviewslice *slice2,
23596  int ndim, size_t itemsize)
23597 {
23598  void *start1, *end1, *start2, *end2;
23599  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
23600  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
23601  return (start1 < end2) && (start2 < end1);
23602 }
23603 
23604 /* Capsule */
23605 static CYTHON_INLINE PyObject *
23606 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
23607 {
23608  PyObject *cobj;
23609 #if PY_VERSION_HEX >= 0x02070000
23610  cobj = PyCapsule_New(p, sig, NULL);
23611 #else
23612  cobj = PyCObject_FromVoidPtr(p, NULL);
23613 #endif
23614  return cobj;
23615 }
23616 
23617 /* CIntFromPy */
23618 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
23619 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
23620 #pragma GCC diagnostic push
23621 #pragma GCC diagnostic ignored "-Wconversion"
23622 #endif
23623  const int neg_one = (int) -1, const_zero = (int) 0;
23624 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
23625 #pragma GCC diagnostic pop
23626 #endif
23627  const int is_unsigned = neg_one > const_zero;
23628 #if PY_MAJOR_VERSION < 3
23629  if (likely(PyInt_Check(x))) {
23630  if (sizeof(int) < sizeof(long)) {
23631  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
23632  } else {
23633  long val = PyInt_AS_LONG(x);
23634  if (is_unsigned && unlikely(val < 0)) {
23635  goto raise_neg_overflow;
23636  }
23637  return (int) val;
23638  }
23639  } else
23640 #endif
23641  if (likely(PyLong_Check(x))) {
23642  if (is_unsigned) {
23643 #if CYTHON_USE_PYLONG_INTERNALS
23644  const digit* digits = ((PyLongObject*)x)->ob_digit;
23645  switch (Py_SIZE(x)) {
23646  case 0: return (int) 0;
23647  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
23648  case 2:
23649  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23650  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23651  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23652  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
23653  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23654  }
23655  }
23656  break;
23657  case 3:
23658  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23659  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23660  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23661  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
23662  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23663  }
23664  }
23665  break;
23666  case 4:
23667  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23668  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23669  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23670  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
23671  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23672  }
23673  }
23674  break;
23675  }
23676 #endif
23677 #if CYTHON_COMPILING_IN_CPYTHON
23678  if (unlikely(Py_SIZE(x) < 0)) {
23679  goto raise_neg_overflow;
23680  }
23681 #else
23682  {
23683  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
23684  if (unlikely(result < 0))
23685  return (int) -1;
23686  if (unlikely(result == 1))
23687  goto raise_neg_overflow;
23688  }
23689 #endif
23690  if (sizeof(int) <= sizeof(unsigned long)) {
23691  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
23692 #ifdef HAVE_LONG_LONG
23693  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23694  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
23695 #endif
23696  }
23697  } else {
23698 #if CYTHON_USE_PYLONG_INTERNALS
23699  const digit* digits = ((PyLongObject*)x)->ob_digit;
23700  switch (Py_SIZE(x)) {
23701  case 0: return (int) 0;
23702  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
23703  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
23704  case -2:
23705  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
23706  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23707  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23708  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23709  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23710  }
23711  }
23712  break;
23713  case 2:
23714  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23715  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23716  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23717  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23718  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23719  }
23720  }
23721  break;
23722  case -3:
23723  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23724  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23725  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23726  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23727  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23728  }
23729  }
23730  break;
23731  case 3:
23732  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23733  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23734  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23735  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23736  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23737  }
23738  }
23739  break;
23740  case -4:
23741  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23742  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23743  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23744  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
23745  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23746  }
23747  }
23748  break;
23749  case 4:
23750  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23751  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23752  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23753  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
23754  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23755  }
23756  }
23757  break;
23758  }
23759 #endif
23760  if (sizeof(int) <= sizeof(long)) {
23761  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
23762 #ifdef HAVE_LONG_LONG
23763  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
23764  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
23765 #endif
23766  }
23767  }
23768  {
23769 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
23770  PyErr_SetString(PyExc_RuntimeError,
23771  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23772 #else
23773  int val;
23774  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
23775  #if PY_MAJOR_VERSION < 3
23776  if (likely(v) && !PyLong_Check(v)) {
23777  PyObject *tmp = v;
23778  v = PyNumber_Long(tmp);
23779  Py_DECREF(tmp);
23780  }
23781  #endif
23782  if (likely(v)) {
23783  int one = 1; int is_little = (int)*(unsigned char *)&one;
23784  unsigned char *bytes = (unsigned char *)&val;
23785  int ret = _PyLong_AsByteArray((PyLongObject *)v,
23786  bytes, sizeof(val),
23787  is_little, !is_unsigned);
23788  Py_DECREF(v);
23789  if (likely(!ret))
23790  return val;
23791  }
23792 #endif
23793  return (int) -1;
23794  }
23795  } else {
23796  int val;
23797  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
23798  if (!tmp) return (int) -1;
23799  val = __Pyx_PyInt_As_int(tmp);
23800  Py_DECREF(tmp);
23801  return val;
23802  }
23803 raise_overflow:
23804  PyErr_SetString(PyExc_OverflowError,
23805  "value too large to convert to int");
23806  return (int) -1;
23807 raise_neg_overflow:
23808  PyErr_SetString(PyExc_OverflowError,
23809  "can't convert negative value to int");
23810  return (int) -1;
23811 }
23812 
23813 /* CIntToPy */
23814 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
23815 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
23816 #pragma GCC diagnostic push
23817 #pragma GCC diagnostic ignored "-Wconversion"
23818 #endif
23819  const int neg_one = (int) -1, const_zero = (int) 0;
23820 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
23821 #pragma GCC diagnostic pop
23822 #endif
23823  const int is_unsigned = neg_one > const_zero;
23824  if (is_unsigned) {
23825  if (sizeof(int) < sizeof(long)) {
23826  return PyInt_FromLong((long) value);
23827  } else if (sizeof(int) <= sizeof(unsigned long)) {
23828  return PyLong_FromUnsignedLong((unsigned long) value);
23829 #ifdef HAVE_LONG_LONG
23830  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23831  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
23832 #endif
23833  }
23834  } else {
23835  if (sizeof(int) <= sizeof(long)) {
23836  return PyInt_FromLong((long) value);
23837 #ifdef HAVE_LONG_LONG
23838  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
23839  return PyLong_FromLongLong((PY_LONG_LONG) value);
23840 #endif
23841  }
23842  }
23843  {
23844  int one = 1; int little = (int)*(unsigned char *)&one;
23845  unsigned char *bytes = (unsigned char *)&value;
23846  return _PyLong_FromByteArray(bytes, sizeof(int),
23847  little, !is_unsigned);
23848  }
23849 }
23850 
23851 /* TypeInfoToFormat */
23852 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) {
23853  struct __pyx_typeinfo_string result = { {0} };
23854  char *buf = (char *) result.string;
23855  size_t size = type->size;
23856  switch (type->typegroup) {
23857  case 'H':
23858  *buf = 'c';
23859  break;
23860  case 'I':
23861  case 'U':
23862  if (size == 1)
23863  *buf = (type->is_unsigned) ? 'B' : 'b';
23864  else if (size == 2)
23865  *buf = (type->is_unsigned) ? 'H' : 'h';
23866  else if (size == 4)
23867  *buf = (type->is_unsigned) ? 'I' : 'i';
23868  else if (size == 8)
23869  *buf = (type->is_unsigned) ? 'Q' : 'q';
23870  break;
23871  case 'P':
23872  *buf = 'P';
23873  break;
23874  case 'C':
23875  {
23876  __Pyx_TypeInfo complex_type = *type;
23877  complex_type.typegroup = 'R';
23878  complex_type.size /= 2;
23879  *buf++ = 'Z';
23880  *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0];
23881  break;
23882  }
23883  case 'R':
23884  if (size == 4)
23885  *buf = 'f';
23886  else if (size == 8)
23887  *buf = 'd';
23888  else
23889  *buf = 'g';
23890  break;
23891  }
23892  return result;
23893 }
23894 
23895 /* MemviewSliceCopyTemplate */
23896 static __Pyx_memviewslice
23897 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
23898  const char *mode, int ndim,
23899  size_t sizeof_dtype, int contig_flag,
23900  int dtype_is_object)
23901 {
23902  __Pyx_RefNannyDeclarations
23903  int i;
23904  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
23905  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
23906  Py_buffer *buf = &from_memview->view;
23907  PyObject *shape_tuple = NULL;
23908  PyObject *temp_int = NULL;
23909  struct __pyx_array_obj *array_obj = NULL;
23910  struct __pyx_memoryview_obj *memview_obj = NULL;
23911  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
23912  for (i = 0; i < ndim; i++) {
23913  if (unlikely(from_mvs->suboffsets[i] >= 0)) {
23914  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
23915  "indirect dimensions (axis %d)", i);
23916  goto fail;
23917  }
23918  }
23919  shape_tuple = PyTuple_New(ndim);
23920  if (unlikely(!shape_tuple)) {
23921  goto fail;
23922  }
23923  __Pyx_GOTREF(shape_tuple);
23924  for(i = 0; i < ndim; i++) {
23925  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
23926  if(unlikely(!temp_int)) {
23927  goto fail;
23928  } else {
23929  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
23930  temp_int = NULL;
23931  }
23932  }
23933  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
23934  if (unlikely(!array_obj)) {
23935  goto fail;
23936  }
23937  __Pyx_GOTREF(array_obj);
23938  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
23939  (PyObject *) array_obj, contig_flag,
23940  dtype_is_object,
23941  from_mvs->memview->typeinfo);
23942  if (unlikely(!memview_obj))
23943  goto fail;
23944  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
23945  goto fail;
23946  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
23947  dtype_is_object) < 0))
23948  goto fail;
23949  goto no_fail;
23950 fail:
23951  __Pyx_XDECREF(new_mvs.memview);
23952  new_mvs.memview = NULL;
23953  new_mvs.data = NULL;
23954 no_fail:
23955  __Pyx_XDECREF(shape_tuple);
23956  __Pyx_XDECREF(temp_int);
23957  __Pyx_XDECREF(array_obj);
23958  __Pyx_RefNannyFinishContext();
23959  return new_mvs;
23960 }
23961 
23962 /* MemviewSliceInit */
23963 static int
23964 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
23965  int ndim,
23966  __Pyx_memviewslice *memviewslice,
23967  int memview_is_new_reference)
23968 {
23969  __Pyx_RefNannyDeclarations
23970  int i, retval=-1;
23971  Py_buffer *buf = &memview->view;
23972  __Pyx_RefNannySetupContext("init_memviewslice", 0);
23973  if (unlikely(memviewslice->memview || memviewslice->data)) {
23974  PyErr_SetString(PyExc_ValueError,
23975  "memviewslice is already initialized!");
23976  goto fail;
23977  }
23978  if (buf->strides) {
23979  for (i = 0; i < ndim; i++) {
23980  memviewslice->strides[i] = buf->strides[i];
23981  }
23982  } else {
23983  Py_ssize_t stride = buf->itemsize;
23984  for (i = ndim - 1; i >= 0; i--) {
23985  memviewslice->strides[i] = stride;
23986  stride *= buf->shape[i];
23987  }
23988  }
23989  for (i = 0; i < ndim; i++) {
23990  memviewslice->shape[i] = buf->shape[i];
23991  if (buf->suboffsets) {
23992  memviewslice->suboffsets[i] = buf->suboffsets[i];
23993  } else {
23994  memviewslice->suboffsets[i] = -1;
23995  }
23996  }
23997  memviewslice->memview = memview;
23998  memviewslice->data = (char *)buf->buf;
23999  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
24000  Py_INCREF(memview);
24001  }
24002  retval = 0;
24003  goto no_fail;
24004 fail:
24005  memviewslice->memview = 0;
24006  memviewslice->data = 0;
24007  retval = -1;
24008 no_fail:
24009  __Pyx_RefNannyFinishContext();
24010  return retval;
24011 }
24012 #ifndef Py_NO_RETURN
24013 #define Py_NO_RETURN
24014 #endif
24015 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
24016  va_list vargs;
24017  char msg[200];
24018 #ifdef HAVE_STDARG_PROTOTYPES
24019  va_start(vargs, fmt);
24020 #else
24021  va_start(vargs);
24022 #endif
24023  vsnprintf(msg, 200, fmt, vargs);
24024  va_end(vargs);
24025  Py_FatalError(msg);
24026 }
24027 static CYTHON_INLINE int
24028 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
24029  PyThread_type_lock lock)
24030 {
24031  int result;
24032  PyThread_acquire_lock(lock, 1);
24033  result = (*acquisition_count)++;
24034  PyThread_release_lock(lock);
24035  return result;
24036 }
24037 static CYTHON_INLINE int
24038 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
24039  PyThread_type_lock lock)
24040 {
24041  int result;
24042  PyThread_acquire_lock(lock, 1);
24043  result = (*acquisition_count)--;
24044  PyThread_release_lock(lock);
24045  return result;
24046 }
24047 static CYTHON_INLINE void
24048 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
24049 {
24050  int first_time;
24051  struct __pyx_memoryview_obj *memview = memslice->memview;
24052  if (unlikely(!memview || (PyObject *) memview == Py_None))
24053  return;
24054  if (unlikely(__pyx_get_slice_count(memview) < 0))
24055  __pyx_fatalerror("Acquisition count is %d (line %d)",
24056  __pyx_get_slice_count(memview), lineno);
24057  first_time = __pyx_add_acquisition_count(memview) == 0;
24058  if (unlikely(first_time)) {
24059  if (have_gil) {
24060  Py_INCREF((PyObject *) memview);
24061  } else {
24062  PyGILState_STATE _gilstate = PyGILState_Ensure();
24063  Py_INCREF((PyObject *) memview);
24064  PyGILState_Release(_gilstate);
24065  }
24066  }
24067 }
24068 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
24069  int have_gil, int lineno) {
24070  int last_time;
24071  struct __pyx_memoryview_obj *memview = memslice->memview;
24072  if (unlikely(!memview || (PyObject *) memview == Py_None)) {
24073  memslice->memview = NULL;
24074  return;
24075  }
24076  if (unlikely(__pyx_get_slice_count(memview) <= 0))
24077  __pyx_fatalerror("Acquisition count is %d (line %d)",
24078  __pyx_get_slice_count(memview), lineno);
24079  last_time = __pyx_sub_acquisition_count(memview) == 1;
24080  memslice->data = NULL;
24081  if (unlikely(last_time)) {
24082  if (have_gil) {
24083  Py_CLEAR(memslice->memview);
24084  } else {
24085  PyGILState_STATE _gilstate = PyGILState_Ensure();
24086  Py_CLEAR(memslice->memview);
24087  PyGILState_Release(_gilstate);
24088  }
24089  } else {
24090  memslice->memview = NULL;
24091  }
24092 }
24093 
24094 /* CIntFromPy */
24095 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
24096 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24097 #pragma GCC diagnostic push
24098 #pragma GCC diagnostic ignored "-Wconversion"
24099 #endif
24100  const long neg_one = (long) -1, const_zero = (long) 0;
24101 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24102 #pragma GCC diagnostic pop
24103 #endif
24104  const int is_unsigned = neg_one > const_zero;
24105 #if PY_MAJOR_VERSION < 3
24106  if (likely(PyInt_Check(x))) {
24107  if (sizeof(long) < sizeof(long)) {
24108  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
24109  } else {
24110  long val = PyInt_AS_LONG(x);
24111  if (is_unsigned && unlikely(val < 0)) {
24112  goto raise_neg_overflow;
24113  }
24114  return (long) val;
24115  }
24116  } else
24117 #endif
24118  if (likely(PyLong_Check(x))) {
24119  if (is_unsigned) {
24120 #if CYTHON_USE_PYLONG_INTERNALS
24121  const digit* digits = ((PyLongObject*)x)->ob_digit;
24122  switch (Py_SIZE(x)) {
24123  case 0: return (long) 0;
24124  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
24125  case 2:
24126  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
24127  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24128  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24129  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
24130  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
24131  }
24132  }
24133  break;
24134  case 3:
24135  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
24136  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24137  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24138  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
24139  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
24140  }
24141  }
24142  break;
24143  case 4:
24144  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
24145  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24146  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24147  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
24148  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
24149  }
24150  }
24151  break;
24152  }
24153 #endif
24154 #if CYTHON_COMPILING_IN_CPYTHON
24155  if (unlikely(Py_SIZE(x) < 0)) {
24156  goto raise_neg_overflow;
24157  }
24158 #else
24159  {
24160  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
24161  if (unlikely(result < 0))
24162  return (long) -1;
24163  if (unlikely(result == 1))
24164  goto raise_neg_overflow;
24165  }
24166 #endif
24167  if (sizeof(long) <= sizeof(unsigned long)) {
24168  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
24169 #ifdef HAVE_LONG_LONG
24170  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
24171  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
24172 #endif
24173  }
24174  } else {
24175 #if CYTHON_USE_PYLONG_INTERNALS
24176  const digit* digits = ((PyLongObject*)x)->ob_digit;
24177  switch (Py_SIZE(x)) {
24178  case 0: return (long) 0;
24179  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
24180  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
24181  case -2:
24182  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
24183  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24184  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24185  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24186  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24187  }
24188  }
24189  break;
24190  case 2:
24191  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
24192  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24193  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24194  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24195  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24196  }
24197  }
24198  break;
24199  case -3:
24200  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24201  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24202  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24203  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24204  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24205  }
24206  }
24207  break;
24208  case 3:
24209  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
24210  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24211  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24212  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24213  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24214  }
24215  }
24216  break;
24217  case -4:
24218  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24219  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24220  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24221  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24222  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24223  }
24224  }
24225  break;
24226  case 4:
24227  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
24228  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24229  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24230  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24231  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24232  }
24233  }
24234  break;
24235  }
24236 #endif
24237  if (sizeof(long) <= sizeof(long)) {
24238  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
24239 #ifdef HAVE_LONG_LONG
24240  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
24241  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
24242 #endif
24243  }
24244  }
24245  {
24246 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
24247  PyErr_SetString(PyExc_RuntimeError,
24248  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
24249 #else
24250  long val;
24251  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
24252  #if PY_MAJOR_VERSION < 3
24253  if (likely(v) && !PyLong_Check(v)) {
24254  PyObject *tmp = v;
24255  v = PyNumber_Long(tmp);
24256  Py_DECREF(tmp);
24257  }
24258  #endif
24259  if (likely(v)) {
24260  int one = 1; int is_little = (int)*(unsigned char *)&one;
24261  unsigned char *bytes = (unsigned char *)&val;
24262  int ret = _PyLong_AsByteArray((PyLongObject *)v,
24263  bytes, sizeof(val),
24264  is_little, !is_unsigned);
24265  Py_DECREF(v);
24266  if (likely(!ret))
24267  return val;
24268  }
24269 #endif
24270  return (long) -1;
24271  }
24272  } else {
24273  long val;
24274  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
24275  if (!tmp) return (long) -1;
24276  val = __Pyx_PyInt_As_long(tmp);
24277  Py_DECREF(tmp);
24278  return val;
24279  }
24280 raise_overflow:
24281  PyErr_SetString(PyExc_OverflowError,
24282  "value too large to convert to long");
24283  return (long) -1;
24284 raise_neg_overflow:
24285  PyErr_SetString(PyExc_OverflowError,
24286  "can't convert negative value to long");
24287  return (long) -1;
24288 }
24289 
24290 /* CIntToPy */
24291 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
24292 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24293 #pragma GCC diagnostic push
24294 #pragma GCC diagnostic ignored "-Wconversion"
24295 #endif
24296  const long neg_one = (long) -1, const_zero = (long) 0;
24297 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24298 #pragma GCC diagnostic pop
24299 #endif
24300  const int is_unsigned = neg_one > const_zero;
24301  if (is_unsigned) {
24302  if (sizeof(long) < sizeof(long)) {
24303  return PyInt_FromLong((long) value);
24304  } else if (sizeof(long) <= sizeof(unsigned long)) {
24305  return PyLong_FromUnsignedLong((unsigned long) value);
24306 #ifdef HAVE_LONG_LONG
24307  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
24308  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
24309 #endif
24310  }
24311  } else {
24312  if (sizeof(long) <= sizeof(long)) {
24313  return PyInt_FromLong((long) value);
24314 #ifdef HAVE_LONG_LONG
24315  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
24316  return PyLong_FromLongLong((PY_LONG_LONG) value);
24317 #endif
24318  }
24319  }
24320  {
24321  int one = 1; int little = (int)*(unsigned char *)&one;
24322  unsigned char *bytes = (unsigned char *)&value;
24323  return _PyLong_FromByteArray(bytes, sizeof(long),
24324  little, !is_unsigned);
24325  }
24326 }
24327 
24328 /* CIntFromPy */
24329 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
24330 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24331 #pragma GCC diagnostic push
24332 #pragma GCC diagnostic ignored "-Wconversion"
24333 #endif
24334  const char neg_one = (char) -1, const_zero = (char) 0;
24335 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24336 #pragma GCC diagnostic pop
24337 #endif
24338  const int is_unsigned = neg_one > const_zero;
24339 #if PY_MAJOR_VERSION < 3
24340  if (likely(PyInt_Check(x))) {
24341  if (sizeof(char) < sizeof(long)) {
24342  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
24343  } else {
24344  long val = PyInt_AS_LONG(x);
24345  if (is_unsigned && unlikely(val < 0)) {
24346  goto raise_neg_overflow;
24347  }
24348  return (char) val;
24349  }
24350  } else
24351 #endif
24352  if (likely(PyLong_Check(x))) {
24353  if (is_unsigned) {
24354 #if CYTHON_USE_PYLONG_INTERNALS
24355  const digit* digits = ((PyLongObject*)x)->ob_digit;
24356  switch (Py_SIZE(x)) {
24357  case 0: return (char) 0;
24358  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
24359  case 2:
24360  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
24361  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24362  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24363  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
24364  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
24365  }
24366  }
24367  break;
24368  case 3:
24369  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
24370  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24371  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24372  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
24373  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
24374  }
24375  }
24376  break;
24377  case 4:
24378  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
24379  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24380  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24381  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
24382  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
24383  }
24384  }
24385  break;
24386  }
24387 #endif
24388 #if CYTHON_COMPILING_IN_CPYTHON
24389  if (unlikely(Py_SIZE(x) < 0)) {
24390  goto raise_neg_overflow;
24391  }
24392 #else
24393  {
24394  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
24395  if (unlikely(result < 0))
24396  return (char) -1;
24397  if (unlikely(result == 1))
24398  goto raise_neg_overflow;
24399  }
24400 #endif
24401  if (sizeof(char) <= sizeof(unsigned long)) {
24402  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
24403 #ifdef HAVE_LONG_LONG
24404  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
24405  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
24406 #endif
24407  }
24408  } else {
24409 #if CYTHON_USE_PYLONG_INTERNALS
24410  const digit* digits = ((PyLongObject*)x)->ob_digit;
24411  switch (Py_SIZE(x)) {
24412  case 0: return (char) 0;
24413  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
24414  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
24415  case -2:
24416  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
24417  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24418  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24419  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
24420  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
24421  }
24422  }
24423  break;
24424  case 2:
24425  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
24426  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24427  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24428  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
24429  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
24430  }
24431  }
24432  break;
24433  case -3:
24434  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
24435  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24436  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24437  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
24438  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
24439  }
24440  }
24441  break;
24442  case 3:
24443  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
24444  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24445  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24446  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
24447  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
24448  }
24449  }
24450  break;
24451  case -4:
24452  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
24453  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24454  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24455  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
24456  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
24457  }
24458  }
24459  break;
24460  case 4:
24461  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
24462  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24463  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24464  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
24465  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
24466  }
24467  }
24468  break;
24469  }
24470 #endif
24471  if (sizeof(char) <= sizeof(long)) {
24472  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
24473 #ifdef HAVE_LONG_LONG
24474  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
24475  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
24476 #endif
24477  }
24478  }
24479  {
24480 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
24481  PyErr_SetString(PyExc_RuntimeError,
24482  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
24483 #else
24484  char val;
24485  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
24486  #if PY_MAJOR_VERSION < 3
24487  if (likely(v) && !PyLong_Check(v)) {
24488  PyObject *tmp = v;
24489  v = PyNumber_Long(tmp);
24490  Py_DECREF(tmp);
24491  }
24492  #endif
24493  if (likely(v)) {
24494  int one = 1; int is_little = (int)*(unsigned char *)&one;
24495  unsigned char *bytes = (unsigned char *)&val;
24496  int ret = _PyLong_AsByteArray((PyLongObject *)v,
24497  bytes, sizeof(val),
24498  is_little, !is_unsigned);
24499  Py_DECREF(v);
24500  if (likely(!ret))
24501  return val;
24502  }
24503 #endif
24504  return (char) -1;
24505  }
24506  } else {
24507  char val;
24508  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
24509  if (!tmp) return (char) -1;
24510  val = __Pyx_PyInt_As_char(tmp);
24511  Py_DECREF(tmp);
24512  return val;
24513  }
24514 raise_overflow:
24515  PyErr_SetString(PyExc_OverflowError,
24516  "value too large to convert to char");
24517  return (char) -1;
24518 raise_neg_overflow:
24519  PyErr_SetString(PyExc_OverflowError,
24520  "can't convert negative value to char");
24521  return (char) -1;
24522 }
24523 
24524 /* CheckBinaryVersion */
24525 static int __Pyx_check_binary_version(void) {
24526  char ctversion[5];
24527  int same=1, i, found_dot;
24528  const char* rt_from_call = Py_GetVersion();
24529  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24530  found_dot = 0;
24531  for (i = 0; i < 4; i++) {
24532  if (!ctversion[i]) {
24533  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
24534  break;
24535  }
24536  if (rt_from_call[i] != ctversion[i]) {
24537  same = 0;
24538  break;
24539  }
24540  }
24541  if (!same) {
24542  char rtversion[5] = {'\0'};
24543  char message[200];
24544  for (i=0; i<4; ++i) {
24545  if (rt_from_call[i] == '.') {
24546  if (found_dot) break;
24547  found_dot = 1;
24548  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
24549  break;
24550  }
24551  rtversion[i] = rt_from_call[i];
24552  }
24553  PyOS_snprintf(message, sizeof(message),
24554  "compiletime version %s of module '%.100s' "
24555  "does not match runtime version %s",
24556  ctversion, __Pyx_MODULE_NAME, rtversion);
24557  return PyErr_WarnEx(NULL, message, 1);
24558  }
24559  return 0;
24560 }
24561 
24562 /* InitStrings */
24563 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24564  while (t->p) {
24565  #if PY_MAJOR_VERSION < 3
24566  if (t->is_unicode) {
24567  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24568  } else if (t->intern) {
24569  *t->p = PyString_InternFromString(t->s);
24570  } else {
24571  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24572  }
24573  #else
24574  if (t->is_unicode | t->is_str) {
24575  if (t->intern) {
24576  *t->p = PyUnicode_InternFromString(t->s);
24577  } else if (t->encoding) {
24578  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24579  } else {
24580  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24581  }
24582  } else {
24583  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24584  }
24585  #endif
24586  if (!*t->p)
24587  return -1;
24588  if (PyObject_Hash(*t->p) == -1)
24589  return -1;
24590  ++t;
24591  }
24592  return 0;
24593 }
24594 
24595 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24596  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24597 }
24598 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24599  Py_ssize_t ignore;
24600  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24601 }
24602 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24603 #if !CYTHON_PEP393_ENABLED
24604 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24605  char* defenc_c;
24606  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24607  if (!defenc) return NULL;
24608  defenc_c = PyBytes_AS_STRING(defenc);
24609 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24610  {
24611  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24612  char* c;
24613  for (c = defenc_c; c < end; c++) {
24614  if ((unsigned char) (*c) >= 128) {
24615  PyUnicode_AsASCIIString(o);
24616  return NULL;
24617  }
24618  }
24619  }
24620 #endif
24621  *length = PyBytes_GET_SIZE(defenc);
24622  return defenc_c;
24623 }
24624 #else
24625 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24626  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24627 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24628  if (likely(PyUnicode_IS_ASCII(o))) {
24629  *length = PyUnicode_GET_LENGTH(o);
24630  return PyUnicode_AsUTF8(o);
24631  } else {
24632  PyUnicode_AsASCIIString(o);
24633  return NULL;
24634  }
24635 #else
24636  return PyUnicode_AsUTF8AndSize(o, length);
24637 #endif
24638 }
24639 #endif
24640 #endif
24641 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24642 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24643  if (
24644 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24645  __Pyx_sys_getdefaultencoding_not_ascii &&
24646 #endif
24647  PyUnicode_Check(o)) {
24648  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24649  } else
24650 #endif
24651 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24652  if (PyByteArray_Check(o)) {
24653  *length = PyByteArray_GET_SIZE(o);
24654  return PyByteArray_AS_STRING(o);
24655  } else
24656 #endif
24657  {
24658  char* result;
24659  int r = PyBytes_AsStringAndSize(o, &result, length);
24660  if (unlikely(r < 0)) {
24661  return NULL;
24662  } else {
24663  return result;
24664  }
24665  }
24666 }
24667 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24668  int is_true = x == Py_True;
24669  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24670  else return PyObject_IsTrue(x);
24671 }
24672 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
24673  int retval;
24674  if (unlikely(!x)) return -1;
24675  retval = __Pyx_PyObject_IsTrue(x);
24676  Py_DECREF(x);
24677  return retval;
24678 }
24679 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24680 #if PY_MAJOR_VERSION >= 3
24681  if (PyLong_Check(result)) {
24682  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24683  "__int__ returned non-int (type %.200s). "
24684  "The ability to return an instance of a strict subclass of int "
24685  "is deprecated, and may be removed in a future version of Python.",
24686  Py_TYPE(result)->tp_name)) {
24687  Py_DECREF(result);
24688  return NULL;
24689  }
24690  return result;
24691  }
24692 #endif
24693  PyErr_Format(PyExc_TypeError,
24694  "__%.4s__ returned non-%.4s (type %.200s)",
24695  type_name, type_name, Py_TYPE(result)->tp_name);
24696  Py_DECREF(result);
24697  return NULL;
24698 }
24699 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24700 #if CYTHON_USE_TYPE_SLOTS
24701  PyNumberMethods *m;
24702 #endif
24703  const char *name = NULL;
24704  PyObject *res = NULL;
24705 #if PY_MAJOR_VERSION < 3
24706  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24707 #else
24708  if (likely(PyLong_Check(x)))
24709 #endif
24710  return __Pyx_NewRef(x);
24711 #if CYTHON_USE_TYPE_SLOTS
24712  m = Py_TYPE(x)->tp_as_number;
24713  #if PY_MAJOR_VERSION < 3
24714  if (m && m->nb_int) {
24715  name = "int";
24716  res = m->nb_int(x);
24717  }
24718  else if (m && m->nb_long) {
24719  name = "long";
24720  res = m->nb_long(x);
24721  }
24722  #else
24723  if (likely(m && m->nb_int)) {
24724  name = "int";
24725  res = m->nb_int(x);
24726  }
24727  #endif
24728 #else
24729  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24730  res = PyNumber_Int(x);
24731  }
24732 #endif
24733  if (likely(res)) {
24734 #if PY_MAJOR_VERSION < 3
24735  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24736 #else
24737  if (unlikely(!PyLong_CheckExact(res))) {
24738 #endif
24739  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24740  }
24741  }
24742  else if (!PyErr_Occurred()) {
24743  PyErr_SetString(PyExc_TypeError,
24744  "an integer is required");
24745  }
24746  return res;
24747 }
24748 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24749  Py_ssize_t ival;
24750  PyObject *x;
24751 #if PY_MAJOR_VERSION < 3
24752  if (likely(PyInt_CheckExact(b))) {
24753  if (sizeof(Py_ssize_t) >= sizeof(long))
24754  return PyInt_AS_LONG(b);
24755  else
24756  return PyInt_AsSsize_t(b);
24757  }
24758 #endif
24759  if (likely(PyLong_CheckExact(b))) {
24760  #if CYTHON_USE_PYLONG_INTERNALS
24761  const digit* digits = ((PyLongObject*)b)->ob_digit;
24762  const Py_ssize_t size = Py_SIZE(b);
24763  if (likely(__Pyx_sst_abs(size) <= 1)) {
24764  ival = likely(size) ? digits[0] : 0;
24765  if (size == -1) ival = -ival;
24766  return ival;
24767  } else {
24768  switch (size) {
24769  case 2:
24770  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24771  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24772  }
24773  break;
24774  case -2:
24775  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24776  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24777  }
24778  break;
24779  case 3:
24780  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24781  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24782  }
24783  break;
24784  case -3:
24785  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24786  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24787  }
24788  break;
24789  case 4:
24790  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24791  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24792  }
24793  break;
24794  case -4:
24795  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24796  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24797  }
24798  break;
24799  }
24800  }
24801  #endif
24802  return PyLong_AsSsize_t(b);
24803  }
24804  x = PyNumber_Index(b);
24805  if (!x) return -1;
24806  ival = PyInt_AsSsize_t(x);
24807  Py_DECREF(x);
24808  return ival;
24809 }
24810 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
24811  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
24812  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
24813 #if PY_MAJOR_VERSION < 3
24814  } else if (likely(PyInt_CheckExact(o))) {
24815  return PyInt_AS_LONG(o);
24816 #endif
24817  } else {
24818  Py_ssize_t ival;
24819  PyObject *x;
24820  x = PyNumber_Index(o);
24821  if (!x) return -1;
24822  ival = PyInt_AsLong(x);
24823  Py_DECREF(x);
24824  return ival;
24825  }
24826 }
24827 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24828  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24829 }
24830 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24831  return PyInt_FromSize_t(ival);
24832 }
24833 
24834 
24835 #endif /* Py_PYTHON_H */
f
Double f
Definition: Headers.h:64
s
Double s
Definition: Headers.h:84
L
Double L
Definition: Headers.h:72
n
Int n
Definition: Headers.h:28
q
Double q
Definition: Headers.h:81
U
Double U
Definition: Headers.h:88
v
Double v
Definition: Headers.h:95
T
Double T
Definition: Headers.h:87
z
Double * z
Definition: Headers.h:49
u
Double u
Definition: Headers.h:89
c
Double c
Definition: Headers.h:54
r
Double r
Definition: Headers.h:83
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8