1 /* Generated by Cython 0.29.12 */
2 
3 /* BEGIN: Cython Metadata
4 {
5     "distutils": {
6         "depends": [
7             "yt/utilities/lib/platform_dep.h",
8             "yt/utilities/lib/tsearch.h"
9         ],
10         "include_dirs": [
11             "yt/utilities/lib/"
12         ],
13         "libraries": [
14             "m"
15         ],
16         "name": "yt.geometry.particle_deposit",
17         "sources": [
18             "yt/geometry/particle_deposit.pyx"
19         ]
20     },
21     "module_name": "yt.geometry.particle_deposit"
22 }
23 END: Cython Metadata */
24 
25 #define PY_SSIZE_T_CLEAN
26 #include "Python.h"
27 #ifndef Py_PYTHON_H
28     #error Python headers needed to compile C extensions, please install development version of Python.
29 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
30     #error Cython requires Python 2.6+ or Python 3.3+.
31 #else
32 #define CYTHON_ABI "0_29_12"
33 #define CYTHON_HEX_VERSION 0x001D0CF0
34 #define CYTHON_FUTURE_DIVISION 0
35 #include <stddef.h>
36 #ifndef offsetof
37   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
38 #endif
39 #if !defined(WIN32) && !defined(MS_WINDOWS)
40   #ifndef __stdcall
41     #define __stdcall
42   #endif
43   #ifndef __cdecl
44     #define __cdecl
45   #endif
46   #ifndef __fastcall
47     #define __fastcall
48   #endif
49 #endif
50 #ifndef DL_IMPORT
51   #define DL_IMPORT(t) t
52 #endif
53 #ifndef DL_EXPORT
54   #define DL_EXPORT(t) t
55 #endif
56 #define __PYX_COMMA ,
57 #ifndef HAVE_LONG_LONG
58   #if PY_VERSION_HEX >= 0x02070000
59     #define HAVE_LONG_LONG
60   #endif
61 #endif
62 #ifndef PY_LONG_LONG
63   #define PY_LONG_LONG LONG_LONG
64 #endif
65 #ifndef Py_HUGE_VAL
66   #define Py_HUGE_VAL HUGE_VAL
67 #endif
68 #ifdef PYPY_VERSION
69   #define CYTHON_COMPILING_IN_PYPY 1
70   #define CYTHON_COMPILING_IN_PYSTON 0
71   #define CYTHON_COMPILING_IN_CPYTHON 0
72   #undef CYTHON_USE_TYPE_SLOTS
73   #define CYTHON_USE_TYPE_SLOTS 0
74   #undef CYTHON_USE_PYTYPE_LOOKUP
75   #define CYTHON_USE_PYTYPE_LOOKUP 0
76   #if PY_VERSION_HEX < 0x03050000
77     #undef CYTHON_USE_ASYNC_SLOTS
78     #define CYTHON_USE_ASYNC_SLOTS 0
79   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
80     #define CYTHON_USE_ASYNC_SLOTS 1
81   #endif
82   #undef CYTHON_USE_PYLIST_INTERNALS
83   #define CYTHON_USE_PYLIST_INTERNALS 0
84   #undef CYTHON_USE_UNICODE_INTERNALS
85   #define CYTHON_USE_UNICODE_INTERNALS 0
86   #undef CYTHON_USE_UNICODE_WRITER
87   #define CYTHON_USE_UNICODE_WRITER 0
88   #undef CYTHON_USE_PYLONG_INTERNALS
89   #define CYTHON_USE_PYLONG_INTERNALS 0
90   #undef CYTHON_AVOID_BORROWED_REFS
91   #define CYTHON_AVOID_BORROWED_REFS 1
92   #undef CYTHON_ASSUME_SAFE_MACROS
93   #define CYTHON_ASSUME_SAFE_MACROS 0
94   #undef CYTHON_UNPACK_METHODS
95   #define CYTHON_UNPACK_METHODS 0
96   #undef CYTHON_FAST_THREAD_STATE
97   #define CYTHON_FAST_THREAD_STATE 0
98   #undef CYTHON_FAST_PYCALL
99   #define CYTHON_FAST_PYCALL 0
100   #undef CYTHON_PEP489_MULTI_PHASE_INIT
101   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
102   #undef CYTHON_USE_TP_FINALIZE
103   #define CYTHON_USE_TP_FINALIZE 0
104   #undef CYTHON_USE_DICT_VERSIONS
105   #define CYTHON_USE_DICT_VERSIONS 0
106   #undef CYTHON_USE_EXC_INFO_STACK
107   #define CYTHON_USE_EXC_INFO_STACK 0
108 #elif defined(PYSTON_VERSION)
109   #define CYTHON_COMPILING_IN_PYPY 0
110   #define CYTHON_COMPILING_IN_PYSTON 1
111   #define CYTHON_COMPILING_IN_CPYTHON 0
112   #ifndef CYTHON_USE_TYPE_SLOTS
113     #define CYTHON_USE_TYPE_SLOTS 1
114   #endif
115   #undef CYTHON_USE_PYTYPE_LOOKUP
116   #define CYTHON_USE_PYTYPE_LOOKUP 0
117   #undef CYTHON_USE_ASYNC_SLOTS
118   #define CYTHON_USE_ASYNC_SLOTS 0
119   #undef CYTHON_USE_PYLIST_INTERNALS
120   #define CYTHON_USE_PYLIST_INTERNALS 0
121   #ifndef CYTHON_USE_UNICODE_INTERNALS
122     #define CYTHON_USE_UNICODE_INTERNALS 1
123   #endif
124   #undef CYTHON_USE_UNICODE_WRITER
125   #define CYTHON_USE_UNICODE_WRITER 0
126   #undef CYTHON_USE_PYLONG_INTERNALS
127   #define CYTHON_USE_PYLONG_INTERNALS 0
128   #ifndef CYTHON_AVOID_BORROWED_REFS
129     #define CYTHON_AVOID_BORROWED_REFS 0
130   #endif
131   #ifndef CYTHON_ASSUME_SAFE_MACROS
132     #define CYTHON_ASSUME_SAFE_MACROS 1
133   #endif
134   #ifndef CYTHON_UNPACK_METHODS
135     #define CYTHON_UNPACK_METHODS 1
136   #endif
137   #undef CYTHON_FAST_THREAD_STATE
138   #define CYTHON_FAST_THREAD_STATE 0
139   #undef CYTHON_FAST_PYCALL
140   #define CYTHON_FAST_PYCALL 0
141   #undef CYTHON_PEP489_MULTI_PHASE_INIT
142   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
143   #undef CYTHON_USE_TP_FINALIZE
144   #define CYTHON_USE_TP_FINALIZE 0
145   #undef CYTHON_USE_DICT_VERSIONS
146   #define CYTHON_USE_DICT_VERSIONS 0
147   #undef CYTHON_USE_EXC_INFO_STACK
148   #define CYTHON_USE_EXC_INFO_STACK 0
149 #else
150   #define CYTHON_COMPILING_IN_PYPY 0
151   #define CYTHON_COMPILING_IN_PYSTON 0
152   #define CYTHON_COMPILING_IN_CPYTHON 1
153   #ifndef CYTHON_USE_TYPE_SLOTS
154     #define CYTHON_USE_TYPE_SLOTS 1
155   #endif
156   #if PY_VERSION_HEX < 0x02070000
157     #undef CYTHON_USE_PYTYPE_LOOKUP
158     #define CYTHON_USE_PYTYPE_LOOKUP 0
159   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
160     #define CYTHON_USE_PYTYPE_LOOKUP 1
161   #endif
162   #if PY_MAJOR_VERSION < 3
163     #undef CYTHON_USE_ASYNC_SLOTS
164     #define CYTHON_USE_ASYNC_SLOTS 0
165   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
166     #define CYTHON_USE_ASYNC_SLOTS 1
167   #endif
168   #if PY_VERSION_HEX < 0x02070000
169     #undef CYTHON_USE_PYLONG_INTERNALS
170     #define CYTHON_USE_PYLONG_INTERNALS 0
171   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
172     #define CYTHON_USE_PYLONG_INTERNALS 1
173   #endif
174   #ifndef CYTHON_USE_PYLIST_INTERNALS
175     #define CYTHON_USE_PYLIST_INTERNALS 1
176   #endif
177   #ifndef CYTHON_USE_UNICODE_INTERNALS
178     #define CYTHON_USE_UNICODE_INTERNALS 1
179   #endif
180   #if PY_VERSION_HEX < 0x030300F0
181     #undef CYTHON_USE_UNICODE_WRITER
182     #define CYTHON_USE_UNICODE_WRITER 0
183   #elif !defined(CYTHON_USE_UNICODE_WRITER)
184     #define CYTHON_USE_UNICODE_WRITER 1
185   #endif
186   #ifndef CYTHON_AVOID_BORROWED_REFS
187     #define CYTHON_AVOID_BORROWED_REFS 0
188   #endif
189   #ifndef CYTHON_ASSUME_SAFE_MACROS
190     #define CYTHON_ASSUME_SAFE_MACROS 1
191   #endif
192   #ifndef CYTHON_UNPACK_METHODS
193     #define CYTHON_UNPACK_METHODS 1
194   #endif
195   #ifndef CYTHON_FAST_THREAD_STATE
196     #define CYTHON_FAST_THREAD_STATE 1
197   #endif
198   #ifndef CYTHON_FAST_PYCALL
199     #define CYTHON_FAST_PYCALL 1
200   #endif
201   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
202     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
203   #endif
204   #ifndef CYTHON_USE_TP_FINALIZE
205     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
206   #endif
207   #ifndef CYTHON_USE_DICT_VERSIONS
208     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
209   #endif
210   #ifndef CYTHON_USE_EXC_INFO_STACK
211     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
212   #endif
213 #endif
214 #if !defined(CYTHON_FAST_PYCCALL)
215 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
216 #endif
217 #if CYTHON_USE_PYLONG_INTERNALS
218   #include "longintrepr.h"
219   #undef SHIFT
220   #undef BASE
221   #undef MASK
222   #ifdef SIZEOF_VOID_P
223     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
224   #endif
225 #endif
226 #ifndef __has_attribute
227   #define __has_attribute(x) 0
228 #endif
229 #ifndef __has_cpp_attribute
230   #define __has_cpp_attribute(x) 0
231 #endif
232 #ifndef CYTHON_RESTRICT
233   #if defined(__GNUC__)
234     #define CYTHON_RESTRICT __restrict__
235   #elif defined(_MSC_VER) && _MSC_VER >= 1400
236     #define CYTHON_RESTRICT __restrict
237   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
238     #define CYTHON_RESTRICT restrict
239   #else
240     #define CYTHON_RESTRICT
241   #endif
242 #endif
243 #ifndef CYTHON_UNUSED
244 # if defined(__GNUC__)
245 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
246 #     define CYTHON_UNUSED __attribute__ ((__unused__))
247 #   else
248 #     define CYTHON_UNUSED
249 #   endif
250 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
251 #   define CYTHON_UNUSED __attribute__ ((__unused__))
252 # else
253 #   define CYTHON_UNUSED
254 # endif
255 #endif
256 #ifndef CYTHON_MAYBE_UNUSED_VAR
257 #  if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)258      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
259 #  else
260 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
261 #  endif
262 #endif
263 #ifndef CYTHON_NCP_UNUSED
264 # if CYTHON_COMPILING_IN_CPYTHON
265 #  define CYTHON_NCP_UNUSED
266 # else
267 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
268 # endif
269 #endif
270 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
271 #ifdef _MSC_VER
272     #ifndef _MSC_STDINT_H_
273         #if _MSC_VER < 1300
274            typedef unsigned char     uint8_t;
275            typedef unsigned int      uint32_t;
276         #else
277            typedef unsigned __int8   uint8_t;
278            typedef unsigned __int32  uint32_t;
279         #endif
280     #endif
281 #else
282    #include <stdint.h>
283 #endif
284 #ifndef CYTHON_FALLTHROUGH
285   #if defined(__cplusplus) && __cplusplus >= 201103L
286     #if __has_cpp_attribute(fallthrough)
287       #define CYTHON_FALLTHROUGH [[fallthrough]]
288     #elif __has_cpp_attribute(clang::fallthrough)
289       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
290     #elif __has_cpp_attribute(gnu::fallthrough)
291       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
292     #endif
293   #endif
294   #ifndef CYTHON_FALLTHROUGH
295     #if __has_attribute(fallthrough)
296       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
297     #else
298       #define CYTHON_FALLTHROUGH
299     #endif
300   #endif
301   #if defined(__clang__ ) && defined(__apple_build_version__)
302     #if __apple_build_version__ < 7000000
303       #undef  CYTHON_FALLTHROUGH
304       #define CYTHON_FALLTHROUGH
305     #endif
306   #endif
307 #endif
308 
309 #ifndef CYTHON_INLINE
310   #if defined(__clang__)
311     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
312   #elif defined(__GNUC__)
313     #define CYTHON_INLINE __inline__
314   #elif defined(_MSC_VER)
315     #define CYTHON_INLINE __inline
316   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
317     #define CYTHON_INLINE inline
318   #else
319     #define CYTHON_INLINE
320   #endif
321 #endif
322 
323 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
324   #define Py_OptimizeFlag 0
325 #endif
326 #define __PYX_BUILD_PY_SSIZE_T "n"
327 #define CYTHON_FORMAT_SSIZE_T "z"
328 #if PY_MAJOR_VERSION < 3
329   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
330   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
331           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
332   #define __Pyx_DefaultClassType PyClass_Type
333 #else
334   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
335 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
336   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
337           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
338 #else
339   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
340           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
341 #endif
342   #define __Pyx_DefaultClassType PyType_Type
343 #endif
344 #ifndef Py_TPFLAGS_CHECKTYPES
345   #define Py_TPFLAGS_CHECKTYPES 0
346 #endif
347 #ifndef Py_TPFLAGS_HAVE_INDEX
348   #define Py_TPFLAGS_HAVE_INDEX 0
349 #endif
350 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
351   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
352 #endif
353 #ifndef Py_TPFLAGS_HAVE_FINALIZE
354   #define Py_TPFLAGS_HAVE_FINALIZE 0
355 #endif
356 #ifndef METH_STACKLESS
357   #define METH_STACKLESS 0
358 #endif
359 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
360   #ifndef METH_FASTCALL
361      #define METH_FASTCALL 0x80
362   #endif
363   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
364   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
365                                                           Py_ssize_t nargs, PyObject *kwnames);
366 #else
367   #define __Pyx_PyCFunctionFast _PyCFunctionFast
368   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
369 #endif
370 #if CYTHON_FAST_PYCCALL
371 #define __Pyx_PyFastCFunction_Check(func)\
372     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
373 #else
374 #define __Pyx_PyFastCFunction_Check(func) 0
375 #endif
376 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
377   #define PyObject_Malloc(s)   PyMem_Malloc(s)
378   #define PyObject_Free(p)     PyMem_Free(p)
379   #define PyObject_Realloc(p)  PyMem_Realloc(p)
380 #endif
381 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
382   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
383   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
384   #define PyMem_RawFree(p)             PyMem_Free(p)
385 #endif
386 #if CYTHON_COMPILING_IN_PYSTON
387   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
388   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
389 #else
390   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
391   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
392 #endif
393 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
394   #define __Pyx_PyThreadState_Current PyThreadState_GET()
395 #elif PY_VERSION_HEX >= 0x03060000
396   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
397 #elif PY_VERSION_HEX >= 0x03000000
398   #define __Pyx_PyThreadState_Current PyThreadState_GET()
399 #else
400   #define __Pyx_PyThreadState_Current _PyThreadState_Current
401 #endif
402 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
403 #include "pythread.h"
404 #define Py_tss_NEEDS_INIT 0
405 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)406 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
407   *key = PyThread_create_key();
408   return 0;
409 }
PyThread_tss_alloc(void)410 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
411   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
412   *key = Py_tss_NEEDS_INIT;
413   return key;
414 }
PyThread_tss_free(Py_tss_t * key)415 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
416   PyObject_Free(key);
417 }
PyThread_tss_is_created(Py_tss_t * key)418 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
419   return *key != Py_tss_NEEDS_INIT;
420 }
PyThread_tss_delete(Py_tss_t * key)421 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
422   PyThread_delete_key(*key);
423   *key = Py_tss_NEEDS_INIT;
424 }
PyThread_tss_set(Py_tss_t * key,void * value)425 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
426   return PyThread_set_key_value(*key, value);
427 }
PyThread_tss_get(Py_tss_t * key)428 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
429   return PyThread_get_key_value(*key);
430 }
431 #endif
432 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
433 #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
434 #else
435 #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
436 #endif
437 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
438   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
439   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
440 #else
441   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
442   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
443 #endif
444 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
445 #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
446 #else
447 #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
448 #endif
449 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
450   #define CYTHON_PEP393_ENABLED 1
451   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
452                                               0 : _PyUnicode_Ready((PyObject *)(op)))
453   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
454   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
455   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
456   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
457   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
458   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
459   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
460   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
461 #else
462   #define CYTHON_PEP393_ENABLED 0
463   #define PyUnicode_1BYTE_KIND  1
464   #define PyUnicode_2BYTE_KIND  2
465   #define PyUnicode_4BYTE_KIND  4
466   #define __Pyx_PyUnicode_READY(op)       (0)
467   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
468   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
469   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
470   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
471   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
472   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
473   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
474   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
475 #endif
476 #if CYTHON_COMPILING_IN_PYPY
477   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
478   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
479 #else
480   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
481   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
482       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
483 #endif
484 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
485   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
486 #endif
487 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
488   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
489 #endif
490 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
491   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
492 #endif
493 #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))
494 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
495 #if PY_MAJOR_VERSION >= 3
496   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
497 #else
498   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
499 #endif
500 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
501   #define PyObject_ASCII(o)            PyObject_Repr(o)
502 #endif
503 #if PY_MAJOR_VERSION >= 3
504   #define PyBaseString_Type            PyUnicode_Type
505   #define PyStringObject               PyUnicodeObject
506   #define PyString_Type                PyUnicode_Type
507   #define PyString_Check               PyUnicode_Check
508   #define PyString_CheckExact          PyUnicode_CheckExact
509   #define PyObject_Unicode             PyObject_Str
510 #endif
511 #if PY_MAJOR_VERSION >= 3
512   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
513   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
514 #else
515   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
516   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
517 #endif
518 #ifndef PySet_CheckExact
519   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
520 #endif
521 #if CYTHON_ASSUME_SAFE_MACROS
522   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
523 #else
524   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
525 #endif
526 #if PY_MAJOR_VERSION >= 3
527   #define PyIntObject                  PyLongObject
528   #define PyInt_Type                   PyLong_Type
529   #define PyInt_Check(op)              PyLong_Check(op)
530   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
531   #define PyInt_FromString             PyLong_FromString
532   #define PyInt_FromUnicode            PyLong_FromUnicode
533   #define PyInt_FromLong               PyLong_FromLong
534   #define PyInt_FromSize_t             PyLong_FromSize_t
535   #define PyInt_FromSsize_t            PyLong_FromSsize_t
536   #define PyInt_AsLong                 PyLong_AsLong
537   #define PyInt_AS_LONG                PyLong_AS_LONG
538   #define PyInt_AsSsize_t              PyLong_AsSsize_t
539   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
540   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
541   #define PyNumber_Int                 PyNumber_Long
542 #endif
543 #if PY_MAJOR_VERSION >= 3
544   #define PyBoolObject                 PyLongObject
545 #endif
546 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
547   #ifndef PyUnicode_InternFromString
548     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
549   #endif
550 #endif
551 #if PY_VERSION_HEX < 0x030200A4
552   typedef long Py_hash_t;
553   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
554   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
555 #else
556   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
557   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
558 #endif
559 #if PY_MAJOR_VERSION >= 3
560   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
561 #else
562   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
563 #endif
564 #if CYTHON_USE_ASYNC_SLOTS
565   #if PY_VERSION_HEX >= 0x030500B1
566     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
567     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
568   #else
569     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
570   #endif
571 #else
572   #define __Pyx_PyType_AsAsync(obj) NULL
573 #endif
574 #ifndef __Pyx_PyAsyncMethodsStruct
575     typedef struct {
576         unaryfunc am_await;
577         unaryfunc am_aiter;
578         unaryfunc am_anext;
579     } __Pyx_PyAsyncMethodsStruct;
580 #endif
581 
582 #if defined(WIN32) || defined(MS_WINDOWS)
583   #define _USE_MATH_DEFINES
584 #endif
585 #include <math.h>
586 #ifdef NAN
587 #define __PYX_NAN() ((float) NAN)
588 #else
__PYX_NAN()589 static CYTHON_INLINE float __PYX_NAN() {
590   float value;
591   memset(&value, 0xFF, sizeof(value));
592   return value;
593 }
594 #endif
595 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
596 #define __Pyx_truncl trunc
597 #else
598 #define __Pyx_truncl truncl
599 #endif
600 
601 
602 #define __PYX_ERR(f_index, lineno, Ln_error) \
603 { \
604   __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
605 }
606 
607 #ifndef __PYX_EXTERN_C
608   #ifdef __cplusplus
609     #define __PYX_EXTERN_C extern "C"
610   #else
611     #define __PYX_EXTERN_C extern
612   #endif
613 #endif
614 
615 #define __PYX_HAVE__yt__geometry__particle_deposit
616 #define __PYX_HAVE_API__yt__geometry__particle_deposit
617 /* Early includes */
618 #include <string.h>
619 #include <stdio.h>
620 #include "numpy/arrayobject.h"
621 #include "numpy/ufuncobject.h"
622 #include <math.h>
623 #include <stdlib.h>
624 #include "numpy/npy_math.h"
625 #include <float.h>
626 #include "tsearch.h"
627 #include "platform_dep.h"
628 #include "pythread.h"
629 #include "pystate.h"
630 #ifdef _OPENMP
631 #include <omp.h>
632 #endif /* _OPENMP */
633 
634 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
635 #define CYTHON_WITHOUT_ASSERTIONS
636 #endif
637 
638 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
639                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
640 
641 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
642 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
643 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
644 #define __PYX_DEFAULT_STRING_ENCODING ""
645 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
646 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
647 #define __Pyx_uchar_cast(c) ((unsigned char)c)
648 #define __Pyx_long_cast(x) ((long)x)
649 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
650     (sizeof(type) < sizeof(Py_ssize_t))  ||\
651     (sizeof(type) > sizeof(Py_ssize_t) &&\
652           likely(v < (type)PY_SSIZE_T_MAX ||\
653                  v == (type)PY_SSIZE_T_MAX)  &&\
654           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
655                                 v == (type)PY_SSIZE_T_MIN)))  ||\
656     (sizeof(type) == sizeof(Py_ssize_t) &&\
657           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
658                                v == (type)PY_SSIZE_T_MAX)))  )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)659 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
660     return (size_t) i < (size_t) limit;
661 }
662 #if defined (__cplusplus) && __cplusplus >= 201103L
663     #include <cstdlib>
664     #define __Pyx_sst_abs(value) std::abs(value)
665 #elif SIZEOF_INT >= SIZEOF_SIZE_T
666     #define __Pyx_sst_abs(value) abs(value)
667 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
668     #define __Pyx_sst_abs(value) labs(value)
669 #elif defined (_MSC_VER)
670     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
671 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
672     #define __Pyx_sst_abs(value) llabs(value)
673 #elif defined (__GNUC__)
674     #define __Pyx_sst_abs(value) __builtin_llabs(value)
675 #else
676     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
677 #endif
678 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
679 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
680 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
681 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
682 #define __Pyx_PyBytes_FromString        PyBytes_FromString
683 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
684 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
685 #if PY_MAJOR_VERSION < 3
686     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
687     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
688 #else
689     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
690     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
691 #endif
692 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
693 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
694 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
695 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
696 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
697 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
698 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
699 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
700 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
701 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
702 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
703 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
704 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
705 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
706 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
707 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)708 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
709     const Py_UNICODE *u_end = u;
710     while (*u_end++) ;
711     return (size_t)(u_end - u - 1);
712 }
713 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
714 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
715 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
716 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
717 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
718 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
719 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
720 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
721 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
722 #define __Pyx_PySequence_Tuple(obj)\
723     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
724 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
725 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
726 #if CYTHON_ASSUME_SAFE_MACROS
727 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
728 #else
729 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
730 #endif
731 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
732 #if PY_MAJOR_VERSION >= 3
733 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
734 #else
735 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
736 #endif
737 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
738 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
739 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)740 static int __Pyx_init_sys_getdefaultencoding_params(void) {
741     PyObject* sys;
742     PyObject* default_encoding = NULL;
743     PyObject* ascii_chars_u = NULL;
744     PyObject* ascii_chars_b = NULL;
745     const char* default_encoding_c;
746     sys = PyImport_ImportModule("sys");
747     if (!sys) goto bad;
748     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
749     Py_DECREF(sys);
750     if (!default_encoding) goto bad;
751     default_encoding_c = PyBytes_AsString(default_encoding);
752     if (!default_encoding_c) goto bad;
753     if (strcmp(default_encoding_c, "ascii") == 0) {
754         __Pyx_sys_getdefaultencoding_not_ascii = 0;
755     } else {
756         char ascii_chars[128];
757         int c;
758         for (c = 0; c < 128; c++) {
759             ascii_chars[c] = c;
760         }
761         __Pyx_sys_getdefaultencoding_not_ascii = 1;
762         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
763         if (!ascii_chars_u) goto bad;
764         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
765         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
766             PyErr_Format(
767                 PyExc_ValueError,
768                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
769                 default_encoding_c);
770             goto bad;
771         }
772         Py_DECREF(ascii_chars_u);
773         Py_DECREF(ascii_chars_b);
774     }
775     Py_DECREF(default_encoding);
776     return 0;
777 bad:
778     Py_XDECREF(default_encoding);
779     Py_XDECREF(ascii_chars_u);
780     Py_XDECREF(ascii_chars_b);
781     return -1;
782 }
783 #endif
784 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
785 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
786 #else
787 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
788 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
789 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)790 static int __Pyx_init_sys_getdefaultencoding_params(void) {
791     PyObject* sys;
792     PyObject* default_encoding = NULL;
793     char* default_encoding_c;
794     sys = PyImport_ImportModule("sys");
795     if (!sys) goto bad;
796     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
797     Py_DECREF(sys);
798     if (!default_encoding) goto bad;
799     default_encoding_c = PyBytes_AsString(default_encoding);
800     if (!default_encoding_c) goto bad;
801     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
802     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
803     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
804     Py_DECREF(default_encoding);
805     return 0;
806 bad:
807     Py_XDECREF(default_encoding);
808     return -1;
809 }
810 #endif
811 #endif
812 
813 
814 /* Test for GCC > 2.95 */
815 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
816   #define likely(x)   __builtin_expect(!!(x), 1)
817   #define unlikely(x) __builtin_expect(!!(x), 0)
818 #else /* !__GNUC__ or GCC < 2.95 */
819   #define likely(x)   (x)
820   #define unlikely(x) (x)
821 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)822 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
823 
824 static PyObject *__pyx_m = NULL;
825 static PyObject *__pyx_d;
826 static PyObject *__pyx_b;
827 static PyObject *__pyx_cython_runtime = NULL;
828 static PyObject *__pyx_empty_tuple;
829 static PyObject *__pyx_empty_bytes;
830 static PyObject *__pyx_empty_unicode;
831 static int __pyx_lineno;
832 static int __pyx_clineno = 0;
833 static const char * __pyx_cfilenm= __FILE__;
834 static const char *__pyx_filename;
835 
836 /* Header.proto */
837 #if !defined(CYTHON_CCOMPLEX)
838   #if defined(__cplusplus)
839     #define CYTHON_CCOMPLEX 1
840   #elif defined(_Complex_I)
841     #define CYTHON_CCOMPLEX 1
842   #else
843     #define CYTHON_CCOMPLEX 0
844   #endif
845 #endif
846 #if CYTHON_CCOMPLEX
847   #ifdef __cplusplus
848     #include <complex>
849   #else
850     #include <complex.h>
851   #endif
852 #endif
853 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
854   #undef _Complex_I
855   #define _Complex_I 1.0fj
856 #endif
857 
858 
859 static const char *__pyx_f[] = {
860   "yt/geometry/particle_deposit.pxd",
861   "yt/geometry/particle_deposit.pyx",
862   "stringsource",
863   "__init__.pxd",
864   "yt/utilities/lib/fp_utils.pxd",
865   "yt/utilities/lib/geometry_utils.pxd",
866   "type.pxd",
867   "yt/geometry/oct_visitors.pxd",
868   "yt/geometry/selection_routines.pxd",
869   "yt/utilities/lib/allocation_container.pxd",
870   "yt/geometry/oct_container.pxd",
871 };
872 /* BufferFormatStructs.proto */
873 #define IS_UNSIGNED(type) (((type) -1) > 0)
874 struct __Pyx_StructField_;
875 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
876 typedef struct {
877   const char* name;
878   struct __Pyx_StructField_* fields;
879   size_t size;
880   size_t arraysize[8];
881   int ndim;
882   char typegroup;
883   char is_unsigned;
884   int flags;
885 } __Pyx_TypeInfo;
886 typedef struct __Pyx_StructField_ {
887   __Pyx_TypeInfo* type;
888   const char* name;
889   size_t offset;
890 } __Pyx_StructField;
891 typedef struct {
892   __Pyx_StructField* field;
893   size_t parent_offset;
894 } __Pyx_BufFmt_StackElem;
895 typedef struct {
896   __Pyx_StructField root;
897   __Pyx_BufFmt_StackElem* head;
898   size_t fmt_offset;
899   size_t new_count, enc_count;
900   size_t struct_alignment;
901   int is_complex;
902   char enc_type;
903   char new_packmode;
904   char enc_packmode;
905   char is_valid_array;
906 } __Pyx_BufFmt_Context;
907 
908 /* MemviewSliceStruct.proto */
909 struct __pyx_memoryview_obj;
910 typedef struct {
911   struct __pyx_memoryview_obj *memview;
912   char *data;
913   Py_ssize_t shape[8];
914   Py_ssize_t strides[8];
915   Py_ssize_t suboffsets[8];
916 } __Pyx_memviewslice;
917 #define __Pyx_MemoryView_Len(m)  (m.shape[0])
918 
919 /* Atomics.proto */
920 #include <pythread.h>
921 #ifndef CYTHON_ATOMICS
922     #define CYTHON_ATOMICS 1
923 #endif
924 #define __pyx_atomic_int_type int
925 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
926                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
927                     !defined(__i386__)
928     #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
929     #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
930     #ifdef __PYX_DEBUG_ATOMICS
931         #warning "Using GNU atomics"
932     #endif
933 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
934     #include <Windows.h>
935     #undef __pyx_atomic_int_type
936     #define __pyx_atomic_int_type LONG
937     #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
938     #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
939     #ifdef __PYX_DEBUG_ATOMICS
940         #pragma message ("Using MSVC atomics")
941     #endif
942 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
943     #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
944     #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
945     #ifdef __PYX_DEBUG_ATOMICS
946         #warning "Using Intel atomics"
947     #endif
948 #else
949     #undef CYTHON_ATOMICS
950     #define CYTHON_ATOMICS 0
951     #ifdef __PYX_DEBUG_ATOMICS
952         #warning "Not using atomics"
953     #endif
954 #endif
955 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
956 #if CYTHON_ATOMICS
957     #define __pyx_add_acquisition_count(memview)\
958              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
959     #define __pyx_sub_acquisition_count(memview)\
960             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
961 #else
962     #define __pyx_add_acquisition_count(memview)\
963             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
964     #define __pyx_sub_acquisition_count(memview)\
965             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
966 #endif
967 
968 /* ForceInitThreads.proto */
969 #ifndef __PYX_FORCE_INIT_THREADS
970   #define __PYX_FORCE_INIT_THREADS 0
971 #endif
972 
973 /* NoFastGil.proto */
974 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
975 #define __Pyx_PyGILState_Release PyGILState_Release
976 #define __Pyx_FastGIL_Remember()
977 #define __Pyx_FastGIL_Forget()
978 #define __Pyx_FastGilFuncInit()
979 
980 
981 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
982  * # in Cython to enable them only on the right systems.
983  *
984  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
985  * ctypedef npy_int16      int16_t
986  * ctypedef npy_int32      int32_t
987  */
988 typedef npy_int8 __pyx_t_5numpy_int8_t;
989 
990 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
991  *
992  * ctypedef npy_int8       int8_t
993  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
994  * ctypedef npy_int32      int32_t
995  * ctypedef npy_int64      int64_t
996  */
997 typedef npy_int16 __pyx_t_5numpy_int16_t;
998 
999 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
1000  * ctypedef npy_int8       int8_t
1001  * ctypedef npy_int16      int16_t
1002  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
1003  * ctypedef npy_int64      int64_t
1004  * #ctypedef npy_int96      int96_t
1005  */
1006 typedef npy_int32 __pyx_t_5numpy_int32_t;
1007 
1008 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
1009  * ctypedef npy_int16      int16_t
1010  * ctypedef npy_int32      int32_t
1011  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
1012  * #ctypedef npy_int96      int96_t
1013  * #ctypedef npy_int128     int128_t
1014  */
1015 typedef npy_int64 __pyx_t_5numpy_int64_t;
1016 
1017 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
1018  * #ctypedef npy_int128     int128_t
1019  *
1020  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
1021  * ctypedef npy_uint16     uint16_t
1022  * ctypedef npy_uint32     uint32_t
1023  */
1024 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1025 
1026 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
1027  *
1028  * ctypedef npy_uint8      uint8_t
1029  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
1030  * ctypedef npy_uint32     uint32_t
1031  * ctypedef npy_uint64     uint64_t
1032  */
1033 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1034 
1035 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
1036  * ctypedef npy_uint8      uint8_t
1037  * ctypedef npy_uint16     uint16_t
1038  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
1039  * ctypedef npy_uint64     uint64_t
1040  * #ctypedef npy_uint96     uint96_t
1041  */
1042 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1043 
1044 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
1045  * ctypedef npy_uint16     uint16_t
1046  * ctypedef npy_uint32     uint32_t
1047  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
1048  * #ctypedef npy_uint96     uint96_t
1049  * #ctypedef npy_uint128    uint128_t
1050  */
1051 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1052 
1053 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
1054  * #ctypedef npy_uint128    uint128_t
1055  *
1056  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
1057  * ctypedef npy_float64    float64_t
1058  * #ctypedef npy_float80    float80_t
1059  */
1060 typedef npy_float32 __pyx_t_5numpy_float32_t;
1061 
1062 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
1063  *
1064  * ctypedef npy_float32    float32_t
1065  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
1066  * #ctypedef npy_float80    float80_t
1067  * #ctypedef npy_float128   float128_t
1068  */
1069 typedef npy_float64 __pyx_t_5numpy_float64_t;
1070 
1071 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
1072  * # The int types are mapped a bit surprising --
1073  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1074  * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
1075  * ctypedef npy_longlong   long_t
1076  * ctypedef npy_longlong   longlong_t
1077  */
1078 typedef npy_long __pyx_t_5numpy_int_t;
1079 
1080 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
1081  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1082  * ctypedef npy_long       int_t
1083  * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
1084  * ctypedef npy_longlong   longlong_t
1085  *
1086  */
1087 typedef npy_longlong __pyx_t_5numpy_long_t;
1088 
1089 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
1090  * ctypedef npy_long       int_t
1091  * ctypedef npy_longlong   long_t
1092  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
1093  *
1094  * ctypedef npy_ulong      uint_t
1095  */
1096 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1097 
1098 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
1099  * ctypedef npy_longlong   longlong_t
1100  *
1101  * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
1102  * ctypedef npy_ulonglong  ulong_t
1103  * ctypedef npy_ulonglong  ulonglong_t
1104  */
1105 typedef npy_ulong __pyx_t_5numpy_uint_t;
1106 
1107 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
1108  *
1109  * ctypedef npy_ulong      uint_t
1110  * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
1111  * ctypedef npy_ulonglong  ulonglong_t
1112  *
1113  */
1114 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1115 
1116 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
1117  * ctypedef npy_ulong      uint_t
1118  * ctypedef npy_ulonglong  ulong_t
1119  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
1120  *
1121  * ctypedef npy_intp       intp_t
1122  */
1123 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1124 
1125 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
1126  * ctypedef npy_ulonglong  ulonglong_t
1127  *
1128  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
1129  * ctypedef npy_uintp      uintp_t
1130  *
1131  */
1132 typedef npy_intp __pyx_t_5numpy_intp_t;
1133 
1134 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
1135  *
1136  * ctypedef npy_intp       intp_t
1137  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
1138  *
1139  * ctypedef npy_double     float_t
1140  */
1141 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1142 
1143 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
1144  * ctypedef npy_uintp      uintp_t
1145  *
1146  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
1147  * ctypedef npy_double     double_t
1148  * ctypedef npy_longdouble longdouble_t
1149  */
1150 typedef npy_double __pyx_t_5numpy_float_t;
1151 
1152 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
1153  *
1154  * ctypedef npy_double     float_t
1155  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
1156  * ctypedef npy_longdouble longdouble_t
1157  *
1158  */
1159 typedef npy_double __pyx_t_5numpy_double_t;
1160 
1161 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
1162  * ctypedef npy_double     float_t
1163  * ctypedef npy_double     double_t
1164  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
1165  *
1166  * ctypedef npy_cfloat      cfloat_t
1167  */
1168 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1169 /* Declarations.proto */
1170 #if CYTHON_CCOMPLEX
1171   #ifdef __cplusplus
1172     typedef ::std::complex< float > __pyx_t_float_complex;
1173   #else
1174     typedef float _Complex __pyx_t_float_complex;
1175   #endif
1176 #else
1177     typedef struct { float real, imag; } __pyx_t_float_complex;
1178 #endif
1179 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1180 
1181 /* Declarations.proto */
1182 #if CYTHON_CCOMPLEX
1183   #ifdef __cplusplus
1184     typedef ::std::complex< double > __pyx_t_double_complex;
1185   #else
1186     typedef double _Complex __pyx_t_double_complex;
1187   #endif
1188 #else
1189     typedef struct { double real, imag; } __pyx_t_double_complex;
1190 #endif
1191 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1192 
1193 
1194 /*--- Type declarations ---*/
1195 struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor;
1196 struct __pyx_obj_2yt_8geometry_12oct_visitors_CountTotalOcts;
1197 struct __pyx_obj_2yt_8geometry_12oct_visitors_CountTotalCells;
1198 struct __pyx_obj_2yt_8geometry_12oct_visitors_MarkOcts;
1199 struct __pyx_obj_2yt_8geometry_12oct_visitors_MaskOcts;
1200 struct __pyx_obj_2yt_8geometry_12oct_visitors_IndexOcts;
1201 struct __pyx_obj_2yt_8geometry_12oct_visitors_MaskedIndexOcts;
1202 struct __pyx_obj_2yt_8geometry_12oct_visitors_IndexMaskMapOcts;
1203 struct __pyx_obj_2yt_8geometry_12oct_visitors_ICoordsOcts;
1204 struct __pyx_obj_2yt_8geometry_12oct_visitors_IResOcts;
1205 struct __pyx_obj_2yt_8geometry_12oct_visitors_FCoordsOcts;
1206 struct __pyx_obj_2yt_8geometry_12oct_visitors_FWidthOcts;
1207 struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyArrayI64;
1208 struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyArrayF64;
1209 struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8;
1210 struct __pyx_obj_2yt_8geometry_12oct_visitors_IdentifyOcts;
1211 struct __pyx_obj_2yt_8geometry_12oct_visitors_AssignDomainInd;
1212 struct __pyx_obj_2yt_8geometry_12oct_visitors_FillFileIndicesO;
1213 struct __pyx_obj_2yt_8geometry_12oct_visitors_FillFileIndicesR;
1214 struct __pyx_obj_2yt_8geometry_12oct_visitors_CountByDomain;
1215 struct __pyx_obj_2yt_8geometry_12oct_visitors_StoreOctree;
1216 struct __pyx_obj_2yt_8geometry_12oct_visitors_LoadOctree;
1217 struct __pyx_obj_2yt_8geometry_12oct_visitors_MortonIndexOcts;
1218 struct __pyx_obj_2yt_8geometry_12oct_visitors_StoreIndex;
1219 struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor;
1220 struct __pyx_obj_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor;
1221 struct __pyx_obj_2yt_8geometry_12oct_visitors_NeighbourCellVisitor;
1222 struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject;
1223 struct __pyx_obj_2yt_8geometry_18selection_routines_AlwaysSelector;
1224 struct __pyx_obj_2yt_8geometry_18selection_routines_OctreeSubsetSelector;
1225 struct __pyx_obj_2yt_8geometry_18selection_routines_BooleanSelector;
1226 struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool;
1227 struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool;
1228 struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer;
1229 struct __pyx_obj_2yt_8geometry_13oct_container_SparseOctreeContainer;
1230 struct __pyx_obj_2yt_8geometry_13oct_container_RAMSESOctreeContainer;
1231 struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
1232 struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles;
1233 struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth;
1234 struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField;
1235 struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField;
1236 struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit;
1237 struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField;
1238 struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier;
1239 struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier;
1240 struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField;
1241 struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize;
1242 struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr;
1243 struct __pyx_array_obj;
1244 struct __pyx_MemviewEnum_obj;
1245 struct __pyx_memoryview_obj;
1246 struct __pyx_memoryviewslice_obj;
1247 
1248 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
1249  * ctypedef npy_longdouble longdouble_t
1250  *
1251  * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
1252  * ctypedef npy_cdouble     cdouble_t
1253  * ctypedef npy_clongdouble clongdouble_t
1254  */
1255 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1256 
1257 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
1258  *
1259  * ctypedef npy_cfloat      cfloat_t
1260  * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
1261  * ctypedef npy_clongdouble clongdouble_t
1262  *
1263  */
1264 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1265 
1266 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
1267  * ctypedef npy_cfloat      cfloat_t
1268  * ctypedef npy_cdouble     cdouble_t
1269  * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
1270  *
1271  * ctypedef npy_cdouble     complex_t
1272  */
1273 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1274 
1275 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
1276  * ctypedef npy_clongdouble clongdouble_t
1277  *
1278  * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
1279  *
1280  * cdef inline object PyArray_MultiIterNew1(a):
1281  */
1282 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1283 struct __pyx_t_2yt_8geometry_12oct_visitors_Oct;
1284 struct __pyx_t_2yt_8geometry_12oct_visitors_OctInfo;
1285 struct __pyx_t_2yt_8geometry_12oct_visitors_OctPadded;
1286 
1287 /* "oct_visitors.pxd":13
1288  *
1289  *
1290  * cdef struct Oct             # <<<<<<<<<<<<<<
1291  * cdef struct Oct:
1292  *     np.int64_t file_ind     # index with respect to the order in which it was
1293  */
1294 struct __pyx_t_2yt_8geometry_12oct_visitors_Oct {
1295   __pyx_t_5numpy_int64_t file_ind;
1296   __pyx_t_5numpy_int64_t domain_ind;
1297   __pyx_t_5numpy_int64_t domain;
1298   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct **children;
1299 };
1300 
1301 /* "oct_visitors.pxd":21
1302  *     Oct **children          # Up to 8 long
1303  *
1304  * cdef struct OctInfo:             # <<<<<<<<<<<<<<
1305  *     np.float64_t left_edge[3]
1306  *     np.float64_t dds[3]
1307  */
1308 struct __pyx_t_2yt_8geometry_12oct_visitors_OctInfo {
1309   __pyx_t_5numpy_float64_t left_edge[3];
1310   __pyx_t_5numpy_float64_t dds[3];
1311   __pyx_t_5numpy_int64_t ipos[3];
1312   __pyx_t_5numpy_int32_t level;
1313 };
1314 
1315 /* "oct_visitors.pxd":27
1316  *     np.int32_t level
1317  *
1318  * cdef struct OctPadded:             # <<<<<<<<<<<<<<
1319  *     np.int64_t file_ind
1320  *     np.int64_t domain_ind
1321  */
1322 struct __pyx_t_2yt_8geometry_12oct_visitors_OctPadded {
1323   __pyx_t_5numpy_int64_t file_ind;
1324   __pyx_t_5numpy_int64_t domain_ind;
1325   __pyx_t_5numpy_int64_t domain;
1326   __pyx_t_5numpy_int64_t padding;
1327 };
1328 struct __pyx_t_2yt_8geometry_13grid_visitors_GridTreeNode;
1329 struct __pyx_t_2yt_8geometry_13grid_visitors_GridTreeNodePadded;
1330 struct __pyx_t_2yt_8geometry_13grid_visitors_GridVisitorData;
1331 
1332 /* "grid_visitors.pxd":13
1333  *
1334  *
1335  * cdef struct GridTreeNode:             # <<<<<<<<<<<<<<
1336  *     np.int32_t num_children
1337  *     np.int32_t level
1338  */
1339 struct __pyx_t_2yt_8geometry_13grid_visitors_GridTreeNode {
1340   __pyx_t_5numpy_int32_t num_children;
1341   __pyx_t_5numpy_int32_t level;
1342   __pyx_t_5numpy_int64_t index;
1343   __pyx_t_5numpy_float64_t left_edge[3];
1344   __pyx_t_5numpy_float64_t right_edge[3];
1345   struct __pyx_t_2yt_8geometry_13grid_visitors_GridTreeNode **children;
1346   __pyx_t_5numpy_int64_t start_index[3];
1347   __pyx_t_5numpy_int32_t dims[3];
1348   __pyx_t_5numpy_float64_t dds[3];
1349 };
1350 
1351 /* "grid_visitors.pxd":24
1352  *     np.float64_t dds[3]
1353  *
1354  * cdef struct GridTreeNodePadded:             # <<<<<<<<<<<<<<
1355  *     np.int32_t num_children
1356  *     np.int32_t level
1357  */
1358 struct __pyx_t_2yt_8geometry_13grid_visitors_GridTreeNodePadded {
1359   __pyx_t_5numpy_int32_t num_children;
1360   __pyx_t_5numpy_int32_t level;
1361   __pyx_t_5numpy_int64_t index;
1362   __pyx_t_5numpy_float64_t left_edge_x;
1363   __pyx_t_5numpy_float64_t left_edge_y;
1364   __pyx_t_5numpy_float64_t left_edge_z;
1365   __pyx_t_5numpy_float64_t right_edge_x;
1366   __pyx_t_5numpy_float64_t right_edge_y;
1367   __pyx_t_5numpy_float64_t right_edge_z;
1368   __pyx_t_5numpy_int_t children_pointers;
1369   __pyx_t_5numpy_int64_t start_index_x;
1370   __pyx_t_5numpy_int64_t start_index_y;
1371   __pyx_t_5numpy_int64_t start_index_z;
1372   __pyx_t_5numpy_int32_t dims_x;
1373   __pyx_t_5numpy_int32_t dims_y;
1374   __pyx_t_5numpy_int32_t dims_z;
1375   __pyx_t_5numpy_float64_t dds_x;
1376   __pyx_t_5numpy_float64_t dds_y;
1377   __pyx_t_5numpy_float64_t dds_z;
1378 };
1379 
1380 /* "grid_visitors.pxd":45
1381  *     np.float64_t dds_z
1382  *
1383  * cdef struct GridVisitorData:             # <<<<<<<<<<<<<<
1384  *     GridTreeNode *grid
1385  *     np.uint64_t index
1386  */
1387 struct __pyx_t_2yt_8geometry_13grid_visitors_GridVisitorData {
1388   struct __pyx_t_2yt_8geometry_13grid_visitors_GridTreeNode *grid;
1389   __pyx_t_5numpy_uint64_t index;
1390   __pyx_t_5numpy_uint64_t global_index;
1391   __pyx_t_5numpy_int64_t pos[3];
1392   int n_tuples;
1393   int **child_tuples;
1394   void *array;
1395   int ref_factor;
1396 };
1397 
1398 /* "grid_visitors.pxd":61
1399  * cdef np.uint8_t check_child_masked(GridVisitorData *data) nogil
1400  *
1401  * ctypedef void grid_visitor_function(GridVisitorData *data,             # <<<<<<<<<<<<<<
1402  *                                          np.uint8_t selected) nogil
1403  * # This is similar in spirit to the way oct visitor functions work.  However,
1404  */
1405 typedef void __pyx_t_2yt_8geometry_13grid_visitors_grid_visitor_function(struct __pyx_t_2yt_8geometry_13grid_visitors_GridVisitorData *, __pyx_t_5numpy_uint8_t);
1406 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_recursively_visit_octs;
1407 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_select_grid;
1408 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_select_grid_edge;
1409 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_visit_grid_cells;
1410 
1411 /* "selection_routines.pxd":34
1412  *     cdef np.int64_t _hash
1413  *
1414  *     cdef void recursively_visit_octs(self, Oct *root,             # <<<<<<<<<<<<<<
1415  *                         np.float64_t pos[3], np.float64_t dds[3],
1416  *                         int level,
1417  */
1418 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_recursively_visit_octs {
1419   int __pyx_n;
1420   int visit_covered;
1421 };
1422 
1423 /* "selection_routines.pxd":42
1424  *                               np.float64_t spos[3], np.float64_t sdds[3],
1425  *                               OctVisitor visitor, int i, int j, int k)
1426  *     cdef int select_grid(self, np.float64_t left_edge[3],             # <<<<<<<<<<<<<<
1427  *                                np.float64_t right_edge[3],
1428  *                                np.int32_t level, Oct *o = ?) nogil
1429  */
1430 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_select_grid {
1431   int __pyx_n;
1432   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *o;
1433 };
1434 
1435 /* "selection_routines.pxd":45
1436  *                                np.float64_t right_edge[3],
1437  *                                np.int32_t level, Oct *o = ?) nogil
1438  *     cdef int select_grid_edge(self, np.float64_t left_edge[3],             # <<<<<<<<<<<<<<
1439  *                                     np.float64_t right_edge[3],
1440  *                                     np.int32_t level, Oct *o = ?) nogil
1441  */
1442 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_select_grid_edge {
1443   int __pyx_n;
1444   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *o;
1445 };
1446 
1447 /* "selection_routines.pxd":62
1448  *                                 np.ndarray[np.uint8_t, ndim=3] mask,
1449  *                                 int level)
1450  *     cdef void visit_grid_cells(self, GridVisitorData *data,             # <<<<<<<<<<<<<<
1451  *                     grid_visitor_function *func, np.uint8_t *cached_mask = ?)
1452  *
1453  */
1454 struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_visit_grid_cells {
1455   int __pyx_n;
1456   __pyx_t_5numpy_uint8_t *cached_mask;
1457 };
1458 struct __pyx_t_2yt_9utilities_3lib_20allocation_container_AllocationContainer;
1459 struct __pyx_opt_args_2yt_9utilities_3lib_20allocation_container_10ObjectPool_allocate_objs;
1460 
1461 /* "yt/utilities/lib/allocation_container.pxd":13
1462  *
1463  *
1464  * cdef struct AllocationContainer:             # <<<<<<<<<<<<<<
1465  *     np.uint64_t n
1466  *     np.uint64_t n_assigned
1467  */
1468 struct __pyx_t_2yt_9utilities_3lib_20allocation_container_AllocationContainer {
1469   __pyx_t_5numpy_uint64_t n;
1470   __pyx_t_5numpy_uint64_t n_assigned;
1471   __pyx_t_5numpy_uint64_t offset;
1472   __pyx_t_5numpy_int64_t con_id;
1473   void *my_objs;
1474 };
1475 
1476 /* "yt/utilities/lib/allocation_container.pxd":24
1477  *     cdef np.uint64_t n_con
1478  *     cdef AllocationContainer* containers
1479  *     cdef void allocate_objs(self, int n_objs, np.int64_t con_id = ?) except *             # <<<<<<<<<<<<<<
1480  *     cdef void setup_objs(self, void *obj, np.uint64_t count,
1481  *                          np.uint64_t offset, np.int64_t con_id)
1482  */
1483 struct __pyx_opt_args_2yt_9utilities_3lib_20allocation_container_10ObjectPool_allocate_objs {
1484   int __pyx_n;
1485   __pyx_t_5numpy_int64_t con_id;
1486 };
1487 struct __pyx_t_2yt_8geometry_13oct_container_OctKey;
1488 struct __pyx_t_2yt_8geometry_13oct_container_OctList;
1489 struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer;
1490 struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_get;
1491 struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_visit_all_octs;
1492 
1493 /* "oct_container.pxd":25
1494  * cdef int ORDER_MAX
1495  *
1496  * cdef struct OctKey:             # <<<<<<<<<<<<<<
1497  *     np.int64_t key
1498  *     Oct *node
1499  */
1500 struct __pyx_t_2yt_8geometry_13oct_container_OctKey {
1501   __pyx_t_5numpy_int64_t key;
1502   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *node;
1503   __pyx_t_5numpy_int64_t *indices;
1504   __pyx_t_5numpy_int64_t pcount;
1505 };
1506 
1507 /* "oct_container.pxd":32
1508  *     np.int64_t pcount
1509  *
1510  * cdef struct OctList             # <<<<<<<<<<<<<<
1511  *
1512  * cdef struct OctList:
1513  */
1514 struct __pyx_t_2yt_8geometry_13oct_container_OctList {
1515   struct __pyx_t_2yt_8geometry_13oct_container_OctList *next;
1516   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *o;
1517 };
1518 
1519 /* "oct_container.pxd":40
1520  * # NOTE: This object *has* to be the same size as the AllocationContainer
1521  * # object.  There's an assert in the __cinit__ function.
1522  * cdef struct OctAllocationContainer:             # <<<<<<<<<<<<<<
1523  *     np.uint64_t n
1524  *     np.uint64_t n_assigned
1525  */
1526 struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer {
1527   __pyx_t_5numpy_uint64_t n;
1528   __pyx_t_5numpy_uint64_t n_assigned;
1529   __pyx_t_5numpy_uint64_t offset;
1530   __pyx_t_5numpy_int64_t con_id;
1531   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *my_objs;
1532 };
1533 
1534 /* "oct_container.pxd":66
1535  *     cdef public np.int64_t nocts
1536  *     cdef public int num_domains
1537  *     cdef Oct *get(self, np.float64_t ppos[3], OctInfo *oinfo = ?,             # <<<<<<<<<<<<<<
1538  *                   int max_level = ?) nogil
1539  *     cdef int get_root(self, int ind[3], Oct **o) nogil
1540  */
1541 struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_get {
1542   int __pyx_n;
1543   struct __pyx_t_2yt_8geometry_12oct_visitors_OctInfo *oinfo;
1544   int max_level;
1545 };
1546 
1547 /* "oct_container.pxd":74
1548  *     # AllocationContainer.offset if such a thing exists.
1549  *     cdef np.int64_t get_domain_offset(self, int domain_id)
1550  *     cdef void visit_all_octs(self,             # <<<<<<<<<<<<<<
1551  *                         selection_routines.SelectorObject selector,
1552  *                         OctVisitor visitor,
1553  */
1554 struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_visit_all_octs {
1555   int __pyx_n;
1556   int vc;
1557   __pyx_t_5numpy_int64_t *indices;
1558 };
1559 
1560 /* "yt/geometry/particle_deposit.pxd":119
1561  * # So in order to mimic a registry functionality,
1562  * # I manually created a function to lookup the kernel functions.
1563  * ctypedef np.float64_t (*kernel_func) (np.float64_t) nogil             # <<<<<<<<<<<<<<
1564  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:
1565  *     with gil:
1566  */
1567 typedef __pyx_t_5numpy_float64_t (*__pyx_t_2yt_8geometry_16particle_deposit_kernel_func)(__pyx_t_5numpy_float64_t);
1568 
1569 /* "oct_visitors.pxd":33
1570  *     np.int64_t padding
1571  *
1572  * cdef class OctVisitor:             # <<<<<<<<<<<<<<
1573  *     cdef np.uint64_t index
1574  *     cdef np.uint64_t last
1575  */
1576 struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor {
1577   PyObject_HEAD
1578   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor *__pyx_vtab;
1579   __pyx_t_5numpy_uint64_t index;
1580   __pyx_t_5numpy_uint64_t last;
1581   __pyx_t_5numpy_int64_t global_index;
1582   __pyx_t_5numpy_int64_t pos[3];
1583   __pyx_t_5numpy_uint8_t ind[3];
1584   int dims;
1585   __pyx_t_5numpy_int32_t domain;
1586   __pyx_t_5numpy_int8_t level;
1587   __pyx_t_5numpy_int8_t oref;
1588   __pyx_t_5numpy_int32_t nz;
1589 };
1590 
1591 
1592 /* "oct_visitors.pxd":59
1593  *         return (((self.ind[2]*d)+self.ind[1])*d+self.ind[0])
1594  *
1595  * cdef class CountTotalOcts(OctVisitor):             # <<<<<<<<<<<<<<
1596  *     pass
1597  *
1598  */
1599 struct __pyx_obj_2yt_8geometry_12oct_visitors_CountTotalOcts {
1600   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1601 };
1602 
1603 
1604 /* "oct_visitors.pxd":62
1605  *     pass
1606  *
1607  * cdef class CountTotalCells(OctVisitor):             # <<<<<<<<<<<<<<
1608  *     pass
1609  *
1610  */
1611 struct __pyx_obj_2yt_8geometry_12oct_visitors_CountTotalCells {
1612   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1613 };
1614 
1615 
1616 /* "oct_visitors.pxd":65
1617  *     pass
1618  *
1619  * cdef class MarkOcts(OctVisitor):             # <<<<<<<<<<<<<<
1620  *     # Unused
1621  *     cdef np.uint8_t[:,:,:,:] mark
1622  */
1623 struct __pyx_obj_2yt_8geometry_12oct_visitors_MarkOcts {
1624   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1625   __Pyx_memviewslice mark;
1626 };
1627 
1628 
1629 /* "oct_visitors.pxd":69
1630  *     cdef np.uint8_t[:,:,:,:] mark
1631  *
1632  * cdef class MaskOcts(OctVisitor):             # <<<<<<<<<<<<<<
1633  *     cdef np.uint8_t[:,:,:,:] mask
1634  *
1635  */
1636 struct __pyx_obj_2yt_8geometry_12oct_visitors_MaskOcts {
1637   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1638   __Pyx_memviewslice mask;
1639 };
1640 
1641 
1642 /* "oct_visitors.pxd":72
1643  *     cdef np.uint8_t[:,:,:,:] mask
1644  *
1645  * cdef class IndexOcts(OctVisitor):             # <<<<<<<<<<<<<<
1646  *     cdef np.int64_t[:] oct_index
1647  *
1648  */
1649 struct __pyx_obj_2yt_8geometry_12oct_visitors_IndexOcts {
1650   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1651   __Pyx_memviewslice oct_index;
1652 };
1653 
1654 
1655 /* "oct_visitors.pxd":75
1656  *     cdef np.int64_t[:] oct_index
1657  *
1658  * cdef class MaskedIndexOcts(OctVisitor):             # <<<<<<<<<<<<<<
1659  *     cdef np.int64_t[:] oct_index
1660  *     cdef np.uint8_t[:] oct_mask
1661  */
1662 struct __pyx_obj_2yt_8geometry_12oct_visitors_MaskedIndexOcts {
1663   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1664   __Pyx_memviewslice oct_index;
1665   __Pyx_memviewslice oct_mask;
1666 };
1667 
1668 
1669 /* "oct_visitors.pxd":79
1670  *     cdef np.uint8_t[:] oct_mask
1671  *
1672  * cdef class IndexMaskMapOcts(OctVisitor):             # <<<<<<<<<<<<<<
1673  *     cdef np.int64_t[:] oct_index
1674  *     cdef np.uint8_t[:] oct_mask
1675  */
1676 struct __pyx_obj_2yt_8geometry_12oct_visitors_IndexMaskMapOcts {
1677   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1678   __Pyx_memviewslice oct_index;
1679   __Pyx_memviewslice oct_mask;
1680   __Pyx_memviewslice map_domain_ind;
1681   __pyx_t_5numpy_uint64_t map_index;
1682 };
1683 
1684 
1685 /* "oct_visitors.pxd":85
1686  *     cdef np.uint64_t map_index
1687  *
1688  * cdef class ICoordsOcts(OctVisitor):             # <<<<<<<<<<<<<<
1689  *     cdef np.int64_t[:,:] icoords
1690  *
1691  */
1692 struct __pyx_obj_2yt_8geometry_12oct_visitors_ICoordsOcts {
1693   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1694   __Pyx_memviewslice icoords;
1695 };
1696 
1697 
1698 /* "oct_visitors.pxd":88
1699  *     cdef np.int64_t[:,:] icoords
1700  *
1701  * cdef class IResOcts(OctVisitor):             # <<<<<<<<<<<<<<
1702  *     cdef np.int64_t[:] ires
1703  *
1704  */
1705 struct __pyx_obj_2yt_8geometry_12oct_visitors_IResOcts {
1706   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1707   __Pyx_memviewslice ires;
1708 };
1709 
1710 
1711 /* "oct_visitors.pxd":91
1712  *     cdef np.int64_t[:] ires
1713  *
1714  * cdef class FCoordsOcts(OctVisitor):             # <<<<<<<<<<<<<<
1715  *     cdef np.float64_t[:,:] fcoords
1716  *
1717  */
1718 struct __pyx_obj_2yt_8geometry_12oct_visitors_FCoordsOcts {
1719   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1720   __Pyx_memviewslice fcoords;
1721 };
1722 
1723 
1724 /* "oct_visitors.pxd":94
1725  *     cdef np.float64_t[:,:] fcoords
1726  *
1727  * cdef class FWidthOcts(OctVisitor):             # <<<<<<<<<<<<<<
1728  *     cdef np.float64_t[:,:] fwidth
1729  *
1730  */
1731 struct __pyx_obj_2yt_8geometry_12oct_visitors_FWidthOcts {
1732   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1733   __Pyx_memviewslice fwidth;
1734 };
1735 
1736 
1737 /* "oct_visitors.pxd":97
1738  *     cdef np.float64_t[:,:] fwidth
1739  *
1740  * cdef class CopyArrayI64(OctVisitor):             # <<<<<<<<<<<<<<
1741  *     cdef np.int64_t[:,:,:,:,:,:] source
1742  *     cdef np.int64_t[:,:] dest
1743  */
1744 struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyArrayI64 {
1745   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1746   __Pyx_memviewslice source;
1747   __Pyx_memviewslice dest;
1748 };
1749 
1750 
1751 /* "oct_visitors.pxd":101
1752  *     cdef np.int64_t[:,:] dest
1753  *
1754  * cdef class CopyArrayF64(OctVisitor):             # <<<<<<<<<<<<<<
1755  *     cdef np.float64_t[:,:,:,:,:] source
1756  *     cdef np.float64_t[:,:] dest
1757  */
1758 struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyArrayF64 {
1759   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1760   __Pyx_memviewslice source;
1761   __Pyx_memviewslice dest;
1762 };
1763 
1764 
1765 /* "oct_visitors.pxd":105
1766  *     cdef np.float64_t[:,:] dest
1767  *
1768  * cdef class CopyFileIndArrayI8(OctVisitor):             # <<<<<<<<<<<<<<
1769  *     cdef np.int64_t root
1770  *     cdef np.uint8_t[:] source
1771  */
1772 struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8 {
1773   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1774   __pyx_t_5numpy_int64_t root;
1775   __Pyx_memviewslice source;
1776   __Pyx_memviewslice dest;
1777 };
1778 
1779 
1780 /* "oct_visitors.pxd":110
1781  *     cdef np.uint8_t[:] dest
1782  *
1783  * cdef class IdentifyOcts(OctVisitor):             # <<<<<<<<<<<<<<
1784  *     cdef np.uint8_t[:] domain_mask
1785  *
1786  */
1787 struct __pyx_obj_2yt_8geometry_12oct_visitors_IdentifyOcts {
1788   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1789   __Pyx_memviewslice domain_mask;
1790 };
1791 
1792 
1793 /* "oct_visitors.pxd":113
1794  *     cdef np.uint8_t[:] domain_mask
1795  *
1796  * cdef class AssignDomainInd(OctVisitor):             # <<<<<<<<<<<<<<
1797  *     pass
1798  *
1799  */
1800 struct __pyx_obj_2yt_8geometry_12oct_visitors_AssignDomainInd {
1801   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1802 };
1803 
1804 
1805 /* "oct_visitors.pxd":116
1806  *     pass
1807  *
1808  * cdef class FillFileIndicesO(OctVisitor):             # <<<<<<<<<<<<<<
1809  *     cdef np.uint8_t[:] levels
1810  *     cdef np.int64_t[:] file_inds
1811  */
1812 struct __pyx_obj_2yt_8geometry_12oct_visitors_FillFileIndicesO {
1813   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1814   __Pyx_memviewslice levels;
1815   __Pyx_memviewslice file_inds;
1816   __Pyx_memviewslice cell_inds;
1817 };
1818 
1819 
1820 /* "oct_visitors.pxd":121
1821  *     cdef np.uint8_t[:] cell_inds
1822  *
1823  * cdef class FillFileIndicesR(OctVisitor):             # <<<<<<<<<<<<<<
1824  *     cdef np.uint8_t[:] levels
1825  *     cdef np.int64_t[:] file_inds
1826  */
1827 struct __pyx_obj_2yt_8geometry_12oct_visitors_FillFileIndicesR {
1828   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1829   __Pyx_memviewslice levels;
1830   __Pyx_memviewslice file_inds;
1831   __Pyx_memviewslice cell_inds;
1832 };
1833 
1834 
1835 /* "oct_visitors.pxd":126
1836  *     cdef np.uint8_t[:] cell_inds
1837  *
1838  * cdef class CountByDomain(OctVisitor):             # <<<<<<<<<<<<<<
1839  *     cdef np.int64_t[:] domain_counts
1840  *
1841  */
1842 struct __pyx_obj_2yt_8geometry_12oct_visitors_CountByDomain {
1843   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1844   __Pyx_memviewslice domain_counts;
1845 };
1846 
1847 
1848 /* "oct_visitors.pxd":129
1849  *     cdef np.int64_t[:] domain_counts
1850  *
1851  * cdef class StoreOctree(OctVisitor):             # <<<<<<<<<<<<<<
1852  *     cdef np.uint8_t[:] ref_mask
1853  *
1854  */
1855 struct __pyx_obj_2yt_8geometry_12oct_visitors_StoreOctree {
1856   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1857   __Pyx_memviewslice ref_mask;
1858 };
1859 
1860 
1861 /* "oct_visitors.pxd":132
1862  *     cdef np.uint8_t[:] ref_mask
1863  *
1864  * cdef class LoadOctree(OctVisitor):             # <<<<<<<<<<<<<<
1865  *     cdef np.uint8_t[:] ref_mask
1866  *     cdef Oct* octs
1867  */
1868 struct __pyx_obj_2yt_8geometry_12oct_visitors_LoadOctree {
1869   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1870   __Pyx_memviewslice ref_mask;
1871   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *octs;
1872   __pyx_t_5numpy_uint64_t *nocts;
1873   __pyx_t_5numpy_uint64_t *nfinest;
1874 };
1875 
1876 
1877 /* "oct_visitors.pxd":138
1878  *     cdef np.uint64_t *nfinest
1879  *
1880  * cdef class MortonIndexOcts(OctVisitor):             # <<<<<<<<<<<<<<
1881  *     cdef np.uint8_t[:] level_arr
1882  *     cdef np.uint64_t[:] morton_ind
1883  */
1884 struct __pyx_obj_2yt_8geometry_12oct_visitors_MortonIndexOcts {
1885   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1886   __Pyx_memviewslice level_arr;
1887   __Pyx_memviewslice morton_ind;
1888 };
1889 
1890 
1891 /* "oct_visitors.pxd":149
1892  *
1893  *
1894  * cdef class StoreIndex(OctVisitor):             # <<<<<<<<<<<<<<
1895  *     cdef np.int64_t[:,:,:,:] cell_inds
1896  *
1897  */
1898 struct __pyx_obj_2yt_8geometry_12oct_visitors_StoreIndex {
1899   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1900   __Pyx_memviewslice cell_inds;
1901 };
1902 
1903 
1904 /* "oct_visitors.pxd":153
1905  *
1906  * # cimport oct_container
1907  * cdef class BaseNeighbourVisitor(OctVisitor):             # <<<<<<<<<<<<<<
1908  *     cdef int idim      # 0,1,2 for x,y,z
1909  *     cdef int direction # +1 for +x, -1 for -x
1910  */
1911 struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor {
1912   struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
1913   int idim;
1914   int direction;
1915   __pyx_t_5numpy_uint8_t neigh_ind[3];
1916   int other_oct;
1917   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *neighbour;
1918   struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *octree;
1919   struct __pyx_t_2yt_8geometry_12oct_visitors_OctInfo oi;
1920   int n_ghost_zones;
1921 };
1922 
1923 
1924 /* "oct_visitors.pxd":169
1925  *         return (((self.neigh_ind[2]*d)+self.neigh_ind[1])*d+self.neigh_ind[0])
1926  *
1927  * cdef class NeighbourCellIndexVisitor(BaseNeighbourVisitor):             # <<<<<<<<<<<<<<
1928  *     cdef np.uint8_t[::1] cell_inds
1929  *     cdef np.int64_t[::1] domain_inds
1930  */
1931 struct __pyx_obj_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor {
1932   struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor __pyx_base;
1933   __Pyx_memviewslice cell_inds;
1934   __Pyx_memviewslice domain_inds;
1935 };
1936 
1937 
1938 /* "oct_visitors.pxd":173
1939  *     cdef np.int64_t[::1] domain_inds
1940  *
1941  * cdef class NeighbourCellVisitor(BaseNeighbourVisitor):             # <<<<<<<<<<<<<<
1942  *     cdef np.uint8_t[::1] levels
1943  *     cdef np.int64_t[::1] file_inds
1944  */
1945 struct __pyx_obj_2yt_8geometry_12oct_visitors_NeighbourCellVisitor {
1946   struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor __pyx_base;
1947   __Pyx_memviewslice levels;
1948   __Pyx_memviewslice file_inds;
1949   __Pyx_memviewslice cell_inds;
1950   __Pyx_memviewslice domains;
1951 };
1952 
1953 
1954 /* "selection_routines.pxd":24
1955  *
1956  *
1957  * cdef class SelectorObject:             # <<<<<<<<<<<<<<
1958  *     cdef public np.int32_t min_level
1959  *     cdef public np.int32_t max_level
1960  */
1961 struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject {
1962   PyObject_HEAD
1963   struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject *__pyx_vtab;
1964   __pyx_t_5numpy_int32_t min_level;
1965   __pyx_t_5numpy_int32_t max_level;
1966   int overlap_cells;
1967   __pyx_t_5numpy_float64_t domain_width[3];
1968   __pyx_t_5numpy_float64_t domain_center[3];
1969   int periodicity[3];
1970   int _hash_initialized;
1971   __pyx_t_5numpy_int64_t _hash;
1972 };
1973 
1974 
1975 /* "selection_routines.pxd":70
1976  *         self, np.float64_t x1, np.float64_t x2, int d) nogil
1977  *
1978  * cdef class AlwaysSelector(SelectorObject):             # <<<<<<<<<<<<<<
1979  *     pass
1980  *
1981  */
1982 struct __pyx_obj_2yt_8geometry_18selection_routines_AlwaysSelector {
1983   struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject __pyx_base;
1984 };
1985 
1986 
1987 /* "selection_routines.pxd":73
1988  *     pass
1989  *
1990  * cdef class OctreeSubsetSelector(SelectorObject):             # <<<<<<<<<<<<<<
1991  *     cdef public SelectorObject base_selector
1992  *     cdef public np.int64_t domain_id
1993  */
1994 struct __pyx_obj_2yt_8geometry_18selection_routines_OctreeSubsetSelector {
1995   struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject __pyx_base;
1996   struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *base_selector;
1997   __pyx_t_5numpy_int64_t domain_id;
1998 };
1999 
2000 
2001 /* "selection_routines.pxd":77
2002  *     cdef public np.int64_t domain_id
2003  *
2004  * cdef class BooleanSelector(SelectorObject):             # <<<<<<<<<<<<<<
2005  *     cdef public SelectorObject sel1
2006  *     cdef public SelectorObject sel2
2007  */
2008 struct __pyx_obj_2yt_8geometry_18selection_routines_BooleanSelector {
2009   struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject __pyx_base;
2010   struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *sel1;
2011   struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *sel2;
2012 };
2013 
2014 
2015 /* "yt/utilities/lib/allocation_container.pxd":20
2016  *     void *my_objs
2017  *
2018  * cdef class ObjectPool:             # <<<<<<<<<<<<<<
2019  *     cdef public np.uint64_t itemsize
2020  *     cdef np.uint64_t n_con
2021  */
2022 struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool {
2023   PyObject_HEAD
2024   struct __pyx_vtabstruct_2yt_9utilities_3lib_20allocation_container_ObjectPool *__pyx_vtab;
2025   __pyx_t_5numpy_uint64_t itemsize;
2026   __pyx_t_5numpy_uint64_t n_con;
2027   struct __pyx_t_2yt_9utilities_3lib_20allocation_container_AllocationContainer *containers;
2028 };
2029 
2030 
2031 /* "oct_container.pxd":47
2032  *     Oct *my_objs
2033  *
2034  * cdef class OctObjectPool(ObjectPool):             # <<<<<<<<<<<<<<
2035  *     cdef inline OctAllocationContainer *get_cont(self, int i):
2036  *         return <OctAllocationContainer*> (&self.containers[i])
2037  */
2038 struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool {
2039   struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool __pyx_base;
2040 };
2041 
2042 
2043 /* "oct_container.pxd":55
2044  * cdef void OctList_delete(OctList *list)
2045  *
2046  * cdef class OctreeContainer:             # <<<<<<<<<<<<<<
2047  *     cdef public OctObjectPool domains
2048  *     cdef Oct ****root_mesh
2049  */
2050 struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer {
2051   PyObject_HEAD
2052   struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer *__pyx_vtab;
2053   struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool *domains;
2054   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct ****root_mesh;
2055   int partial_coverage;
2056   int level_offset;
2057   int nn[3];
2058   __pyx_t_5numpy_uint8_t oref;
2059   __pyx_t_5numpy_float64_t DLE[3];
2060   __pyx_t_5numpy_float64_t DRE[3];
2061   __pyx_t_5numpy_int64_t nocts;
2062   int num_domains;
2063   PyObject *fill_style;
2064 };
2065 
2066 
2067 /* "oct_container.pxd":85
2068  *     cdef public object fill_style
2069  *
2070  * cdef class SparseOctreeContainer(OctreeContainer):             # <<<<<<<<<<<<<<
2071  *     cdef OctKey *root_nodes
2072  *     cdef void *tree_root
2073  */
2074 struct __pyx_obj_2yt_8geometry_13oct_container_SparseOctreeContainer {
2075   struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer __pyx_base;
2076   struct __pyx_t_2yt_8geometry_13oct_container_OctKey *root_nodes;
2077   void *tree_root;
2078   int num_root;
2079   int max_root;
2080 };
2081 
2082 
2083 /* "oct_container.pxd":93
2084  *     cdef np.int64_t ipos_to_key(self, int pos[3]) nogil
2085  *
2086  * cdef class RAMSESOctreeContainer(SparseOctreeContainer):             # <<<<<<<<<<<<<<
2087  *     pass
2088  *
2089  */
2090 struct __pyx_obj_2yt_8geometry_13oct_container_RAMSESOctreeContainer {
2091   struct __pyx_obj_2yt_8geometry_13oct_container_SparseOctreeContainer __pyx_base;
2092 };
2093 
2094 
2095 /* "yt/geometry/particle_deposit.pxd":139
2096  *             raise NotImplementedError
2097  *
2098  * cdef class ParticleDepositOperation:             # <<<<<<<<<<<<<<
2099  *     # We assume each will allocate and define their own temporary storage
2100  *     cdef kernel_func sph_kernel
2101  */
2102 struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation {
2103   PyObject_HEAD
2104   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_vtab;
2105   __pyx_t_2yt_8geometry_16particle_deposit_kernel_func sph_kernel;
2106   PyObject *nvals;
2107   int update_values;
2108 };
2109 
2110 
2111 /* "yt/geometry/particle_deposit.pyx":166
2112  *             raise NotImplementedError
2113  *
2114  * cdef class CountParticles(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2115  *     cdef np.int64_t[:,:,:,:] count
2116  *     def initialize(self):
2117  */
2118 struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles {
2119   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2120   __Pyx_memviewslice count;
2121 };
2122 
2123 
2124 /* "yt/geometry/particle_deposit.pyx":198
2125  * deposit_count = CountParticles
2126  *
2127  * cdef class SimpleSmooth(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2128  *     # Note that this does nothing at the edges.  So it will give a poor
2129  *     # estimate there, and since Octrees are mostly edges, this will be a very
2130  */
2131 struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth {
2132   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2133   __Pyx_memviewslice data;
2134   __Pyx_memviewslice temp;
2135 };
2136 
2137 
2138 /* "yt/geometry/particle_deposit.pyx":266
2139  * deposit_simple_smooth = SimpleSmooth
2140  *
2141  * cdef class SumParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2142  *     cdef np.float64_t[:,:,:,:] sum
2143  *     def initialize(self):
2144  */
2145 struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField {
2146   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2147   __Pyx_memviewslice sum;
2148 };
2149 
2150 
2151 /* "yt/geometry/particle_deposit.pyx":296
2152  * deposit_sum = SumParticleField
2153  *
2154  * cdef class StdParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2155  *     # Thanks to Britton and MJ Turk for the link
2156  *     # to a single-pass STD
2157  */
2158 struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField {
2159   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2160   __Pyx_memviewslice mk;
2161   __Pyx_memviewslice qk;
2162   __Pyx_memviewslice i;
2163 };
2164 
2165 
2166 /* "yt/geometry/particle_deposit.pyx":354
2167  * deposit_std = StdParticleField
2168  *
2169  * cdef class CICDeposit(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2170  *     cdef np.float64_t[:,:,:,:] field
2171  *     cdef public object ofield
2172  */
2173 struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit {
2174   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2175   __Pyx_memviewslice field;
2176   PyObject *ofield;
2177 };
2178 
2179 
2180 /* "yt/geometry/particle_deposit.pyx":410
2181  * deposit_cic = CICDeposit
2182  *
2183  * cdef class WeightedMeanParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2184  *     # Deposit both mass * field and mass into two scalars
2185  *     # then in finalize divide mass * field / mass
2186  */
2187 struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField {
2188   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2189   __Pyx_memviewslice wf;
2190   __Pyx_memviewslice w;
2191 };
2192 
2193 
2194 /* "yt/geometry/particle_deposit.pyx":449
2195  * deposit_weighted_mean = WeightedMeanParticleField
2196  *
2197  * cdef class MeshIdentifier(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2198  *     # This is a tricky one!  What it does is put into the particle array the
2199  *     # value of the oct or block (grids will always be zero) identifier that a
2200  */
2201 struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier {
2202   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2203 };
2204 
2205 
2206 /* "yt/geometry/particle_deposit.pyx":474
2207  * deposit_mesh_id = MeshIdentifier
2208  *
2209  * cdef class CellIdentifier(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2210  *     cdef np.int64_t[:] indexes, cell_index
2211  *     # This method stores the offset of the grid containing each particle
2212  */
2213 struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier {
2214   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2215   __Pyx_memviewslice indexes;
2216   __Pyx_memviewslice cell_index;
2217 };
2218 
2219 
2220 /* "yt/geometry/particle_deposit.pyx":510
2221  * deposit_cell_id = CellIdentifier
2222  *
2223  * cdef class NNParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2224  *     cdef np.float64_t[:,:,:,:] nnfield
2225  *     cdef np.float64_t[:,:,:,:] distfield
2226  */
2227 struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField {
2228   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2229   __Pyx_memviewslice nnfield;
2230   __Pyx_memviewslice distfield;
2231 };
2232 
2233 
2234 /* "yt/geometry/particle_deposit.pyx":357
2235  *     cdef np.float64_t[:,:,:,:] field
2236  *     cdef public object ofield
2237  *     def initialize(self):             # <<<<<<<<<<<<<<
2238  *         if not all(_ > 1 for _ in self.nvals[:-1]):
2239  *             from yt.utilities.exceptions import YTBoundsDefinitionError
2240  */
2241 struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize {
2242   PyObject_HEAD
2243   struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self;
2244 };
2245 
2246 
2247 /* "yt/geometry/particle_deposit.pyx":358
2248  *     cdef public object ofield
2249  *     def initialize(self):
2250  *         if not all(_ > 1 for _ in self.nvals[:-1]):             # <<<<<<<<<<<<<<
2251  *             from yt.utilities.exceptions import YTBoundsDefinitionError
2252  *             raise YTBoundsDefinitionError(
2253  */
2254 struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr {
2255   PyObject_HEAD
2256   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *__pyx_outer_scope;
2257   PyObject *__pyx_v__;
2258 };
2259 
2260 
2261 /* "View.MemoryView":105
2262  *
2263  * @cname("__pyx_array")
2264  * cdef class array:             # <<<<<<<<<<<<<<
2265  *
2266  *     cdef:
2267  */
2268 struct __pyx_array_obj {
2269   PyObject_HEAD
2270   struct __pyx_vtabstruct_array *__pyx_vtab;
2271   char *data;
2272   Py_ssize_t len;
2273   char *format;
2274   int ndim;
2275   Py_ssize_t *_shape;
2276   Py_ssize_t *_strides;
2277   Py_ssize_t itemsize;
2278   PyObject *mode;
2279   PyObject *_format;
2280   void (*callback_free_data)(void *);
2281   int free_data;
2282   int dtype_is_object;
2283 };
2284 
2285 
2286 /* "View.MemoryView":279
2287  *
2288  * @cname('__pyx_MemviewEnum')
2289  * cdef class Enum(object):             # <<<<<<<<<<<<<<
2290  *     cdef object name
2291  *     def __init__(self, name):
2292  */
2293 struct __pyx_MemviewEnum_obj {
2294   PyObject_HEAD
2295   PyObject *name;
2296 };
2297 
2298 
2299 /* "View.MemoryView":330
2300  *
2301  * @cname('__pyx_memoryview')
2302  * cdef class memoryview(object):             # <<<<<<<<<<<<<<
2303  *
2304  *     cdef object obj
2305  */
2306 struct __pyx_memoryview_obj {
2307   PyObject_HEAD
2308   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
2309   PyObject *obj;
2310   PyObject *_size;
2311   PyObject *_array_interface;
2312   PyThread_type_lock lock;
2313   __pyx_atomic_int acquisition_count[2];
2314   __pyx_atomic_int *acquisition_count_aligned_p;
2315   Py_buffer view;
2316   int flags;
2317   int dtype_is_object;
2318   __Pyx_TypeInfo *typeinfo;
2319 };
2320 
2321 
2322 /* "View.MemoryView":961
2323  *
2324  * @cname('__pyx_memoryviewslice')
2325  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
2326  *     "Internal class for passing memoryview slices to Python"
2327  *
2328  */
2329 struct __pyx_memoryviewslice_obj {
2330   struct __pyx_memoryview_obj __pyx_base;
2331   __Pyx_memviewslice from_slice;
2332   PyObject *from_object;
2333   PyObject *(*to_object_func)(char *);
2334   int (*to_dtype_func)(char *, PyObject *);
2335 };
2336 
2337 
2338 
2339 /* "View.MemoryView":330
2340  *
2341  * @cname('__pyx_memoryview')
2342  * cdef class memoryview(object):             # <<<<<<<<<<<<<<
2343  *
2344  *     cdef object obj
2345  */
2346 
2347 struct __pyx_vtabstruct_memoryview {
2348   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
2349   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
2350   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2351   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
2352   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2353   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
2354   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
2355 };
2356 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
2357 
2358 
2359 /* "oct_visitors.pxd":33
2360  *     np.int64_t padding
2361  *
2362  * cdef class OctVisitor:             # <<<<<<<<<<<<<<
2363  *     cdef np.uint64_t index
2364  *     cdef np.uint64_t last
2365  */
2366 
2367 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor {
2368   void (*visit)(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *, __pyx_t_5numpy_uint8_t);
2369   int (*oind)(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *);
2370   int (*rind)(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *);
2371 };
2372 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor *__pyx_vtabptr_2yt_8geometry_12oct_visitors_OctVisitor;
2373 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_oind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *);
2374 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *);
2375 
2376 
2377 /* "oct_visitors.pxd":59
2378  *         return (((self.ind[2]*d)+self.ind[1])*d+self.ind[0])
2379  *
2380  * cdef class CountTotalOcts(OctVisitor):             # <<<<<<<<<<<<<<
2381  *     pass
2382  *
2383  */
2384 
2385 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountTotalOcts {
2386   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2387 };
2388 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountTotalOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_CountTotalOcts;
2389 
2390 
2391 /* "oct_visitors.pxd":62
2392  *     pass
2393  *
2394  * cdef class CountTotalCells(OctVisitor):             # <<<<<<<<<<<<<<
2395  *     pass
2396  *
2397  */
2398 
2399 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountTotalCells {
2400   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2401 };
2402 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountTotalCells *__pyx_vtabptr_2yt_8geometry_12oct_visitors_CountTotalCells;
2403 
2404 
2405 /* "oct_visitors.pxd":65
2406  *     pass
2407  *
2408  * cdef class MarkOcts(OctVisitor):             # <<<<<<<<<<<<<<
2409  *     # Unused
2410  *     cdef np.uint8_t[:,:,:,:] mark
2411  */
2412 
2413 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MarkOcts {
2414   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2415 };
2416 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MarkOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_MarkOcts;
2417 
2418 
2419 /* "oct_visitors.pxd":69
2420  *     cdef np.uint8_t[:,:,:,:] mark
2421  *
2422  * cdef class MaskOcts(OctVisitor):             # <<<<<<<<<<<<<<
2423  *     cdef np.uint8_t[:,:,:,:] mask
2424  *
2425  */
2426 
2427 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MaskOcts {
2428   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2429 };
2430 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MaskOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_MaskOcts;
2431 
2432 
2433 /* "oct_visitors.pxd":72
2434  *     cdef np.uint8_t[:,:,:,:] mask
2435  *
2436  * cdef class IndexOcts(OctVisitor):             # <<<<<<<<<<<<<<
2437  *     cdef np.int64_t[:] oct_index
2438  *
2439  */
2440 
2441 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IndexOcts {
2442   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2443 };
2444 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IndexOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_IndexOcts;
2445 
2446 
2447 /* "oct_visitors.pxd":75
2448  *     cdef np.int64_t[:] oct_index
2449  *
2450  * cdef class MaskedIndexOcts(OctVisitor):             # <<<<<<<<<<<<<<
2451  *     cdef np.int64_t[:] oct_index
2452  *     cdef np.uint8_t[:] oct_mask
2453  */
2454 
2455 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MaskedIndexOcts {
2456   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2457 };
2458 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MaskedIndexOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_MaskedIndexOcts;
2459 
2460 
2461 /* "oct_visitors.pxd":79
2462  *     cdef np.uint8_t[:] oct_mask
2463  *
2464  * cdef class IndexMaskMapOcts(OctVisitor):             # <<<<<<<<<<<<<<
2465  *     cdef np.int64_t[:] oct_index
2466  *     cdef np.uint8_t[:] oct_mask
2467  */
2468 
2469 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IndexMaskMapOcts {
2470   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2471 };
2472 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IndexMaskMapOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_IndexMaskMapOcts;
2473 
2474 
2475 /* "oct_visitors.pxd":85
2476  *     cdef np.uint64_t map_index
2477  *
2478  * cdef class ICoordsOcts(OctVisitor):             # <<<<<<<<<<<<<<
2479  *     cdef np.int64_t[:,:] icoords
2480  *
2481  */
2482 
2483 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_ICoordsOcts {
2484   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2485 };
2486 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_ICoordsOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_ICoordsOcts;
2487 
2488 
2489 /* "oct_visitors.pxd":88
2490  *     cdef np.int64_t[:,:] icoords
2491  *
2492  * cdef class IResOcts(OctVisitor):             # <<<<<<<<<<<<<<
2493  *     cdef np.int64_t[:] ires
2494  *
2495  */
2496 
2497 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IResOcts {
2498   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2499 };
2500 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IResOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_IResOcts;
2501 
2502 
2503 /* "oct_visitors.pxd":91
2504  *     cdef np.int64_t[:] ires
2505  *
2506  * cdef class FCoordsOcts(OctVisitor):             # <<<<<<<<<<<<<<
2507  *     cdef np.float64_t[:,:] fcoords
2508  *
2509  */
2510 
2511 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FCoordsOcts {
2512   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2513 };
2514 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FCoordsOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_FCoordsOcts;
2515 
2516 
2517 /* "oct_visitors.pxd":94
2518  *     cdef np.float64_t[:,:] fcoords
2519  *
2520  * cdef class FWidthOcts(OctVisitor):             # <<<<<<<<<<<<<<
2521  *     cdef np.float64_t[:,:] fwidth
2522  *
2523  */
2524 
2525 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FWidthOcts {
2526   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2527 };
2528 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FWidthOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_FWidthOcts;
2529 
2530 
2531 /* "oct_visitors.pxd":97
2532  *     cdef np.float64_t[:,:] fwidth
2533  *
2534  * cdef class CopyArrayI64(OctVisitor):             # <<<<<<<<<<<<<<
2535  *     cdef np.int64_t[:,:,:,:,:,:] source
2536  *     cdef np.int64_t[:,:] dest
2537  */
2538 
2539 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyArrayI64 {
2540   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2541 };
2542 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyArrayI64 *__pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyArrayI64;
2543 
2544 
2545 /* "oct_visitors.pxd":101
2546  *     cdef np.int64_t[:,:] dest
2547  *
2548  * cdef class CopyArrayF64(OctVisitor):             # <<<<<<<<<<<<<<
2549  *     cdef np.float64_t[:,:,:,:,:] source
2550  *     cdef np.float64_t[:,:] dest
2551  */
2552 
2553 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyArrayF64 {
2554   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2555 };
2556 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyArrayF64 *__pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyArrayF64;
2557 
2558 
2559 /* "oct_visitors.pxd":105
2560  *     cdef np.float64_t[:,:] dest
2561  *
2562  * cdef class CopyFileIndArrayI8(OctVisitor):             # <<<<<<<<<<<<<<
2563  *     cdef np.int64_t root
2564  *     cdef np.uint8_t[:] source
2565  */
2566 
2567 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8 {
2568   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2569 };
2570 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8 *__pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8;
2571 
2572 
2573 /* "oct_visitors.pxd":110
2574  *     cdef np.uint8_t[:] dest
2575  *
2576  * cdef class IdentifyOcts(OctVisitor):             # <<<<<<<<<<<<<<
2577  *     cdef np.uint8_t[:] domain_mask
2578  *
2579  */
2580 
2581 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IdentifyOcts {
2582   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2583 };
2584 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IdentifyOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_IdentifyOcts;
2585 
2586 
2587 /* "oct_visitors.pxd":113
2588  *     cdef np.uint8_t[:] domain_mask
2589  *
2590  * cdef class AssignDomainInd(OctVisitor):             # <<<<<<<<<<<<<<
2591  *     pass
2592  *
2593  */
2594 
2595 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_AssignDomainInd {
2596   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2597 };
2598 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_AssignDomainInd *__pyx_vtabptr_2yt_8geometry_12oct_visitors_AssignDomainInd;
2599 
2600 
2601 /* "oct_visitors.pxd":116
2602  *     pass
2603  *
2604  * cdef class FillFileIndicesO(OctVisitor):             # <<<<<<<<<<<<<<
2605  *     cdef np.uint8_t[:] levels
2606  *     cdef np.int64_t[:] file_inds
2607  */
2608 
2609 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FillFileIndicesO {
2610   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2611 };
2612 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FillFileIndicesO *__pyx_vtabptr_2yt_8geometry_12oct_visitors_FillFileIndicesO;
2613 
2614 
2615 /* "oct_visitors.pxd":121
2616  *     cdef np.uint8_t[:] cell_inds
2617  *
2618  * cdef class FillFileIndicesR(OctVisitor):             # <<<<<<<<<<<<<<
2619  *     cdef np.uint8_t[:] levels
2620  *     cdef np.int64_t[:] file_inds
2621  */
2622 
2623 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FillFileIndicesR {
2624   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2625 };
2626 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FillFileIndicesR *__pyx_vtabptr_2yt_8geometry_12oct_visitors_FillFileIndicesR;
2627 
2628 
2629 /* "oct_visitors.pxd":126
2630  *     cdef np.uint8_t[:] cell_inds
2631  *
2632  * cdef class CountByDomain(OctVisitor):             # <<<<<<<<<<<<<<
2633  *     cdef np.int64_t[:] domain_counts
2634  *
2635  */
2636 
2637 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountByDomain {
2638   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2639 };
2640 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountByDomain *__pyx_vtabptr_2yt_8geometry_12oct_visitors_CountByDomain;
2641 
2642 
2643 /* "oct_visitors.pxd":129
2644  *     cdef np.int64_t[:] domain_counts
2645  *
2646  * cdef class StoreOctree(OctVisitor):             # <<<<<<<<<<<<<<
2647  *     cdef np.uint8_t[:] ref_mask
2648  *
2649  */
2650 
2651 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_StoreOctree {
2652   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2653 };
2654 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_StoreOctree *__pyx_vtabptr_2yt_8geometry_12oct_visitors_StoreOctree;
2655 
2656 
2657 /* "oct_visitors.pxd":132
2658  *     cdef np.uint8_t[:] ref_mask
2659  *
2660  * cdef class LoadOctree(OctVisitor):             # <<<<<<<<<<<<<<
2661  *     cdef np.uint8_t[:] ref_mask
2662  *     cdef Oct* octs
2663  */
2664 
2665 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_LoadOctree {
2666   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2667 };
2668 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_LoadOctree *__pyx_vtabptr_2yt_8geometry_12oct_visitors_LoadOctree;
2669 
2670 
2671 /* "oct_visitors.pxd":138
2672  *     cdef np.uint64_t *nfinest
2673  *
2674  * cdef class MortonIndexOcts(OctVisitor):             # <<<<<<<<<<<<<<
2675  *     cdef np.uint8_t[:] level_arr
2676  *     cdef np.uint64_t[:] morton_ind
2677  */
2678 
2679 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MortonIndexOcts {
2680   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2681 };
2682 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MortonIndexOcts *__pyx_vtabptr_2yt_8geometry_12oct_visitors_MortonIndexOcts;
2683 
2684 
2685 /* "oct_visitors.pxd":149
2686  *
2687  *
2688  * cdef class StoreIndex(OctVisitor):             # <<<<<<<<<<<<<<
2689  *     cdef np.int64_t[:,:,:,:] cell_inds
2690  *
2691  */
2692 
2693 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_StoreIndex {
2694   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2695 };
2696 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_StoreIndex *__pyx_vtabptr_2yt_8geometry_12oct_visitors_StoreIndex;
2697 
2698 
2699 /* "oct_visitors.pxd":153
2700  *
2701  * # cimport oct_container
2702  * cdef class BaseNeighbourVisitor(OctVisitor):             # <<<<<<<<<<<<<<
2703  *     cdef int idim      # 0,1,2 for x,y,z
2704  *     cdef int direction # +1 for +x, -1 for -x
2705  */
2706 
2707 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor {
2708   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor __pyx_base;
2709   void (*set_neighbour_info)(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *, int *);
2710   __pyx_t_5numpy_uint8_t (*neighbour_rind)(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor *);
2711 };
2712 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor *__pyx_vtabptr_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor;
2713 static CYTHON_INLINE __pyx_t_5numpy_uint8_t __pyx_f_2yt_8geometry_12oct_visitors_20BaseNeighbourVisitor_neighbour_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor *);
2714 
2715 
2716 /* "oct_visitors.pxd":169
2717  *         return (((self.neigh_ind[2]*d)+self.neigh_ind[1])*d+self.neigh_ind[0])
2718  *
2719  * cdef class NeighbourCellIndexVisitor(BaseNeighbourVisitor):             # <<<<<<<<<<<<<<
2720  *     cdef np.uint8_t[::1] cell_inds
2721  *     cdef np.int64_t[::1] domain_inds
2722  */
2723 
2724 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor {
2725   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor __pyx_base;
2726 };
2727 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor *__pyx_vtabptr_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor;
2728 
2729 
2730 /* "oct_visitors.pxd":173
2731  *     cdef np.int64_t[::1] domain_inds
2732  *
2733  * cdef class NeighbourCellVisitor(BaseNeighbourVisitor):             # <<<<<<<<<<<<<<
2734  *     cdef np.uint8_t[::1] levels
2735  *     cdef np.int64_t[::1] file_inds
2736  */
2737 
2738 struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_NeighbourCellVisitor {
2739   struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor __pyx_base;
2740 };
2741 static struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_NeighbourCellVisitor *__pyx_vtabptr_2yt_8geometry_12oct_visitors_NeighbourCellVisitor;
2742 
2743 
2744 /* "selection_routines.pxd":24
2745  *
2746  *
2747  * cdef class SelectorObject:             # <<<<<<<<<<<<<<
2748  *     cdef public np.int32_t min_level
2749  *     cdef public np.int32_t max_level
2750  */
2751 
2752 struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject {
2753   void (*recursively_visit_octs)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *, struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_recursively_visit_octs *__pyx_optional_args);
2754   void (*visit_oct_cells)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *, int, int, int);
2755   int (*select_grid)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int32_t, struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_select_grid *__pyx_optional_args);
2756   int (*select_grid_edge)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int32_t, struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_select_grid_edge *__pyx_optional_args);
2757   int (*select_cell)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
2758   int (*select_point)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *);
2759   int (*select_sphere)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t);
2760   int (*select_bbox)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
2761   int (*select_bbox_edge)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
2762   int (*fill_mask_selector)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int *, PyArrayObject *, PyArrayObject *, int);
2763   void (*visit_grid_cells)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, struct __pyx_t_2yt_8geometry_13grid_visitors_GridVisitorData *, __pyx_t_2yt_8geometry_13grid_visitors_grid_visitor_function *, struct __pyx_opt_args_2yt_8geometry_18selection_routines_14SelectorObject_visit_grid_cells *__pyx_optional_args);
2764   __pyx_t_5numpy_float64_t (*periodic_difference)(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int);
2765 };
2766 static struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject *__pyx_vtabptr_2yt_8geometry_18selection_routines_SelectorObject;
2767 
2768 
2769 /* "selection_routines.pxd":70
2770  *         self, np.float64_t x1, np.float64_t x2, int d) nogil
2771  *
2772  * cdef class AlwaysSelector(SelectorObject):             # <<<<<<<<<<<<<<
2773  *     pass
2774  *
2775  */
2776 
2777 struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_AlwaysSelector {
2778   struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject __pyx_base;
2779 };
2780 static struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_AlwaysSelector *__pyx_vtabptr_2yt_8geometry_18selection_routines_AlwaysSelector;
2781 
2782 
2783 /* "selection_routines.pxd":73
2784  *     pass
2785  *
2786  * cdef class OctreeSubsetSelector(SelectorObject):             # <<<<<<<<<<<<<<
2787  *     cdef public SelectorObject base_selector
2788  *     cdef public np.int64_t domain_id
2789  */
2790 
2791 struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_OctreeSubsetSelector {
2792   struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject __pyx_base;
2793 };
2794 static struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_OctreeSubsetSelector *__pyx_vtabptr_2yt_8geometry_18selection_routines_OctreeSubsetSelector;
2795 
2796 
2797 /* "selection_routines.pxd":77
2798  *     cdef public np.int64_t domain_id
2799  *
2800  * cdef class BooleanSelector(SelectorObject):             # <<<<<<<<<<<<<<
2801  *     cdef public SelectorObject sel1
2802  *     cdef public SelectorObject sel2
2803  */
2804 
2805 struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_BooleanSelector {
2806   struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject __pyx_base;
2807 };
2808 static struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_BooleanSelector *__pyx_vtabptr_2yt_8geometry_18selection_routines_BooleanSelector;
2809 
2810 
2811 /* "yt/utilities/lib/allocation_container.pxd":20
2812  *     void *my_objs
2813  *
2814  * cdef class ObjectPool:             # <<<<<<<<<<<<<<
2815  *     cdef public np.uint64_t itemsize
2816  *     cdef np.uint64_t n_con
2817  */
2818 
2819 struct __pyx_vtabstruct_2yt_9utilities_3lib_20allocation_container_ObjectPool {
2820   void (*allocate_objs)(struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool *, int, struct __pyx_opt_args_2yt_9utilities_3lib_20allocation_container_10ObjectPool_allocate_objs *__pyx_optional_args);
2821   void (*setup_objs)(struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool *, void *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_int64_t);
2822   void (*teardown_objs)(struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool *, void *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_int64_t);
2823 };
2824 static struct __pyx_vtabstruct_2yt_9utilities_3lib_20allocation_container_ObjectPool *__pyx_vtabptr_2yt_9utilities_3lib_20allocation_container_ObjectPool;
2825 
2826 
2827 /* "oct_container.pxd":47
2828  *     Oct *my_objs
2829  *
2830  * cdef class OctObjectPool(ObjectPool):             # <<<<<<<<<<<<<<
2831  *     cdef inline OctAllocationContainer *get_cont(self, int i):
2832  *         return <OctAllocationContainer*> (&self.containers[i])
2833  */
2834 
2835 struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctObjectPool {
2836   struct __pyx_vtabstruct_2yt_9utilities_3lib_20allocation_container_ObjectPool __pyx_base;
2837   struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer *(*get_cont)(struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool *, int);
2838 };
2839 static struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctObjectPool *__pyx_vtabptr_2yt_8geometry_13oct_container_OctObjectPool;
2840 static CYTHON_INLINE struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer *__pyx_f_2yt_8geometry_13oct_container_13OctObjectPool_get_cont(struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool *, int);
2841 
2842 
2843 /* "oct_container.pxd":55
2844  * cdef void OctList_delete(OctList *list)
2845  *
2846  * cdef class OctreeContainer:             # <<<<<<<<<<<<<<
2847  *     cdef public OctObjectPool domains
2848  *     cdef Oct ****root_mesh
2849  */
2850 
2851 struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer {
2852   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *(*get)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, __pyx_t_5numpy_float64_t *, struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_get *__pyx_optional_args);
2853   int (*get_root)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, int *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct **);
2854   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct **(*neighbors)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, struct __pyx_t_2yt_8geometry_12oct_visitors_OctInfo *, __pyx_t_5numpy_int64_t *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *, int *);
2855   __pyx_t_5numpy_int64_t (*get_domain_offset)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, int);
2856   void (*visit_all_octs)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject *, struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *, struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_visit_all_octs *__pyx_optional_args);
2857   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *(*next_root)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, int, int *);
2858   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *(*next_child)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, int, int *, struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *);
2859   void (*append_domain)(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *, __pyx_t_5numpy_int64_t);
2860 };
2861 static struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer *__pyx_vtabptr_2yt_8geometry_13oct_container_OctreeContainer;
2862 
2863 
2864 /* "oct_container.pxd":85
2865  *     cdef public object fill_style
2866  *
2867  * cdef class SparseOctreeContainer(OctreeContainer):             # <<<<<<<<<<<<<<
2868  *     cdef OctKey *root_nodes
2869  *     cdef void *tree_root
2870  */
2871 
2872 struct __pyx_vtabstruct_2yt_8geometry_13oct_container_SparseOctreeContainer {
2873   struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer __pyx_base;
2874   void (*key_to_ipos)(struct __pyx_obj_2yt_8geometry_13oct_container_SparseOctreeContainer *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t *);
2875   __pyx_t_5numpy_int64_t (*ipos_to_key)(struct __pyx_obj_2yt_8geometry_13oct_container_SparseOctreeContainer *, int *);
2876 };
2877 static struct __pyx_vtabstruct_2yt_8geometry_13oct_container_SparseOctreeContainer *__pyx_vtabptr_2yt_8geometry_13oct_container_SparseOctreeContainer;
2878 
2879 
2880 /* "oct_container.pxd":93
2881  *     cdef np.int64_t ipos_to_key(self, int pos[3]) nogil
2882  *
2883  * cdef class RAMSESOctreeContainer(SparseOctreeContainer):             # <<<<<<<<<<<<<<
2884  *     pass
2885  *
2886  */
2887 
2888 struct __pyx_vtabstruct_2yt_8geometry_13oct_container_RAMSESOctreeContainer {
2889   struct __pyx_vtabstruct_2yt_8geometry_13oct_container_SparseOctreeContainer __pyx_base;
2890 };
2891 static struct __pyx_vtabstruct_2yt_8geometry_13oct_container_RAMSESOctreeContainer *__pyx_vtabptr_2yt_8geometry_13oct_container_RAMSESOctreeContainer;
2892 
2893 
2894 /* "yt/geometry/particle_deposit.pyx":35
2895  *     return arr2
2896  *
2897  * cdef class ParticleDepositOperation:             # <<<<<<<<<<<<<<
2898  *     def __init__(self, nvals, kernel_name):
2899  *         # nvals is a tuple containing the active dimensions of the
2900  */
2901 
2902 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation {
2903   int (*process)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t);
2904 };
2905 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
2906 
2907 
2908 /* "yt/geometry/particle_deposit.pyx":166
2909  *             raise NotImplementedError
2910  *
2911  * cdef class CountParticles(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2912  *     cdef np.int64_t[:,:,:,:] count
2913  *     def initialize(self):
2914  */
2915 
2916 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CountParticles {
2917   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2918 };
2919 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CountParticles *__pyx_vtabptr_2yt_8geometry_16particle_deposit_CountParticles;
2920 
2921 
2922 /* "yt/geometry/particle_deposit.pyx":198
2923  * deposit_count = CountParticles
2924  *
2925  * cdef class SimpleSmooth(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2926  *     # Note that this does nothing at the edges.  So it will give a poor
2927  *     # estimate there, and since Octrees are mostly edges, this will be a very
2928  */
2929 
2930 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_SimpleSmooth {
2931   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2932 };
2933 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_vtabptr_2yt_8geometry_16particle_deposit_SimpleSmooth;
2934 
2935 
2936 /* "yt/geometry/particle_deposit.pyx":266
2937  * deposit_simple_smooth = SimpleSmooth
2938  *
2939  * cdef class SumParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2940  *     cdef np.float64_t[:,:,:,:] sum
2941  *     def initialize(self):
2942  */
2943 
2944 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_SumParticleField {
2945   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2946 };
2947 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_vtabptr_2yt_8geometry_16particle_deposit_SumParticleField;
2948 
2949 
2950 /* "yt/geometry/particle_deposit.pyx":296
2951  * deposit_sum = SumParticleField
2952  *
2953  * cdef class StdParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2954  *     # Thanks to Britton and MJ Turk for the link
2955  *     # to a single-pass STD
2956  */
2957 
2958 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_StdParticleField {
2959   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2960 };
2961 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_vtabptr_2yt_8geometry_16particle_deposit_StdParticleField;
2962 
2963 
2964 /* "yt/geometry/particle_deposit.pyx":354
2965  * deposit_std = StdParticleField
2966  *
2967  * cdef class CICDeposit(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2968  *     cdef np.float64_t[:,:,:,:] field
2969  *     cdef public object ofield
2970  */
2971 
2972 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CICDeposit {
2973   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2974 };
2975 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_vtabptr_2yt_8geometry_16particle_deposit_CICDeposit;
2976 
2977 
2978 /* "yt/geometry/particle_deposit.pyx":410
2979  * deposit_cic = CICDeposit
2980  *
2981  * cdef class WeightedMeanParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2982  *     # Deposit both mass * field and mass into two scalars
2983  *     # then in finalize divide mass * field / mass
2984  */
2985 
2986 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_WeightedMeanParticleField {
2987   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
2988 };
2989 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_vtabptr_2yt_8geometry_16particle_deposit_WeightedMeanParticleField;
2990 
2991 
2992 /* "yt/geometry/particle_deposit.pyx":449
2993  * deposit_weighted_mean = WeightedMeanParticleField
2994  *
2995  * cdef class MeshIdentifier(ParticleDepositOperation):             # <<<<<<<<<<<<<<
2996  *     # This is a tricky one!  What it does is put into the particle array the
2997  *     # value of the oct or block (grids will always be zero) identifier that a
2998  */
2999 
3000 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_MeshIdentifier {
3001   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
3002 };
3003 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_vtabptr_2yt_8geometry_16particle_deposit_MeshIdentifier;
3004 
3005 
3006 /* "yt/geometry/particle_deposit.pyx":474
3007  * deposit_mesh_id = MeshIdentifier
3008  *
3009  * cdef class CellIdentifier(ParticleDepositOperation):             # <<<<<<<<<<<<<<
3010  *     cdef np.int64_t[:] indexes, cell_index
3011  *     # This method stores the offset of the grid containing each particle
3012  */
3013 
3014 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CellIdentifier {
3015   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
3016 };
3017 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_vtabptr_2yt_8geometry_16particle_deposit_CellIdentifier;
3018 
3019 
3020 /* "yt/geometry/particle_deposit.pyx":510
3021  * deposit_cell_id = CellIdentifier
3022  *
3023  * cdef class NNParticleField(ParticleDepositOperation):             # <<<<<<<<<<<<<<
3024  *     cdef np.float64_t[:,:,:,:] nnfield
3025  *     cdef np.float64_t[:,:,:,:] distfield
3026  */
3027 
3028 struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_NNParticleField {
3029   struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_base;
3030 };
3031 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_vtabptr_2yt_8geometry_16particle_deposit_NNParticleField;
3032 
3033 
3034 /* "View.MemoryView":105
3035  *
3036  * @cname("__pyx_array")
3037  * cdef class array:             # <<<<<<<<<<<<<<
3038  *
3039  *     cdef:
3040  */
3041 
3042 struct __pyx_vtabstruct_array {
3043   PyObject *(*get_memview)(struct __pyx_array_obj *);
3044 };
3045 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
3046 
3047 
3048 /* "View.MemoryView":961
3049  *
3050  * @cname('__pyx_memoryviewslice')
3051  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
3052  *     "Internal class for passing memoryview slices to Python"
3053  *
3054  */
3055 
3056 struct __pyx_vtabstruct__memoryviewslice {
3057   struct __pyx_vtabstruct_memoryview __pyx_base;
3058 };
3059 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
3060 
3061 /* --- Runtime support code (head) --- */
3062 /* Refnanny.proto */
3063 #ifndef CYTHON_REFNANNY
3064   #define CYTHON_REFNANNY 0
3065 #endif
3066 #if CYTHON_REFNANNY
3067   typedef struct {
3068     void (*INCREF)(void*, PyObject*, int);
3069     void (*DECREF)(void*, PyObject*, int);
3070     void (*GOTREF)(void*, PyObject*, int);
3071     void (*GIVEREF)(void*, PyObject*, int);
3072     void* (*SetupContext)(const char*, int, const char*);
3073     void (*FinishContext)(void**);
3074   } __Pyx_RefNannyAPIStruct;
3075   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
3076   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
3077   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
3078 #ifdef WITH_THREAD
3079   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
3080           if (acquire_gil) {\
3081               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
3082               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
3083               PyGILState_Release(__pyx_gilstate_save);\
3084           } else {\
3085               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
3086           }
3087 #else
3088   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
3089           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
3090 #endif
3091   #define __Pyx_RefNannyFinishContext()\
3092           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
3093   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
3094   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
3095   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
3096   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
3097   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
3098   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
3099   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
3100   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
3101 #else
3102   #define __Pyx_RefNannyDeclarations
3103   #define __Pyx_RefNannySetupContext(name, acquire_gil)
3104   #define __Pyx_RefNannyFinishContext()
3105   #define __Pyx_INCREF(r) Py_INCREF(r)
3106   #define __Pyx_DECREF(r) Py_DECREF(r)
3107   #define __Pyx_GOTREF(r)
3108   #define __Pyx_GIVEREF(r)
3109   #define __Pyx_XINCREF(r) Py_XINCREF(r)
3110   #define __Pyx_XDECREF(r) Py_XDECREF(r)
3111   #define __Pyx_XGOTREF(r)
3112   #define __Pyx_XGIVEREF(r)
3113 #endif
3114 #define __Pyx_XDECREF_SET(r, v) do {\
3115         PyObject *tmp = (PyObject *) r;\
3116         r = v; __Pyx_XDECREF(tmp);\
3117     } while (0)
3118 #define __Pyx_DECREF_SET(r, v) do {\
3119         PyObject *tmp = (PyObject *) r;\
3120         r = v; __Pyx_DECREF(tmp);\
3121     } while (0)
3122 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
3123 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
3124 
3125 /* PyObjectGetAttrStr.proto */
3126 #if CYTHON_USE_TYPE_SLOTS
3127 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
3128 #else
3129 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
3130 #endif
3131 
3132 /* GetBuiltinName.proto */
3133 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
3134 
3135 /* PyFunctionFastCall.proto */
3136 #if CYTHON_FAST_PYCALL
3137 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
3138     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
3139 #if 1 || PY_VERSION_HEX < 0x030600B1
3140 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
3141 #else
3142 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
3143 #endif
3144 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
3145     (sizeof(char [1 - 2*!(cond)]) - 1)
3146 #ifndef Py_MEMBER_SIZE
3147 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
3148 #endif
3149   static size_t __pyx_pyframe_localsplus_offset = 0;
3150   #include "frameobject.h"
3151   #define __Pxy_PyFrame_Initialize_Offsets()\
3152     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
3153      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
3154   #define __Pyx_PyFrame_GetLocalsplus(frame)\
3155     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
3156 #endif
3157 
3158 /* PyObjectCall.proto */
3159 #if CYTHON_COMPILING_IN_CPYTHON
3160 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
3161 #else
3162 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
3163 #endif
3164 
3165 /* PyObjectCallMethO.proto */
3166 #if CYTHON_COMPILING_IN_CPYTHON
3167 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
3168 #endif
3169 
3170 /* PyObjectCallNoArg.proto */
3171 #if CYTHON_COMPILING_IN_CPYTHON
3172 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
3173 #else
3174 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
3175 #endif
3176 
3177 /* PyCFunctionFastCall.proto */
3178 #if CYTHON_FAST_PYCCALL
3179 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
3180 #else
3181 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
3182 #endif
3183 
3184 /* PyObjectCallOneArg.proto */
3185 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
3186 
3187 /* PyObjectSetAttrStr.proto */
3188 #if CYTHON_USE_TYPE_SLOTS
3189 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
3190 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
3191 #else
3192 #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
3193 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
3194 #endif
3195 
3196 /* RaiseArgTupleInvalid.proto */
3197 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
3198     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
3199 
3200 /* RaiseDoubleKeywords.proto */
3201 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
3202 
3203 /* ParseKeywords.proto */
3204 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
3205     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
3206     const char* function_name);
3207 
3208 /* KeywordStringCheck.proto */
3209 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
3210 
3211 /* PyThreadStateGet.proto */
3212 #if CYTHON_FAST_THREAD_STATE
3213 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
3214 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
3215 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
3216 #else
3217 #define __Pyx_PyThreadState_declare
3218 #define __Pyx_PyThreadState_assign
3219 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
3220 #endif
3221 
3222 /* PyErrFetchRestore.proto */
3223 #if CYTHON_FAST_THREAD_STATE
3224 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
3225 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
3226 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
3227 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
3228 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
3229 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
3230 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3231 #if CYTHON_COMPILING_IN_CPYTHON
3232 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
3233 #else
3234 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
3235 #endif
3236 #else
3237 #define __Pyx_PyErr_Clear() PyErr_Clear()
3238 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
3239 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
3240 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
3241 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
3242 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
3243 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
3244 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
3245 #endif
3246 
3247 /* RaiseException.proto */
3248 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
3249 
3250 /* ArgTypeTest.proto */
3251 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
3252     ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
3253         __Pyx__ArgTypeTest(obj, type, name, exact))
3254 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
3255 
3256 /* IsLittleEndian.proto */
3257 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
3258 
3259 /* BufferFormatCheck.proto */
3260 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
3261 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
3262                               __Pyx_BufFmt_StackElem* stack,
3263                               __Pyx_TypeInfo* type);
3264 
3265 /* BufferGetAndValidate.proto */
3266 #define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
3267     ((obj == Py_None || obj == NULL) ?\
3268     (__Pyx_ZeroBuffer(buf), 0) :\
3269     __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
3270 static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
3271     __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
3272 static void __Pyx_ZeroBuffer(Py_buffer* buf);
3273 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
3274 static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
3275 static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
3276 
3277 /* PyDictVersioning.proto */
3278 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
3279 #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
3280 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
3281 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
3282     (version_var) = __PYX_GET_DICT_VERSION(dict);\
3283     (cache_var) = (value);
3284 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
3285     static PY_UINT64_T __pyx_dict_version = 0;\
3286     static PyObject *__pyx_dict_cached_value = NULL;\
3287     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
3288         (VAR) = __pyx_dict_cached_value;\
3289     } else {\
3290         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
3291         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
3292     }\
3293 }
3294 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
3295 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
3296 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
3297 #else
3298 #define __PYX_GET_DICT_VERSION(dict)  (0)
3299 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
3300 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
3301 #endif
3302 
3303 /* GetModuleGlobalName.proto */
3304 #if CYTHON_USE_DICT_VERSIONS
3305 #define __Pyx_GetModuleGlobalName(var, name)  {\
3306     static PY_UINT64_T __pyx_dict_version = 0;\
3307     static PyObject *__pyx_dict_cached_value = NULL;\
3308     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
3309         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
3310         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
3311 }
3312 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
3313     PY_UINT64_T __pyx_dict_version;\
3314     PyObject *__pyx_dict_cached_value;\
3315     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
3316 }
3317 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
3318 #else
3319 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
3320 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
3321 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
3322 #endif
3323 
3324 /* PyObjectCall2Args.proto */
3325 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
3326 
3327 /* ExtTypeTest.proto */
3328 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
3329 
3330 /* None.proto */
3331 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
3332 
3333 #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
3334 #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
3335 /* MemviewSliceInit.proto */
3336 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
3337 #define __Pyx_MEMVIEW_DIRECT   1
3338 #define __Pyx_MEMVIEW_PTR      2
3339 #define __Pyx_MEMVIEW_FULL     4
3340 #define __Pyx_MEMVIEW_CONTIG   8
3341 #define __Pyx_MEMVIEW_STRIDED  16
3342 #define __Pyx_MEMVIEW_FOLLOW   32
3343 #define __Pyx_IS_C_CONTIG 1
3344 #define __Pyx_IS_F_CONTIG 2
3345 static int __Pyx_init_memviewslice(
3346                 struct __pyx_memoryview_obj *memview,
3347                 int ndim,
3348                 __Pyx_memviewslice *memviewslice,
3349                 int memview_is_new_reference);
3350 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
3351     __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
3352 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
3353     __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
3354 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
3355 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
3356 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
3357 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
3358 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
3359 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
3360 
3361 /* PyErrExceptionMatches.proto */
3362 #if CYTHON_FAST_THREAD_STATE
3363 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
3364 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
3365 #else
3366 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
3367 #endif
3368 
3369 /* GetAttr.proto */
3370 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
3371 
3372 /* GetAttr3.proto */
3373 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
3374 
3375 /* GetItemInt.proto */
3376 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3377     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3378     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
3379     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
3380                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
3381 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3382     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3383     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
3384     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
3385 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
3386                                                               int wraparound, int boundscheck);
3387 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
3388     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
3389     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
3390     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
3391 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
3392                                                               int wraparound, int boundscheck);
3393 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
3394 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
3395                                                      int is_list, int wraparound, int boundscheck);
3396 
3397 /* PyFloatBinop.proto */
3398 #if !CYTHON_COMPILING_IN_PYPY
3399 static PyObject* __Pyx_PyFloat_EqObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
3400 #else
3401 #define __Pyx_PyFloat_EqObjC(op1, op2, floatval, inplace, zerodivision_check)\
3402     (PyObject_RichCompare(op1, op2, Py_EQ))
3403     #endif
3404 
3405 /* None.proto */
3406 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
3407 
3408 /* SliceObject.proto */
3409 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
3410         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
3411         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
3412         int has_cstart, int has_cstop, int wraparound);
3413 
3414 /* Import.proto */
3415 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
3416 
3417 /* ImportFrom.proto */
3418 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
3419 
3420 /* PyObjectLookupSpecial.proto */
3421 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_LookupSpecial(PyObject * obj,PyObject * attr_name)3422 static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
3423     PyObject *res;
3424     PyTypeObject *tp = Py_TYPE(obj);
3425 #if PY_MAJOR_VERSION < 3
3426     if (unlikely(PyInstance_Check(obj)))
3427         return __Pyx_PyObject_GetAttrStr(obj, attr_name);
3428 #endif
3429     res = _PyType_Lookup(tp, attr_name);
3430     if (likely(res)) {
3431         descrgetfunc f = Py_TYPE(res)->tp_descr_get;
3432         if (!f) {
3433             Py_INCREF(res);
3434         } else {
3435             res = f(res, obj, (PyObject *)tp);
3436         }
3437     } else {
3438         PyErr_SetObject(PyExc_AttributeError, attr_name);
3439     }
3440     return res;
3441 }
3442 #else
3443 #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
3444 #endif
3445 
3446 /* GetTopmostException.proto */
3447 #if CYTHON_USE_EXC_INFO_STACK
3448 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
3449 #endif
3450 
3451 /* SaveResetException.proto */
3452 #if CYTHON_FAST_THREAD_STATE
3453 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
3454 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3455 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
3456 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
3457 #else
3458 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
3459 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
3460 #endif
3461 
3462 /* GetException.proto */
3463 #if CYTHON_FAST_THREAD_STATE
3464 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
3465 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3466 #else
3467 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
3468 #endif
3469 
3470 /* PyIntBinop.proto */
3471 #if !CYTHON_COMPILING_IN_PYPY
3472 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
3473 #else
3474 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
3475     (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
3476 #endif
3477 
3478 /* DictGetItem.proto */
3479 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
3480 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
3481 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
3482     (likely(PyDict_CheckExact(obj)) ?\
3483      __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
3484 #else
3485 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
3486 #define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
3487 #endif
3488 
3489 /* RaiseTooManyValuesToUnpack.proto */
3490 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
3491 
3492 /* RaiseNeedMoreValuesToUnpack.proto */
3493 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
3494 
3495 /* RaiseNoneIterError.proto */
3496 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
3497 
3498 /* HasAttr.proto */
3499 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
3500 
3501 /* IncludeStringH.proto */
3502 #include <string.h>
3503 
3504 /* BytesEquals.proto */
3505 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
3506 
3507 /* UnicodeEquals.proto */
3508 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
3509 
3510 /* StrEquals.proto */
3511 #if PY_MAJOR_VERSION >= 3
3512 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
3513 #else
3514 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
3515 #endif
3516 
3517 /* BufferIndexError.proto */
3518 static void __Pyx_RaiseBufferIndexError(int axis);
3519 
3520 /* WriteUnraisableException.proto */
3521 static void __Pyx_WriteUnraisable(const char *name, int clineno,
3522                                   int lineno, const char *filename,
3523                                   int full_traceback, int nogil);
3524 
3525 /* None.proto */
3526 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
3527 
3528 /* UnaryNegOverflows.proto */
3529 #define UNARY_NEG_WOULD_OVERFLOW(x)\
3530         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
3531 
3532 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
3533 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
3534 /* ObjectGetItem.proto */
3535 #if CYTHON_USE_TYPE_SLOTS
3536 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
3537 #else
3538 #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
3539 #endif
3540 
3541 /* decode_c_string_utf16.proto */
__Pyx_PyUnicode_DecodeUTF16(const char * s,Py_ssize_t size,const char * errors)3542 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
3543     int byteorder = 0;
3544     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
3545 }
__Pyx_PyUnicode_DecodeUTF16LE(const char * s,Py_ssize_t size,const char * errors)3546 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
3547     int byteorder = -1;
3548     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
3549 }
__Pyx_PyUnicode_DecodeUTF16BE(const char * s,Py_ssize_t size,const char * errors)3550 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
3551     int byteorder = 1;
3552     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
3553 }
3554 
3555 /* decode_c_string.proto */
3556 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
3557          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
3558          const char* encoding, const char* errors,
3559          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
3560 
3561 /* SwapException.proto */
3562 #if CYTHON_FAST_THREAD_STATE
3563 #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
3564 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3565 #else
3566 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
3567 #endif
3568 
3569 /* FastTypeChecks.proto */
3570 #if CYTHON_COMPILING_IN_CPYTHON
3571 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
3572 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
3573 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
3574 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
3575 #else
3576 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
3577 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
3578 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
3579 #endif
3580 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
3581 
3582 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
3583 /* ListCompAppend.proto */
3584 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_ListComp_Append(PyObject * list,PyObject * x)3585 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
3586     PyListObject* L = (PyListObject*) list;
3587     Py_ssize_t len = Py_SIZE(list);
3588     if (likely(L->allocated > len)) {
3589         Py_INCREF(x);
3590         PyList_SET_ITEM(list, len, x);
3591         Py_SIZE(list) = len+1;
3592         return 0;
3593     }
3594     return PyList_Append(list, x);
3595 }
3596 #else
3597 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
3598 #endif
3599 
3600 /* PyIntBinop.proto */
3601 #if !CYTHON_COMPILING_IN_PYPY
3602 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
3603 #else
3604 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
3605     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
3606 #endif
3607 
3608 /* ListExtend.proto */
__Pyx_PyList_Extend(PyObject * L,PyObject * v)3609 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
3610 #if CYTHON_COMPILING_IN_CPYTHON
3611     PyObject* none = _PyList_Extend((PyListObject*)L, v);
3612     if (unlikely(!none))
3613         return -1;
3614     Py_DECREF(none);
3615     return 0;
3616 #else
3617     return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
3618 #endif
3619 }
3620 
3621 /* ListAppend.proto */
3622 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_PyList_Append(PyObject * list,PyObject * x)3623 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
3624     PyListObject* L = (PyListObject*) list;
3625     Py_ssize_t len = Py_SIZE(list);
3626     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
3627         Py_INCREF(x);
3628         PyList_SET_ITEM(list, len, x);
3629         Py_SIZE(list) = len+1;
3630         return 0;
3631     }
3632     return PyList_Append(list, x);
3633 }
3634 #else
3635 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
3636 #endif
3637 
3638 /* None.proto */
3639 static CYTHON_INLINE long __Pyx_div_long(long, long);
3640 
3641 /* PyObject_GenericGetAttrNoDict.proto */
3642 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
3643 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
3644 #else
3645 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
3646 #endif
3647 
3648 /* PyObject_GenericGetAttr.proto */
3649 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
3650 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
3651 #else
3652 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
3653 #endif
3654 
3655 /* SetVTable.proto */
3656 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
3657 
3658 /* SetupReduce.proto */
3659 static int __Pyx_setup_reduce(PyObject* type_obj);
3660 
3661 /* TypeImport.proto */
3662 #ifndef __PYX_HAVE_RT_ImportType_proto
3663 #define __PYX_HAVE_RT_ImportType_proto
3664 enum __Pyx_ImportType_CheckSize {
3665    __Pyx_ImportType_CheckSize_Error = 0,
3666    __Pyx_ImportType_CheckSize_Warn = 1,
3667    __Pyx_ImportType_CheckSize_Ignore = 2
3668 };
3669 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
3670 #endif
3671 
3672 /* GetVTable.proto */
3673 static void* __Pyx_GetVtable(PyObject *dict);
3674 
3675 /* CLineInTraceback.proto */
3676 #ifdef CYTHON_CLINE_IN_TRACEBACK
3677 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
3678 #else
3679 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
3680 #endif
3681 
3682 /* CodeObjectCache.proto */
3683 typedef struct {
3684     PyCodeObject* code_object;
3685     int code_line;
3686 } __Pyx_CodeObjectCacheEntry;
3687 struct __Pyx_CodeObjectCache {
3688     int count;
3689     int max_count;
3690     __Pyx_CodeObjectCacheEntry* entries;
3691 };
3692 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
3693 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
3694 static PyCodeObject *__pyx_find_code_object(int code_line);
3695 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
3696 
3697 /* AddTraceback.proto */
3698 static void __Pyx_AddTraceback(const char *funcname, int c_line,
3699                                int py_line, const char *filename);
3700 
3701 #if PY_MAJOR_VERSION < 3
3702     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
3703     static void __Pyx_ReleaseBuffer(Py_buffer *view);
3704 #else
3705     #define __Pyx_GetBuffer PyObject_GetBuffer
3706     #define __Pyx_ReleaseBuffer PyBuffer_Release
3707 #endif
3708 
3709 
3710 /* BufferStructDeclare.proto */
3711 typedef struct {
3712   Py_ssize_t shape, strides, suboffsets;
3713 } __Pyx_Buf_DimInfo;
3714 typedef struct {
3715   size_t refcount;
3716   Py_buffer pybuffer;
3717 } __Pyx_Buffer;
3718 typedef struct {
3719   __Pyx_Buffer *rcbuffer;
3720   char *data;
3721   __Pyx_Buf_DimInfo diminfo[8];
3722 } __Pyx_LocalBuf_ND;
3723 
3724 /* MemviewSliceIsContig.proto */
3725 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
3726 
3727 /* OverlappingSlices.proto */
3728 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
3729                                 __Pyx_memviewslice *slice2,
3730                                 int ndim, size_t itemsize);
3731 
3732 /* Capsule.proto */
3733 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
3734 
3735 /* CIntToPy.proto */
3736 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
3737 
3738 /* CIntToPy.proto */
3739 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value);
3740 
3741 /* CIntToPy.proto */
3742 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value);
3743 
3744 /* MemviewDtypeToObject.proto */
3745 static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int64_t(const char *itemp);
3746 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int64_t(const char *itemp, PyObject *obj);
3747 
3748 /* MemviewDtypeToObject.proto */
3749 static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_float64_t(const char *itemp);
3750 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_float64_t(const char *itemp, PyObject *obj);
3751 
3752 /* RealImag.proto */
3753 #if CYTHON_CCOMPLEX
3754   #ifdef __cplusplus
3755     #define __Pyx_CREAL(z) ((z).real())
3756     #define __Pyx_CIMAG(z) ((z).imag())
3757   #else
3758     #define __Pyx_CREAL(z) (__real__(z))
3759     #define __Pyx_CIMAG(z) (__imag__(z))
3760   #endif
3761 #else
3762     #define __Pyx_CREAL(z) ((z).real)
3763     #define __Pyx_CIMAG(z) ((z).imag)
3764 #endif
3765 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
3766         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
3767     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
3768     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
3769 #else
3770     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
3771     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
3772 #endif
3773 
3774 /* Arithmetic.proto */
3775 #if CYTHON_CCOMPLEX
3776     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
3777     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
3778     #define __Pyx_c_diff_float(a, b) ((a)-(b))
3779     #define __Pyx_c_prod_float(a, b) ((a)*(b))
3780     #define __Pyx_c_quot_float(a, b) ((a)/(b))
3781     #define __Pyx_c_neg_float(a)     (-(a))
3782   #ifdef __cplusplus
3783     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
3784     #define __Pyx_c_conj_float(z)    (::std::conj(z))
3785     #if 1
3786         #define __Pyx_c_abs_float(z)     (::std::abs(z))
3787         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
3788     #endif
3789   #else
3790     #define __Pyx_c_is_zero_float(z) ((z)==0)
3791     #define __Pyx_c_conj_float(z)    (conjf(z))
3792     #if 1
3793         #define __Pyx_c_abs_float(z)     (cabsf(z))
3794         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
3795     #endif
3796  #endif
3797 #else
3798     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
3799     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
3800     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
3801     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
3802     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
3803     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
3804     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
3805     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
3806     #if 1
3807         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
3808         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
3809     #endif
3810 #endif
3811 
3812 /* Arithmetic.proto */
3813 #if CYTHON_CCOMPLEX
3814     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
3815     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
3816     #define __Pyx_c_diff_double(a, b) ((a)-(b))
3817     #define __Pyx_c_prod_double(a, b) ((a)*(b))
3818     #define __Pyx_c_quot_double(a, b) ((a)/(b))
3819     #define __Pyx_c_neg_double(a)     (-(a))
3820   #ifdef __cplusplus
3821     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
3822     #define __Pyx_c_conj_double(z)    (::std::conj(z))
3823     #if 1
3824         #define __Pyx_c_abs_double(z)     (::std::abs(z))
3825         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
3826     #endif
3827   #else
3828     #define __Pyx_c_is_zero_double(z) ((z)==0)
3829     #define __Pyx_c_conj_double(z)    (conj(z))
3830     #if 1
3831         #define __Pyx_c_abs_double(z)     (cabs(z))
3832         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
3833     #endif
3834  #endif
3835 #else
3836     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
3837     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
3838     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
3839     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
3840     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
3841     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
3842     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
3843     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
3844     #if 1
3845         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
3846         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
3847     #endif
3848 #endif
3849 
3850 /* CIntToPy.proto */
3851 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
3852 
3853 /* MemviewSliceCopyTemplate.proto */
3854 static __Pyx_memviewslice
3855 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
3856                                  const char *mode, int ndim,
3857                                  size_t sizeof_dtype, int contig_flag,
3858                                  int dtype_is_object);
3859 
3860 /* CIntFromPy.proto */
3861 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
3862 
3863 /* CIntFromPy.proto */
3864 static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);
3865 
3866 /* CIntFromPy.proto */
3867 static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *);
3868 
3869 /* CIntFromPy.proto */
3870 static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *);
3871 
3872 /* CIntFromPy.proto */
3873 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
3874 
3875 /* CIntToPy.proto */
3876 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
3877 
3878 /* CIntFromPy.proto */
3879 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
3880 
3881 /* TypeInfoCompare.proto */
3882 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
3883 
3884 /* MemviewSliceValidateAndInit.proto */
3885 static int __Pyx_ValidateAndInit_memviewslice(
3886                 int *axes_specs,
3887                 int c_or_f_flag,
3888                 int buf_flags,
3889                 int ndim,
3890                 __Pyx_TypeInfo *dtype,
3891                 __Pyx_BufFmt_StackElem stack[],
3892                 __Pyx_memviewslice *memviewslice,
3893                 PyObject *original_obj);
3894 
3895 /* ObjectToMemviewSlice.proto */
3896 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_psdc_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3897 
3898 /* ObjectToMemviewSlice.proto */
3899 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3900 
3901 /* ObjectToMemviewSlice.proto */
3902 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_int64_t(PyObject *, int writable_flag);
3903 
3904 /* ObjectToMemviewSlice.proto */
3905 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3906 
3907 /* FetchCommonType.proto */
3908 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
3909 
3910 /* PyObjectGetMethod.proto */
3911 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
3912 
3913 /* PyObjectCallMethod1.proto */
3914 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
3915 
3916 /* CoroutineBase.proto */
3917 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
3918 #if CYTHON_USE_EXC_INFO_STACK
3919 #define __Pyx_ExcInfoStruct  _PyErr_StackItem
3920 #else
3921 typedef struct {
3922     PyObject *exc_type;
3923     PyObject *exc_value;
3924     PyObject *exc_traceback;
3925 } __Pyx_ExcInfoStruct;
3926 #endif
3927 typedef struct {
3928     PyObject_HEAD
3929     __pyx_coroutine_body_t body;
3930     PyObject *closure;
3931     __Pyx_ExcInfoStruct gi_exc_state;
3932     PyObject *gi_weakreflist;
3933     PyObject *classobj;
3934     PyObject *yieldfrom;
3935     PyObject *gi_name;
3936     PyObject *gi_qualname;
3937     PyObject *gi_modulename;
3938     PyObject *gi_code;
3939     int resume_label;
3940     char is_running;
3941 } __pyx_CoroutineObject;
3942 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
3943     PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
3944     PyObject *name, PyObject *qualname, PyObject *module_name);
3945 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
3946             __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
3947             PyObject *name, PyObject *qualname, PyObject *module_name);
3948 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
3949 static int __Pyx_Coroutine_clear(PyObject *self);
3950 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
3951 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
3952 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
3953 #if CYTHON_USE_EXC_INFO_STACK
3954 #define __Pyx_Coroutine_SwapException(self)
3955 #define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
3956 #else
3957 #define __Pyx_Coroutine_SwapException(self) {\
3958     __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
3959     __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
3960     }
3961 #define __Pyx_Coroutine_ResetAndClearException(self) {\
3962     __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
3963     (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
3964     }
3965 #endif
3966 #if CYTHON_FAST_THREAD_STATE
3967 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
3968     __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
3969 #else
3970 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
3971     __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
3972 #endif
3973 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
3974 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
3975 
3976 /* PatchModuleWithCoroutine.proto */
3977 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
3978 
3979 /* PatchGeneratorABC.proto */
3980 static int __Pyx_patch_abc(void);
3981 
3982 /* Generator.proto */
3983 #define __Pyx_Generator_USED
3984 static PyTypeObject *__pyx_GeneratorType = 0;
3985 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
3986 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
3987     __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
3988 static PyObject *__Pyx_Generator_Next(PyObject *self);
3989 static int __pyx_Generator_init(void);
3990 
3991 /* ObjectToMemviewSlice.proto */
3992 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(PyObject *, int writable_flag);
3993 
3994 /* CheckBinaryVersion.proto */
3995 static int __Pyx_check_binary_version(void);
3996 
3997 /* VoidPtrImport.proto */
3998 static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig);
3999 
4000 /* FunctionImport.proto */
4001 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
4002 
4003 /* InitStrings.proto */
4004 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
4005 
4006 static int __pyx_f_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_process(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_left_edge, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_dds, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_offset, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_ppos, CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4007 static int __pyx_f_2yt_8geometry_16particle_deposit_14CountParticles_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4008 static int __pyx_f_2yt_8geometry_16particle_deposit_12SimpleSmooth_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self, int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4009 static int __pyx_f_2yt_8geometry_16particle_deposit_16SumParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4010 static int __pyx_f_2yt_8geometry_16particle_deposit_16StdParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4011 static int __pyx_f_2yt_8geometry_16particle_deposit_10CICDeposit_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self, int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4012 static int __pyx_f_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4013 static int __pyx_f_2yt_8geometry_16particle_deposit_14MeshIdentifier_process(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_left_edge, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_dds, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_offset, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4014 static int __pyx_f_2yt_8geometry_16particle_deposit_14CellIdentifier_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4015 static int __pyx_f_2yt_8geometry_16particle_deposit_15NNParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self, int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind); /* proto*/
4016 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_oind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *__pyx_v_self); /* proto*/
4017 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *__pyx_v_self); /* proto*/
4018 static CYTHON_INLINE __pyx_t_5numpy_uint8_t __pyx_f_2yt_8geometry_12oct_visitors_20BaseNeighbourVisitor_neighbour_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor *__pyx_v_self); /* proto*/
4019 static CYTHON_INLINE struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer *__pyx_f_2yt_8geometry_13oct_container_13OctObjectPool_get_cont(struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool *__pyx_v_self, int __pyx_v_i); /* proto*/
4020 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
4021 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
4022 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
4023 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
4024 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*/
4025 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
4026 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
4027 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
4028 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
4029 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
4030 
4031 /* Module declarations from 'cpython.buffer' */
4032 
4033 /* Module declarations from 'libc.string' */
4034 
4035 /* Module declarations from 'libc.stdio' */
4036 
4037 /* Module declarations from '__builtin__' */
4038 
4039 /* Module declarations from 'cpython.type' */
4040 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
4041 
4042 /* Module declarations from 'cpython' */
4043 
4044 /* Module declarations from 'cpython.object' */
4045 
4046 /* Module declarations from 'cpython.ref' */
4047 
4048 /* Module declarations from 'cpython.mem' */
4049 
4050 /* Module declarations from 'numpy' */
4051 
4052 /* Module declarations from 'numpy' */
4053 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
4054 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
4055 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
4056 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
4057 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
4058 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
4059 
4060 /* Module declarations from 'cython.view' */
4061 
4062 /* Module declarations from 'cython' */
4063 
4064 /* Module declarations from 'libc.math' */
4065 
4066 /* Module declarations from 'libc.stdlib' */
4067 
4068 /* Module declarations from 'numpy.math' */
4069 
4070 /* Module declarations from 'yt.utilities.lib.fp_utils' */
4071 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fmax(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
4072 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fmin(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
4073 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_iclip(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/
4074 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fclip(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
4075 static CYTHON_INLINE PyObject *__pyx_f_2yt_9utilities_3lib_8fp_utils__ensure_code(PyObject *); /*proto*/
4076 
4077 /* Module declarations from 'yt.geometry.oct_visitors' */
4078 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_OctVisitor = 0;
4079 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalOcts = 0;
4080 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalCells = 0;
4081 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_MarkOcts = 0;
4082 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_MaskOcts = 0;
4083 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_IndexOcts = 0;
4084 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_MaskedIndexOcts = 0;
4085 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_IndexMaskMapOcts = 0;
4086 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_ICoordsOcts = 0;
4087 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_IResOcts = 0;
4088 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_FCoordsOcts = 0;
4089 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_FWidthOcts = 0;
4090 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayI64 = 0;
4091 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayF64 = 0;
4092 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8 = 0;
4093 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_IdentifyOcts = 0;
4094 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_AssignDomainInd = 0;
4095 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesO = 0;
4096 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesR = 0;
4097 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_CountByDomain = 0;
4098 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_StoreOctree = 0;
4099 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_LoadOctree = 0;
4100 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_MortonIndexOcts = 0;
4101 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_StoreIndex = 0;
4102 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor = 0;
4103 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor = 0;
4104 static PyTypeObject *__pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellVisitor = 0;
4105 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_cind(int, int, int); /*proto*/
4106 
4107 /* Module declarations from 'yt.geometry.grid_visitors' */
4108 static __pyx_t_5numpy_uint8_t (*__pyx_f_2yt_8geometry_13grid_visitors_check_child_masked)(struct __pyx_t_2yt_8geometry_13grid_visitors_GridVisitorData *); /*proto*/
4109 
4110 /* Module declarations from 'libc.float' */
4111 
4112 /* Module declarations from 'yt.utilities.lib.geometry_utils' */
4113 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_int64_t *); /*proto*/
4114 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_msdb(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/
4115 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_xor_msb(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
4116 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_t_5numpy_uint64_t); /*proto*/
4117 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2(__pyx_t_5numpy_uint64_t); /*proto*/
4118 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t); /*proto*/
4119 static CYTHON_INLINE void __pyx_f_2yt_9utilities_3lib_14geometry_utils_decode_morton_64bit(__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t *); /*proto*/
4120 
4121 /* Module declarations from 'yt.geometry.selection_routines' */
4122 static PyTypeObject *__pyx_ptype_2yt_8geometry_18selection_routines_SelectorObject = 0;
4123 static PyTypeObject *__pyx_ptype_2yt_8geometry_18selection_routines_AlwaysSelector = 0;
4124 static PyTypeObject *__pyx_ptype_2yt_8geometry_18selection_routines_OctreeSubsetSelector = 0;
4125 static PyTypeObject *__pyx_ptype_2yt_8geometry_18selection_routines_BooleanSelector = 0;
4126 
4127 /* Module declarations from 'yt.utilities.lib.allocation_container' */
4128 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_20allocation_container_ObjectPool = 0;
4129 
4130 /* Module declarations from 'yt.geometry.oct_container' */
4131 static PyTypeObject *__pyx_ptype_2yt_8geometry_13oct_container_OctObjectPool = 0;
4132 static PyTypeObject *__pyx_ptype_2yt_8geometry_13oct_container_OctreeContainer = 0;
4133 static PyTypeObject *__pyx_ptype_2yt_8geometry_13oct_container_SparseOctreeContainer = 0;
4134 static PyTypeObject *__pyx_ptype_2yt_8geometry_13oct_container_RAMSESOctreeContainer = 0;
4135 static int *__pyx_vp_2yt_8geometry_13oct_container_ORDER_MAX = 0;
4136 #define __pyx_v_2yt_8geometry_13oct_container_ORDER_MAX (*__pyx_vp_2yt_8geometry_13oct_container_ORDER_MAX)
4137 
4138 /* Module declarations from 'yt.geometry.particle_deposit' */
4139 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation = 0;
4140 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_CountParticles = 0;
4141 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_SimpleSmooth = 0;
4142 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_SumParticleField = 0;
4143 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_StdParticleField = 0;
4144 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_CICDeposit = 0;
4145 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_WeightedMeanParticleField = 0;
4146 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_MeshIdentifier = 0;
4147 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_CellIdentifier = 0;
4148 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit_NNParticleField = 0;
4149 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize = 0;
4150 static PyTypeObject *__pyx_ptype_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr = 0;
4151 static PyTypeObject *__pyx_array_type = 0;
4152 static PyTypeObject *__pyx_MemviewEnum_type = 0;
4153 static PyTypeObject *__pyx_memoryview_type = 0;
4154 static PyTypeObject *__pyx_memoryviewslice_type = 0;
4155 static PyObject *generic = 0;
4156 static PyObject *strided = 0;
4157 static PyObject *indirect = 0;
4158 static PyObject *contiguous = 0;
4159 static PyObject *indirect_contiguous = 0;
4160 static int __pyx_memoryview_thread_locks_used;
4161 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
4162 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_cubic(__pyx_t_5numpy_float64_t); /*proto*/
4163 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quartic(__pyx_t_5numpy_float64_t); /*proto*/
4164 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quintic(__pyx_t_5numpy_float64_t); /*proto*/
4165 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland2(__pyx_t_5numpy_float64_t); /*proto*/
4166 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland4(__pyx_t_5numpy_float64_t); /*proto*/
4167 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland6(__pyx_t_5numpy_float64_t); /*proto*/
4168 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_dummy(__pyx_t_5numpy_float64_t); /*proto*/
4169 static CYTHON_INLINE __pyx_t_2yt_8geometry_16particle_deposit_kernel_func __pyx_f_2yt_8geometry_16particle_deposit_get_kernel_func(PyObject *); /*proto*/
4170 static PyObject *__pyx_f_2yt_8geometry_16particle_deposit_append_axes(PyArrayObject *, int); /*proto*/
4171 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
4172 static void *__pyx_align_pointer(void *, size_t); /*proto*/
4173 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
4174 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
4175 static PyObject *_unellipsify(PyObject *, int); /*proto*/
4176 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
4177 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
4178 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*/
4179 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
4180 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
4181 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
4182 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
4183 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
4184 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
4185 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
4186 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
4187 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
4188 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
4189 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
4190 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
4191 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
4192 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
4193 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
4194 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
4195 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
4196 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
4197 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
4198 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
4199 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
4200 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
4201 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
4202 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
4203 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
4204 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int64_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 };
4205 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
4206 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };
4207 #define __Pyx_MODULE_NAME "yt.geometry.particle_deposit"
4208 extern int __pyx_module_is_main_yt__geometry__particle_deposit;
4209 int __pyx_module_is_main_yt__geometry__particle_deposit = 0;
4210 
4211 /* Implementation of 'yt.geometry.particle_deposit' */
4212 static PyObject *__pyx_builtin_NotImplementedError;
4213 static PyObject *__pyx_builtin_range;
4214 static PyObject *__pyx_builtin_TypeError;
4215 static PyObject *__pyx_builtin_ValueError;
4216 static PyObject *__pyx_builtin_RuntimeError;
4217 static PyObject *__pyx_builtin_ImportError;
4218 static PyObject *__pyx_builtin_MemoryError;
4219 static PyObject *__pyx_builtin_enumerate;
4220 static PyObject *__pyx_builtin_Ellipsis;
4221 static PyObject *__pyx_builtin_id;
4222 static PyObject *__pyx_builtin_IndexError;
4223 static const char __pyx_k_F[] = "F";
4224 static const char __pyx_k_O[] = "O";
4225 static const char __pyx_k_c[] = "c";
4226 static const char __pyx_k_id[] = "id";
4227 static const char __pyx_k_np[] = "np";
4228 static const char __pyx_k_dds[] = "dds";
4229 static const char __pyx_k_inf[] = "inf";
4230 static const char __pyx_k_new[] = "__new__";
4231 static const char __pyx_k_obj[] = "obj";
4232 static const char __pyx_k_args[] = "args";
4233 static const char __pyx_k_base[] = "base";
4234 static const char __pyx_k_dict[] = "__dict__";
4235 static const char __pyx_k_exit[] = "__exit__";
4236 static const char __pyx_k_gobj[] = "gobj";
4237 static const char __pyx_k_main[] = "__main__";
4238 static const char __pyx_k_mode[] = "mode";
4239 static const char __pyx_k_name[] = "name";
4240 static const char __pyx_k_ndim[] = "ndim";
4241 static const char __pyx_k_none[] = "none";
4242 static const char __pyx_k_pack[] = "pack";
4243 static const char __pyx_k_send[] = "send";
4244 static const char __pyx_k_size[] = "size";
4245 static const char __pyx_k_sqrt[] = "sqrt";
4246 static const char __pyx_k_step[] = "step";
4247 static const char __pyx_k_stop[] = "stop";
4248 static const char __pyx_k_test[] = "__test__";
4249 static const char __pyx_k_view[] = "view";
4250 static const char __pyx_k_ASCII[] = "ASCII";
4251 static const char __pyx_k_class[] = "__class__";
4252 static const char __pyx_k_close[] = "close";
4253 static const char __pyx_k_cubic[] = "cubic";
4254 static const char __pyx_k_dtype[] = "dtype";
4255 static const char __pyx_k_empty[] = "empty";
4256 static const char __pyx_k_enter[] = "__enter__";
4257 static const char __pyx_k_error[] = "error";
4258 static const char __pyx_k_flags[] = "flags";
4259 static const char __pyx_k_int32[] = "int32";
4260 static const char __pyx_k_int64[] = "int64";
4261 static const char __pyx_k_numpy[] = "numpy";
4262 static const char __pyx_k_nvals[] = "nvals";
4263 static const char __pyx_k_odata[] = "odata";
4264 static const char __pyx_k_order[] = "order";
4265 static const char __pyx_k_range[] = "range";
4266 static const char __pyx_k_shape[] = "shape";
4267 static const char __pyx_k_start[] = "start";
4268 static const char __pyx_k_throw[] = "throw";
4269 static const char __pyx_k_units[] = "units";
4270 static const char __pyx_k_zeros[] = "zeros";
4271 static const char __pyx_k_astype[] = "astype";
4272 static const char __pyx_k_divide[] = "divide";
4273 static const char __pyx_k_encode[] = "encode";
4274 static const char __pyx_k_fields[] = "fields";
4275 static const char __pyx_k_format[] = "format";
4276 static const char __pyx_k_ignore[] = "ignore";
4277 static const char __pyx_k_import[] = "__import__";
4278 static const char __pyx_k_lvlmax[] = "lvlmax";
4279 static const char __pyx_k_name_2[] = "__name__";
4280 static const char __pyx_k_octree[] = "octree";
4281 static const char __pyx_k_pickle[] = "pickle";
4282 static const char __pyx_k_reduce[] = "__reduce__";
4283 static const char __pyx_k_struct[] = "struct";
4284 static const char __pyx_k_unpack[] = "unpack";
4285 static const char __pyx_k_update[] = "update";
4286 static const char __pyx_k_asarray[] = "asarray";
4287 static const char __pyx_k_dom_ind[] = "dom_ind";
4288 static const char __pyx_k_float64[] = "float64";
4289 static const char __pyx_k_fortran[] = "fortran";
4290 static const char __pyx_k_genexpr[] = "genexpr";
4291 static const char __pyx_k_invalid[] = "invalid";
4292 static const char __pyx_k_memview[] = "memview";
4293 static const char __pyx_k_quartic[] = "quartic";
4294 static const char __pyx_k_quintic[] = "quintic";
4295 static const char __pyx_k_Ellipsis[] = "Ellipsis";
4296 static const char __pyx_k_LeftEdge[] = "LeftEdge";
4297 static const char __pyx_k_errstate[] = "errstate";
4298 static const char __pyx_k_getstate[] = "__getstate__";
4299 static const char __pyx_k_itemsize[] = "itemsize";
4300 static const char __pyx_k_pyx_type[] = "__pyx_type";
4301 static const char __pyx_k_setstate[] = "__setstate__";
4302 static const char __pyx_k_RightEdge[] = "RightEdge";
4303 static const char __pyx_k_TypeError[] = "TypeError";
4304 static const char __pyx_k_domain_id[] = "domain_id";
4305 static const char __pyx_k_enumerate[] = "enumerate";
4306 static const char __pyx_k_positions[] = "positions";
4307 static const char __pyx_k_pyx_state[] = "__pyx_state";
4308 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
4309 static const char __pyx_k_wendland2[] = "wendland2";
4310 static const char __pyx_k_wendland4[] = "wendland4";
4311 static const char __pyx_k_wendland6[] = "wendland6";
4312 static const char __pyx_k_CICDeposit[] = "CICDeposit";
4313 static const char __pyx_k_IndexError[] = "IndexError";
4314 static const char __pyx_k_ValueError[] = "ValueError";
4315 static const char __pyx_k_pyx_result[] = "__pyx_result";
4316 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
4317 static const char __pyx_k_ImportError[] = "ImportError";
4318 static const char __pyx_k_MemoryError[] = "MemoryError";
4319 static const char __pyx_k_PickleError[] = "PickleError";
4320 static const char __pyx_k_code_length[] = "code_length";
4321 static const char __pyx_k_deposit_cic[] = "deposit_cic";
4322 static const char __pyx_k_deposit_std[] = "deposit_std";
4323 static const char __pyx_k_deposit_sum[] = "deposit_sum";
4324 static const char __pyx_k_kernel_name[] = "kernel_name";
4325 static const char __pyx_k_OnceIndirect[] = "OnceIndirect";
4326 static const char __pyx_k_RuntimeError[] = "RuntimeError";
4327 static const char __pyx_k_SimpleSmooth[] = "SimpleSmooth";
4328 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
4329 static const char __pyx_k_stringsource[] = "stringsource";
4330 static const char __pyx_k_deposit_count[] = "deposit_count";
4331 static const char __pyx_k_domain_offset[] = "domain_offset";
4332 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
4333 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
4334 static const char __pyx_k_CellIdentifier[] = "CellIdentifier";
4335 static const char __pyx_k_CountParticles[] = "CountParticles";
4336 static const char __pyx_k_MeshIdentifier[] = "MeshIdentifier";
4337 static const char __pyx_k_NNParticleField[] = "NNParticleField";
4338 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
4339 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
4340 static const char __pyx_k_deposit_cell_id[] = "deposit_cell_id";
4341 static const char __pyx_k_deposit_mesh_id[] = "deposit_mesh_id";
4342 static const char __pyx_k_deposit_nearest[] = "deposit_nearest";
4343 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
4344 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
4345 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
4346 static const char __pyx_k_ActiveDimensions[] = "ActiveDimensions";
4347 static const char __pyx_k_StdParticleField[] = "StdParticleField";
4348 static const char __pyx_k_SumParticleField[] = "SumParticleField";
4349 static const char __pyx_k_convert_to_units[] = "convert_to_units";
4350 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
4351 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
4352 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
4353 static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
4354 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
4355 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
4356 static const char __pyx_k_deposit_simple_smooth[] = "deposit_simple_smooth";
4357 static const char __pyx_k_deposit_weighted_mean[] = "deposit_weighted_mean";
4358 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
4359 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
4360 static const char __pyx_k_YTBoundsDefinitionError[] = "YTBoundsDefinitionError";
4361 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
4362 static const char __pyx_k_yt_utilities_exceptions[] = "yt.utilities.exceptions";
4363 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
4364 static const char __pyx_k_ParticleDepositOperation[] = "ParticleDepositOperation";
4365 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
4366 static const char __pyx_k_WeightedMeanParticleField[] = "WeightedMeanParticleField";
4367 static const char __pyx_k_initialize_locals_genexpr[] = "initialize.<locals>.genexpr";
4368 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
4369 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
4370 static const char __pyx_k_yt_geometry_particle_deposit[] = "yt.geometry.particle_deposit";
4371 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
4372 static const char __pyx_k_Particle_Deposition_onto_Cells[] = "\nParticle Deposition onto Cells\n\n\n\n\n";
4373 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
4374 static const char __pyx_k_CIC_requires_minimum_of_2_zones[] = "CIC requires minimum of 2 zones in all spatial dimensions.";
4375 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
4376 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
4377 static const char __pyx_k_yt_utilities_lib_misc_utilities[] = "yt.utilities.lib.misc_utilities";
4378 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
4379 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
4380 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
4381 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
4382 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
4383 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
4384 static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
4385 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
4386 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
4387 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
4388 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
4389 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
4390 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
4391 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
4392 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
4393 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
4394 static const char __pyx_k_self_sph_kernel_cannot_be_conver[] = "self.sph_kernel cannot be converted to a Python object for pickling";
4395 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
4396 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
4397 static PyObject *__pyx_n_s_ASCII;
4398 static PyObject *__pyx_n_s_ActiveDimensions;
4399 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
4400 static PyObject *__pyx_n_s_CICDeposit;
4401 static PyObject *__pyx_kp_s_CIC_requires_minimum_of_2_zones;
4402 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
4403 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
4404 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
4405 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
4406 static PyObject *__pyx_n_s_CellIdentifier;
4407 static PyObject *__pyx_n_s_CountParticles;
4408 static PyObject *__pyx_n_s_Ellipsis;
4409 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
4410 static PyObject *__pyx_n_s_F;
4411 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
4412 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
4413 static PyObject *__pyx_n_s_ImportError;
4414 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
4415 static PyObject *__pyx_n_s_IndexError;
4416 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
4417 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
4418 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
4419 static PyObject *__pyx_n_s_LeftEdge;
4420 static PyObject *__pyx_n_s_MemoryError;
4421 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
4422 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
4423 static PyObject *__pyx_n_s_MeshIdentifier;
4424 static PyObject *__pyx_n_s_NNParticleField;
4425 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
4426 static PyObject *__pyx_n_s_NotImplementedError;
4427 static PyObject *__pyx_n_b_O;
4428 static PyObject *__pyx_n_s_OnceIndirect;
4429 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
4430 static PyObject *__pyx_n_s_ParticleDepositOperation;
4431 static PyObject *__pyx_n_s_PickleError;
4432 static PyObject *__pyx_n_s_RightEdge;
4433 static PyObject *__pyx_n_s_RuntimeError;
4434 static PyObject *__pyx_n_s_SimpleSmooth;
4435 static PyObject *__pyx_n_s_StdParticleField;
4436 static PyObject *__pyx_n_s_SumParticleField;
4437 static PyObject *__pyx_n_s_TypeError;
4438 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
4439 static PyObject *__pyx_n_s_ValueError;
4440 static PyObject *__pyx_n_s_View_MemoryView;
4441 static PyObject *__pyx_n_s_WeightedMeanParticleField;
4442 static PyObject *__pyx_n_s_YTBoundsDefinitionError;
4443 static PyObject *__pyx_n_s_allocate_buffer;
4444 static PyObject *__pyx_n_s_args;
4445 static PyObject *__pyx_n_s_asarray;
4446 static PyObject *__pyx_n_s_astype;
4447 static PyObject *__pyx_n_s_base;
4448 static PyObject *__pyx_n_s_c;
4449 static PyObject *__pyx_n_u_c;
4450 static PyObject *__pyx_n_s_class;
4451 static PyObject *__pyx_n_s_cline_in_traceback;
4452 static PyObject *__pyx_n_s_close;
4453 static PyObject *__pyx_n_s_code_length;
4454 static PyObject *__pyx_kp_s_contiguous_and_direct;
4455 static PyObject *__pyx_kp_s_contiguous_and_indirect;
4456 static PyObject *__pyx_n_s_convert_to_units;
4457 static PyObject *__pyx_n_s_cubic;
4458 static PyObject *__pyx_n_s_dds;
4459 static PyObject *__pyx_n_s_deposit_cell_id;
4460 static PyObject *__pyx_n_s_deposit_cic;
4461 static PyObject *__pyx_n_s_deposit_count;
4462 static PyObject *__pyx_n_s_deposit_mesh_id;
4463 static PyObject *__pyx_n_s_deposit_nearest;
4464 static PyObject *__pyx_n_s_deposit_simple_smooth;
4465 static PyObject *__pyx_n_s_deposit_std;
4466 static PyObject *__pyx_n_s_deposit_sum;
4467 static PyObject *__pyx_n_s_deposit_weighted_mean;
4468 static PyObject *__pyx_n_s_dict;
4469 static PyObject *__pyx_n_s_divide;
4470 static PyObject *__pyx_n_s_dom_ind;
4471 static PyObject *__pyx_n_s_domain_id;
4472 static PyObject *__pyx_n_s_domain_offset;
4473 static PyObject *__pyx_n_s_dtype;
4474 static PyObject *__pyx_n_s_dtype_is_object;
4475 static PyObject *__pyx_n_s_empty;
4476 static PyObject *__pyx_n_s_encode;
4477 static PyObject *__pyx_n_s_enter;
4478 static PyObject *__pyx_n_s_enumerate;
4479 static PyObject *__pyx_n_s_error;
4480 static PyObject *__pyx_n_s_errstate;
4481 static PyObject *__pyx_n_s_exit;
4482 static PyObject *__pyx_n_s_fields;
4483 static PyObject *__pyx_n_s_flags;
4484 static PyObject *__pyx_n_s_float64;
4485 static PyObject *__pyx_n_s_format;
4486 static PyObject *__pyx_n_s_fortran;
4487 static PyObject *__pyx_n_u_fortran;
4488 static PyObject *__pyx_n_s_genexpr;
4489 static PyObject *__pyx_n_s_getstate;
4490 static PyObject *__pyx_n_s_gobj;
4491 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
4492 static PyObject *__pyx_n_s_id;
4493 static PyObject *__pyx_n_s_ignore;
4494 static PyObject *__pyx_n_s_import;
4495 static PyObject *__pyx_n_s_inf;
4496 static PyObject *__pyx_n_s_initialize_locals_genexpr;
4497 static PyObject *__pyx_n_s_int32;
4498 static PyObject *__pyx_n_s_int64;
4499 static PyObject *__pyx_n_s_invalid;
4500 static PyObject *__pyx_n_s_itemsize;
4501 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
4502 static PyObject *__pyx_n_s_kernel_name;
4503 static PyObject *__pyx_n_s_lvlmax;
4504 static PyObject *__pyx_n_s_main;
4505 static PyObject *__pyx_n_s_memview;
4506 static PyObject *__pyx_n_s_mode;
4507 static PyObject *__pyx_n_s_name;
4508 static PyObject *__pyx_n_s_name_2;
4509 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
4510 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
4511 static PyObject *__pyx_n_s_ndim;
4512 static PyObject *__pyx_n_s_new;
4513 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
4514 static PyObject *__pyx_n_s_none;
4515 static PyObject *__pyx_n_s_np;
4516 static PyObject *__pyx_n_s_numpy;
4517 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
4518 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
4519 static PyObject *__pyx_n_s_nvals;
4520 static PyObject *__pyx_n_s_obj;
4521 static PyObject *__pyx_n_s_octree;
4522 static PyObject *__pyx_n_s_odata;
4523 static PyObject *__pyx_n_s_order;
4524 static PyObject *__pyx_n_s_pack;
4525 static PyObject *__pyx_n_s_pickle;
4526 static PyObject *__pyx_n_s_positions;
4527 static PyObject *__pyx_n_s_pyx_PickleError;
4528 static PyObject *__pyx_n_s_pyx_checksum;
4529 static PyObject *__pyx_n_s_pyx_getbuffer;
4530 static PyObject *__pyx_n_s_pyx_result;
4531 static PyObject *__pyx_n_s_pyx_state;
4532 static PyObject *__pyx_n_s_pyx_type;
4533 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
4534 static PyObject *__pyx_n_s_pyx_vtable;
4535 static PyObject *__pyx_n_s_quartic;
4536 static PyObject *__pyx_n_s_quintic;
4537 static PyObject *__pyx_n_s_range;
4538 static PyObject *__pyx_n_s_reduce;
4539 static PyObject *__pyx_n_s_reduce_cython;
4540 static PyObject *__pyx_n_s_reduce_ex;
4541 static PyObject *__pyx_kp_s_self_sph_kernel_cannot_be_conver;
4542 static PyObject *__pyx_n_s_send;
4543 static PyObject *__pyx_n_s_setstate;
4544 static PyObject *__pyx_n_s_setstate_cython;
4545 static PyObject *__pyx_n_s_shape;
4546 static PyObject *__pyx_n_s_size;
4547 static PyObject *__pyx_n_s_sqrt;
4548 static PyObject *__pyx_n_s_start;
4549 static PyObject *__pyx_n_s_step;
4550 static PyObject *__pyx_n_s_stop;
4551 static PyObject *__pyx_kp_s_strided_and_direct;
4552 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
4553 static PyObject *__pyx_kp_s_strided_and_indirect;
4554 static PyObject *__pyx_kp_s_stringsource;
4555 static PyObject *__pyx_n_s_struct;
4556 static PyObject *__pyx_n_s_test;
4557 static PyObject *__pyx_n_s_throw;
4558 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
4559 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
4560 static PyObject *__pyx_n_s_units;
4561 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
4562 static PyObject *__pyx_n_s_unpack;
4563 static PyObject *__pyx_n_s_update;
4564 static PyObject *__pyx_n_s_view;
4565 static PyObject *__pyx_n_s_wendland2;
4566 static PyObject *__pyx_n_s_wendland4;
4567 static PyObject *__pyx_n_s_wendland6;
4568 static PyObject *__pyx_n_s_yt_geometry_particle_deposit;
4569 static PyObject *__pyx_n_s_yt_utilities_exceptions;
4570 static PyObject *__pyx_n_s_yt_utilities_lib_misc_utilities;
4571 static PyObject *__pyx_n_s_zeros;
4572 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation___init__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_nvals, PyObject *__pyx_v_kernel_name); /* proto */
4573 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_2initialize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
4574 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_4finalize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
4575 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_6process_octree(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *__pyx_v_octree, PyArrayObject *__pyx_v_dom_ind, PyArrayObject *__pyx_v_positions, PyObject *__pyx_v_fields, int __pyx_v_domain_id, int __pyx_v_domain_offset, PyObject *__pyx_v_lvlmax); /* proto */
4576 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_8process_grid(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_gobj, PyArrayObject *__pyx_v_positions, PyObject *__pyx_v_fields); /* proto */
4577 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self); /* proto */
4578 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4579 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_4__del__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self); /* proto */
4580 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self); /* proto */
4581 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4582 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self); /* proto */
4583 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4584 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self); /* proto */
4585 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self); /* proto */
4586 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self); /* proto */
4587 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4588 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self); /* proto */
4589 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self); /* proto */
4590 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self); /* proto */
4591 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4592 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self); /* proto */
4593 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self); /* proto */
4594 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self); /* proto */
4595 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4596 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self); /* proto */
4597 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self); /* proto */
4598 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self); /* proto */
4599 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4600 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_genexpr(PyObject *__pyx_self); /* proto */
4601 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self); /* proto */
4602 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self); /* proto */
4603 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self); /* proto */
4604 static int __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4605 static int __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_4__del__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self); /* proto */
4606 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self); /* proto */
4607 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4608 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self); /* proto */
4609 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self); /* proto */
4610 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self); /* proto */
4611 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4612 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self); /* proto */
4613 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_2finalize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self); /* proto */
4614 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self); /* proto */
4615 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4616 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self, int __pyx_v_npart); /* proto */
4617 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self); /* proto */
4618 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self); /* proto */
4619 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4620 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self); /* proto */
4621 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self); /* proto */
4622 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self); /* proto */
4623 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4624 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
4625 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
4626 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 */
4627 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 */
4628 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4629 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4630 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4631 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
4632 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
4633 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 */
4634 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
4635 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 */
4636 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
4637 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
4638 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
4639 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
4640 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 */
4641 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4642 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
4643 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 */
4644 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 */
4645 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4646 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4647 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4648 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4649 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4650 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4651 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4652 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4653 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4654 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4655 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4656 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4657 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4658 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4659 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4660 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4661 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4662 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 */
4663 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4664 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4665 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4666 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 */
4667 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 */
4668 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4669 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_CountParticles(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4670 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_SimpleSmooth(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4671 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_SumParticleField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4672 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_StdParticleField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4673 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_CICDeposit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4674 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_WeightedMeanParticleField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4675 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_MeshIdentifier(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4676 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_CellIdentifier(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4677 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_NNParticleField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4678 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4679 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4680 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4681 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4682 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4683 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4684 static PyObject *__pyx_float_0_0;
4685 static PyObject *__pyx_int_0;
4686 static PyObject *__pyx_int_1;
4687 static PyObject *__pyx_int_184977713;
4688 static PyObject *__pyx_int_neg_1;
4689 static PyObject *__pyx_tuple_;
4690 static PyObject *__pyx_tuple__2;
4691 static PyObject *__pyx_tuple__3;
4692 static PyObject *__pyx_tuple__4;
4693 static PyObject *__pyx_tuple__5;
4694 static PyObject *__pyx_tuple__6;
4695 static PyObject *__pyx_tuple__7;
4696 static PyObject *__pyx_tuple__8;
4697 static PyObject *__pyx_tuple__9;
4698 static PyObject *__pyx_slice__12;
4699 static PyObject *__pyx_slice__45;
4700 static PyObject *__pyx_tuple__10;
4701 static PyObject *__pyx_tuple__11;
4702 static PyObject *__pyx_tuple__13;
4703 static PyObject *__pyx_tuple__14;
4704 static PyObject *__pyx_tuple__15;
4705 static PyObject *__pyx_tuple__16;
4706 static PyObject *__pyx_tuple__17;
4707 static PyObject *__pyx_tuple__18;
4708 static PyObject *__pyx_tuple__19;
4709 static PyObject *__pyx_tuple__20;
4710 static PyObject *__pyx_tuple__21;
4711 static PyObject *__pyx_tuple__22;
4712 static PyObject *__pyx_tuple__23;
4713 static PyObject *__pyx_tuple__24;
4714 static PyObject *__pyx_tuple__25;
4715 static PyObject *__pyx_tuple__26;
4716 static PyObject *__pyx_tuple__27;
4717 static PyObject *__pyx_tuple__28;
4718 static PyObject *__pyx_tuple__29;
4719 static PyObject *__pyx_tuple__30;
4720 static PyObject *__pyx_tuple__31;
4721 static PyObject *__pyx_tuple__32;
4722 static PyObject *__pyx_tuple__33;
4723 static PyObject *__pyx_tuple__34;
4724 static PyObject *__pyx_tuple__35;
4725 static PyObject *__pyx_tuple__36;
4726 static PyObject *__pyx_tuple__37;
4727 static PyObject *__pyx_tuple__38;
4728 static PyObject *__pyx_tuple__39;
4729 static PyObject *__pyx_tuple__40;
4730 static PyObject *__pyx_tuple__41;
4731 static PyObject *__pyx_tuple__42;
4732 static PyObject *__pyx_tuple__43;
4733 static PyObject *__pyx_tuple__44;
4734 static PyObject *__pyx_tuple__46;
4735 static PyObject *__pyx_tuple__47;
4736 static PyObject *__pyx_tuple__48;
4737 static PyObject *__pyx_tuple__49;
4738 static PyObject *__pyx_tuple__50;
4739 static PyObject *__pyx_tuple__51;
4740 static PyObject *__pyx_tuple__52;
4741 static PyObject *__pyx_tuple__53;
4742 static PyObject *__pyx_tuple__54;
4743 static PyObject *__pyx_codeobj__55;
4744 /* Late includes */
4745 
4746 /* "yt/geometry/particle_deposit.pyx":27
4747  *
4748  *
4749  * cdef append_axes(np.ndarray arr, int naxes):             # <<<<<<<<<<<<<<
4750  *     if arr.ndim == naxes:
4751  *         return arr
4752  */
4753 
__pyx_f_2yt_8geometry_16particle_deposit_append_axes(PyArrayObject * __pyx_v_arr,int __pyx_v_naxes)4754 static PyObject *__pyx_f_2yt_8geometry_16particle_deposit_append_axes(PyArrayObject *__pyx_v_arr, int __pyx_v_naxes) {
4755   PyObject *__pyx_v_arr2 = NULL;
4756   PyObject *__pyx_r = NULL;
4757   __Pyx_RefNannyDeclarations
4758   int __pyx_t_1;
4759   PyObject *__pyx_t_2 = NULL;
4760   PyObject *__pyx_t_3 = NULL;
4761   PyObject *__pyx_t_4 = NULL;
4762   PyObject *__pyx_t_5 = NULL;
4763   __Pyx_RefNannySetupContext("append_axes", 0);
4764 
4765   /* "yt/geometry/particle_deposit.pyx":28
4766  *
4767  * cdef append_axes(np.ndarray arr, int naxes):
4768  *     if arr.ndim == naxes:             # <<<<<<<<<<<<<<
4769  *         return arr
4770  *     # Avoid copies
4771  */
4772   __pyx_t_1 = ((__pyx_v_arr->nd == __pyx_v_naxes) != 0);
4773   if (__pyx_t_1) {
4774 
4775     /* "yt/geometry/particle_deposit.pyx":29
4776  * cdef append_axes(np.ndarray arr, int naxes):
4777  *     if arr.ndim == naxes:
4778  *         return arr             # <<<<<<<<<<<<<<
4779  *     # Avoid copies
4780  *     arr2 = arr.view()
4781  */
4782     __Pyx_XDECREF(__pyx_r);
4783     __Pyx_INCREF(((PyObject *)__pyx_v_arr));
4784     __pyx_r = ((PyObject *)__pyx_v_arr);
4785     goto __pyx_L0;
4786 
4787     /* "yt/geometry/particle_deposit.pyx":28
4788  *
4789  * cdef append_axes(np.ndarray arr, int naxes):
4790  *     if arr.ndim == naxes:             # <<<<<<<<<<<<<<
4791  *         return arr
4792  *     # Avoid copies
4793  */
4794   }
4795 
4796   /* "yt/geometry/particle_deposit.pyx":31
4797  *         return arr
4798  *     # Avoid copies
4799  *     arr2 = arr.view()             # <<<<<<<<<<<<<<
4800  *     arr2.shape = arr2.shape + (1,) * (naxes - arr2.ndim)
4801  *     return arr2
4802  */
4803   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_view); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 31, __pyx_L1_error)
4804   __Pyx_GOTREF(__pyx_t_3);
4805   __pyx_t_4 = NULL;
4806   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4807     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4808     if (likely(__pyx_t_4)) {
4809       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4810       __Pyx_INCREF(__pyx_t_4);
4811       __Pyx_INCREF(function);
4812       __Pyx_DECREF_SET(__pyx_t_3, function);
4813     }
4814   }
4815   __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4816   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4817   if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 31, __pyx_L1_error)
4818   __Pyx_GOTREF(__pyx_t_2);
4819   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4820   __pyx_v_arr2 = __pyx_t_2;
4821   __pyx_t_2 = 0;
4822 
4823   /* "yt/geometry/particle_deposit.pyx":32
4824  *     # Avoid copies
4825  *     arr2 = arr.view()
4826  *     arr2.shape = arr2.shape + (1,) * (naxes - arr2.ndim)             # <<<<<<<<<<<<<<
4827  *     return arr2
4828  *
4829  */
4830   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr2, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 32, __pyx_L1_error)
4831   __Pyx_GOTREF(__pyx_t_2);
4832   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_naxes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 32, __pyx_L1_error)
4833   __Pyx_GOTREF(__pyx_t_3);
4834   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr2, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 32, __pyx_L1_error)
4835   __Pyx_GOTREF(__pyx_t_4);
4836   __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 32, __pyx_L1_error)
4837   __Pyx_GOTREF(__pyx_t_5);
4838   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4839   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4840   __pyx_t_4 = PyNumber_Multiply(__pyx_tuple_, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 32, __pyx_L1_error)
4841   __Pyx_GOTREF(__pyx_t_4);
4842   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4843   __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 32, __pyx_L1_error)
4844   __Pyx_GOTREF(__pyx_t_5);
4845   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4846   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4847   if (__Pyx_PyObject_SetAttrStr(__pyx_v_arr2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(1, 32, __pyx_L1_error)
4848   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4849 
4850   /* "yt/geometry/particle_deposit.pyx":33
4851  *     arr2 = arr.view()
4852  *     arr2.shape = arr2.shape + (1,) * (naxes - arr2.ndim)
4853  *     return arr2             # <<<<<<<<<<<<<<
4854  *
4855  * cdef class ParticleDepositOperation:
4856  */
4857   __Pyx_XDECREF(__pyx_r);
4858   __Pyx_INCREF(__pyx_v_arr2);
4859   __pyx_r = __pyx_v_arr2;
4860   goto __pyx_L0;
4861 
4862   /* "yt/geometry/particle_deposit.pyx":27
4863  *
4864  *
4865  * cdef append_axes(np.ndarray arr, int naxes):             # <<<<<<<<<<<<<<
4866  *     if arr.ndim == naxes:
4867  *         return arr
4868  */
4869 
4870   /* function exit code */
4871   __pyx_L1_error:;
4872   __Pyx_XDECREF(__pyx_t_2);
4873   __Pyx_XDECREF(__pyx_t_3);
4874   __Pyx_XDECREF(__pyx_t_4);
4875   __Pyx_XDECREF(__pyx_t_5);
4876   __Pyx_AddTraceback("yt.geometry.particle_deposit.append_axes", __pyx_clineno, __pyx_lineno, __pyx_filename);
4877   __pyx_r = 0;
4878   __pyx_L0:;
4879   __Pyx_XDECREF(__pyx_v_arr2);
4880   __Pyx_XGIVEREF(__pyx_r);
4881   __Pyx_RefNannyFinishContext();
4882   return __pyx_r;
4883 }
4884 
4885 /* "yt/geometry/particle_deposit.pyx":36
4886  *
4887  * cdef class ParticleDepositOperation:
4888  *     def __init__(self, nvals, kernel_name):             # <<<<<<<<<<<<<<
4889  *         # nvals is a tuple containing the active dimensions of the
4890  *         # grid to deposit onto and the number of grids,
4891  */
4892 
4893 /* Python wrapper */
4894 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)4895 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4896   PyObject *__pyx_v_nvals = 0;
4897   PyObject *__pyx_v_kernel_name = 0;
4898   int __pyx_r;
4899   __Pyx_RefNannyDeclarations
4900   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4901   {
4902     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nvals,&__pyx_n_s_kernel_name,0};
4903     PyObject* values[2] = {0,0};
4904     if (unlikely(__pyx_kwds)) {
4905       Py_ssize_t kw_args;
4906       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4907       switch (pos_args) {
4908         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4909         CYTHON_FALLTHROUGH;
4910         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4911         CYTHON_FALLTHROUGH;
4912         case  0: break;
4913         default: goto __pyx_L5_argtuple_error;
4914       }
4915       kw_args = PyDict_Size(__pyx_kwds);
4916       switch (pos_args) {
4917         case  0:
4918         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nvals)) != 0)) kw_args--;
4919         else goto __pyx_L5_argtuple_error;
4920         CYTHON_FALLTHROUGH;
4921         case  1:
4922         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kernel_name)) != 0)) kw_args--;
4923         else {
4924           __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 36, __pyx_L3_error)
4925         }
4926       }
4927       if (unlikely(kw_args > 0)) {
4928         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 36, __pyx_L3_error)
4929       }
4930     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4931       goto __pyx_L5_argtuple_error;
4932     } else {
4933       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4934       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4935     }
4936     __pyx_v_nvals = values[0];
4937     __pyx_v_kernel_name = values[1];
4938   }
4939   goto __pyx_L4_argument_unpacking_done;
4940   __pyx_L5_argtuple_error:;
4941   __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 36, __pyx_L3_error)
4942   __pyx_L3_error:;
4943   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4944   __Pyx_RefNannyFinishContext();
4945   return -1;
4946   __pyx_L4_argument_unpacking_done:;
4947   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation___init__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), __pyx_v_nvals, __pyx_v_kernel_name);
4948 
4949   /* function exit code */
4950   __Pyx_RefNannyFinishContext();
4951   return __pyx_r;
4952 }
4953 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation___init__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,PyObject * __pyx_v_nvals,PyObject * __pyx_v_kernel_name)4954 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation___init__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_nvals, PyObject *__pyx_v_kernel_name) {
4955   int __pyx_r;
4956   __Pyx_RefNannyDeclarations
4957   __Pyx_RefNannySetupContext("__init__", 0);
4958 
4959   /* "yt/geometry/particle_deposit.pyx":40
4960  *         # grid to deposit onto and the number of grids,
4961  *         # (nx, ny, nz, ngrids)
4962  *         self.nvals = nvals             # <<<<<<<<<<<<<<
4963  *         self.update_values = 0 # This is the default
4964  *         self.sph_kernel = get_kernel_func(kernel_name)
4965  */
4966   __Pyx_INCREF(__pyx_v_nvals);
4967   __Pyx_GIVEREF(__pyx_v_nvals);
4968   __Pyx_GOTREF(__pyx_v_self->nvals);
4969   __Pyx_DECREF(__pyx_v_self->nvals);
4970   __pyx_v_self->nvals = __pyx_v_nvals;
4971 
4972   /* "yt/geometry/particle_deposit.pyx":41
4973  *         # (nx, ny, nz, ngrids)
4974  *         self.nvals = nvals
4975  *         self.update_values = 0 # This is the default             # <<<<<<<<<<<<<<
4976  *         self.sph_kernel = get_kernel_func(kernel_name)
4977  *
4978  */
4979   __pyx_v_self->update_values = 0;
4980 
4981   /* "yt/geometry/particle_deposit.pyx":42
4982  *         self.nvals = nvals
4983  *         self.update_values = 0 # This is the default
4984  *         self.sph_kernel = get_kernel_func(kernel_name)             # <<<<<<<<<<<<<<
4985  *
4986  *     def initialize(self, *args):
4987  */
4988   if (!(likely(PyString_CheckExact(__pyx_v_kernel_name))||((__pyx_v_kernel_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_kernel_name)->tp_name), 0))) __PYX_ERR(1, 42, __pyx_L1_error)
4989   __pyx_v_self->sph_kernel = __pyx_f_2yt_8geometry_16particle_deposit_get_kernel_func(((PyObject*)__pyx_v_kernel_name));
4990 
4991   /* "yt/geometry/particle_deposit.pyx":36
4992  *
4993  * cdef class ParticleDepositOperation:
4994  *     def __init__(self, nvals, kernel_name):             # <<<<<<<<<<<<<<
4995  *         # nvals is a tuple containing the active dimensions of the
4996  *         # grid to deposit onto and the number of grids,
4997  */
4998 
4999   /* function exit code */
5000   __pyx_r = 0;
5001   goto __pyx_L0;
5002   __pyx_L1_error:;
5003   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5004   __pyx_r = -1;
5005   __pyx_L0:;
5006   __Pyx_RefNannyFinishContext();
5007   return __pyx_r;
5008 }
5009 
5010 /* "yt/geometry/particle_deposit.pyx":44
5011  *         self.sph_kernel = get_kernel_func(kernel_name)
5012  *
5013  *     def initialize(self, *args):             # <<<<<<<<<<<<<<
5014  *         raise NotImplementedError
5015  *
5016  */
5017 
5018 /* Python wrapper */
5019 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_3initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_3initialize(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5020 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_3initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5021   CYTHON_UNUSED PyObject *__pyx_v_args = 0;
5022   PyObject *__pyx_r = 0;
5023   __Pyx_RefNannyDeclarations
5024   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
5025   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "initialize", 0))) return NULL;
5026   __Pyx_INCREF(__pyx_args);
5027   __pyx_v_args = __pyx_args;
5028   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_2initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), __pyx_v_args);
5029 
5030   /* function exit code */
5031   __Pyx_XDECREF(__pyx_v_args);
5032   __Pyx_RefNannyFinishContext();
5033   return __pyx_r;
5034 }
5035 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_2initialize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v_args)5036 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_2initialize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
5037   PyObject *__pyx_r = NULL;
5038   __Pyx_RefNannyDeclarations
5039   __Pyx_RefNannySetupContext("initialize", 0);
5040 
5041   /* "yt/geometry/particle_deposit.pyx":45
5042  *
5043  *     def initialize(self, *args):
5044  *         raise NotImplementedError             # <<<<<<<<<<<<<<
5045  *
5046  *     def finalize(self, *args):
5047  */
5048   __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
5049   __PYX_ERR(1, 45, __pyx_L1_error)
5050 
5051   /* "yt/geometry/particle_deposit.pyx":44
5052  *         self.sph_kernel = get_kernel_func(kernel_name)
5053  *
5054  *     def initialize(self, *args):             # <<<<<<<<<<<<<<
5055  *         raise NotImplementedError
5056  *
5057  */
5058 
5059   /* function exit code */
5060   __pyx_L1_error:;
5061   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
5062   __pyx_r = NULL;
5063   __Pyx_XGIVEREF(__pyx_r);
5064   __Pyx_RefNannyFinishContext();
5065   return __pyx_r;
5066 }
5067 
5068 /* "yt/geometry/particle_deposit.pyx":47
5069  *         raise NotImplementedError
5070  *
5071  *     def finalize(self, *args):             # <<<<<<<<<<<<<<
5072  *         raise NotImplementedError
5073  *
5074  */
5075 
5076 /* Python wrapper */
5077 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5finalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5finalize(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5078 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5finalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5079   CYTHON_UNUSED PyObject *__pyx_v_args = 0;
5080   PyObject *__pyx_r = 0;
5081   __Pyx_RefNannyDeclarations
5082   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
5083   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "finalize", 0))) return NULL;
5084   __Pyx_INCREF(__pyx_args);
5085   __pyx_v_args = __pyx_args;
5086   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_4finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), __pyx_v_args);
5087 
5088   /* function exit code */
5089   __Pyx_XDECREF(__pyx_v_args);
5090   __Pyx_RefNannyFinishContext();
5091   return __pyx_r;
5092 }
5093 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_4finalize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v_args)5094 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_4finalize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
5095   PyObject *__pyx_r = NULL;
5096   __Pyx_RefNannyDeclarations
5097   __Pyx_RefNannySetupContext("finalize", 0);
5098 
5099   /* "yt/geometry/particle_deposit.pyx":48
5100  *
5101  *     def finalize(self, *args):
5102  *         raise NotImplementedError             # <<<<<<<<<<<<<<
5103  *
5104  *     @cython.boundscheck(False)
5105  */
5106   __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
5107   __PYX_ERR(1, 48, __pyx_L1_error)
5108 
5109   /* "yt/geometry/particle_deposit.pyx":47
5110  *         raise NotImplementedError
5111  *
5112  *     def finalize(self, *args):             # <<<<<<<<<<<<<<
5113  *         raise NotImplementedError
5114  *
5115  */
5116 
5117   /* function exit code */
5118   __pyx_L1_error:;
5119   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
5120   __pyx_r = NULL;
5121   __Pyx_XGIVEREF(__pyx_r);
5122   __Pyx_RefNannyFinishContext();
5123   return __pyx_r;
5124 }
5125 
5126 /* "yt/geometry/particle_deposit.pyx":52
5127  *     @cython.boundscheck(False)
5128  *     @cython.wraparound(False)
5129  *     def process_octree(self, OctreeContainer octree,             # <<<<<<<<<<<<<<
5130  *                      np.ndarray[np.int64_t, ndim=1] dom_ind,
5131  *                      np.ndarray[np.float64_t, ndim=2] positions,
5132  */
5133 
5134 /* Python wrapper */
5135 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_7process_octree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_7process_octree(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5136 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_7process_octree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5137   struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *__pyx_v_octree = 0;
5138   PyArrayObject *__pyx_v_dom_ind = 0;
5139   PyArrayObject *__pyx_v_positions = 0;
5140   PyObject *__pyx_v_fields = 0;
5141   int __pyx_v_domain_id;
5142   int __pyx_v_domain_offset;
5143   PyObject *__pyx_v_lvlmax = 0;
5144   PyObject *__pyx_r = 0;
5145   __Pyx_RefNannyDeclarations
5146   __Pyx_RefNannySetupContext("process_octree (wrapper)", 0);
5147   {
5148     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_octree,&__pyx_n_s_dom_ind,&__pyx_n_s_positions,&__pyx_n_s_fields,&__pyx_n_s_domain_id,&__pyx_n_s_domain_offset,&__pyx_n_s_lvlmax,0};
5149     PyObject* values[7] = {0,0,0,0,0,0,0};
5150 
5151     /* "yt/geometry/particle_deposit.pyx":55
5152  *                      np.ndarray[np.int64_t, ndim=1] dom_ind,
5153  *                      np.ndarray[np.float64_t, ndim=2] positions,
5154  *                      fields = None, int domain_id = -1,             # <<<<<<<<<<<<<<
5155  *                      int domain_offset = 0, lvlmax = None):
5156  *         cdef int nf, i, j
5157  */
5158     values[3] = ((PyObject *)Py_None);
5159 
5160     /* "yt/geometry/particle_deposit.pyx":56
5161  *                      np.ndarray[np.float64_t, ndim=2] positions,
5162  *                      fields = None, int domain_id = -1,
5163  *                      int domain_offset = 0, lvlmax = None):             # <<<<<<<<<<<<<<
5164  *         cdef int nf, i, j
5165  *         if fields is None:
5166  */
5167     values[6] = ((PyObject *)Py_None);
5168     if (unlikely(__pyx_kwds)) {
5169       Py_ssize_t kw_args;
5170       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5171       switch (pos_args) {
5172         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5173         CYTHON_FALLTHROUGH;
5174         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5175         CYTHON_FALLTHROUGH;
5176         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5177         CYTHON_FALLTHROUGH;
5178         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5179         CYTHON_FALLTHROUGH;
5180         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5181         CYTHON_FALLTHROUGH;
5182         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5183         CYTHON_FALLTHROUGH;
5184         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5185         CYTHON_FALLTHROUGH;
5186         case  0: break;
5187         default: goto __pyx_L5_argtuple_error;
5188       }
5189       kw_args = PyDict_Size(__pyx_kwds);
5190       switch (pos_args) {
5191         case  0:
5192         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_octree)) != 0)) kw_args--;
5193         else goto __pyx_L5_argtuple_error;
5194         CYTHON_FALLTHROUGH;
5195         case  1:
5196         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dom_ind)) != 0)) kw_args--;
5197         else {
5198           __Pyx_RaiseArgtupleInvalid("process_octree", 0, 3, 7, 1); __PYX_ERR(1, 52, __pyx_L3_error)
5199         }
5200         CYTHON_FALLTHROUGH;
5201         case  2:
5202         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_positions)) != 0)) kw_args--;
5203         else {
5204           __Pyx_RaiseArgtupleInvalid("process_octree", 0, 3, 7, 2); __PYX_ERR(1, 52, __pyx_L3_error)
5205         }
5206         CYTHON_FALLTHROUGH;
5207         case  3:
5208         if (kw_args > 0) {
5209           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fields);
5210           if (value) { values[3] = value; kw_args--; }
5211         }
5212         CYTHON_FALLTHROUGH;
5213         case  4:
5214         if (kw_args > 0) {
5215           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_domain_id);
5216           if (value) { values[4] = value; kw_args--; }
5217         }
5218         CYTHON_FALLTHROUGH;
5219         case  5:
5220         if (kw_args > 0) {
5221           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_domain_offset);
5222           if (value) { values[5] = value; kw_args--; }
5223         }
5224         CYTHON_FALLTHROUGH;
5225         case  6:
5226         if (kw_args > 0) {
5227           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lvlmax);
5228           if (value) { values[6] = value; kw_args--; }
5229         }
5230       }
5231       if (unlikely(kw_args > 0)) {
5232         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process_octree") < 0)) __PYX_ERR(1, 52, __pyx_L3_error)
5233       }
5234     } else {
5235       switch (PyTuple_GET_SIZE(__pyx_args)) {
5236         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
5237         CYTHON_FALLTHROUGH;
5238         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5239         CYTHON_FALLTHROUGH;
5240         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5241         CYTHON_FALLTHROUGH;
5242         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5243         CYTHON_FALLTHROUGH;
5244         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5245         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5246         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5247         break;
5248         default: goto __pyx_L5_argtuple_error;
5249       }
5250     }
5251     __pyx_v_octree = ((struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *)values[0]);
5252     __pyx_v_dom_ind = ((PyArrayObject *)values[1]);
5253     __pyx_v_positions = ((PyArrayObject *)values[2]);
5254     __pyx_v_fields = values[3];
5255     if (values[4]) {
5256       __pyx_v_domain_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_domain_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 55, __pyx_L3_error)
5257     } else {
5258       __pyx_v_domain_id = ((int)-1);
5259     }
5260     if (values[5]) {
5261       __pyx_v_domain_offset = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_domain_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 56, __pyx_L3_error)
5262     } else {
5263       __pyx_v_domain_offset = ((int)0);
5264     }
5265     __pyx_v_lvlmax = values[6];
5266   }
5267   goto __pyx_L4_argument_unpacking_done;
5268   __pyx_L5_argtuple_error:;
5269   __Pyx_RaiseArgtupleInvalid("process_octree", 0, 3, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 52, __pyx_L3_error)
5270   __pyx_L3_error:;
5271   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.process_octree", __pyx_clineno, __pyx_lineno, __pyx_filename);
5272   __Pyx_RefNannyFinishContext();
5273   return NULL;
5274   __pyx_L4_argument_unpacking_done:;
5275   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_octree), __pyx_ptype_2yt_8geometry_13oct_container_OctreeContainer, 1, "octree", 0))) __PYX_ERR(1, 52, __pyx_L1_error)
5276   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dom_ind), __pyx_ptype_5numpy_ndarray, 1, "dom_ind", 0))) __PYX_ERR(1, 53, __pyx_L1_error)
5277   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_positions), __pyx_ptype_5numpy_ndarray, 1, "positions", 0))) __PYX_ERR(1, 54, __pyx_L1_error)
5278   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_6process_octree(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), __pyx_v_octree, __pyx_v_dom_ind, __pyx_v_positions, __pyx_v_fields, __pyx_v_domain_id, __pyx_v_domain_offset, __pyx_v_lvlmax);
5279 
5280   /* "yt/geometry/particle_deposit.pyx":52
5281  *     @cython.boundscheck(False)
5282  *     @cython.wraparound(False)
5283  *     def process_octree(self, OctreeContainer octree,             # <<<<<<<<<<<<<<
5284  *                      np.ndarray[np.int64_t, ndim=1] dom_ind,
5285  *                      np.ndarray[np.float64_t, ndim=2] positions,
5286  */
5287 
5288   /* function exit code */
5289   goto __pyx_L0;
5290   __pyx_L1_error:;
5291   __pyx_r = NULL;
5292   __pyx_L0:;
5293   __Pyx_RefNannyFinishContext();
5294   return __pyx_r;
5295 }
5296 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_6process_octree(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer * __pyx_v_octree,PyArrayObject * __pyx_v_dom_ind,PyArrayObject * __pyx_v_positions,PyObject * __pyx_v_fields,int __pyx_v_domain_id,int __pyx_v_domain_offset,PyObject * __pyx_v_lvlmax)5297 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_6process_octree(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer *__pyx_v_octree, PyArrayObject *__pyx_v_dom_ind, PyArrayObject *__pyx_v_positions, PyObject *__pyx_v_fields, int __pyx_v_domain_id, int __pyx_v_domain_offset, PyObject *__pyx_v_lvlmax) {
5298   int __pyx_v_nf;
5299   int __pyx_v_i;
5300   int __pyx_v_j;
5301   __Pyx_memviewslice __pyx_v_field_pointers = { 0, 0, { 0 }, { 0 }, { 0 } };
5302   __pyx_t_5numpy_float64_t __pyx_v_pos[3];
5303   __Pyx_memviewslice __pyx_v_field_vals = { 0, 0, { 0 }, { 0 }, { 0 } };
5304   int __pyx_v_dims[3];
5305   CYTHON_UNUSED int __pyx_v_nz;
5306   struct __pyx_t_2yt_8geometry_12oct_visitors_OctInfo __pyx_v_oi;
5307   __pyx_t_5numpy_int64_t __pyx_v_offset;
5308   __pyx_t_5numpy_int64_t __pyx_v_moff;
5309   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *__pyx_v_oct;
5310   CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_numpart;
5311   __pyx_t_5numpy_int8_t __pyx_v_use_lvlmax;
5312   PyArrayObject *__pyx_v_lvlmaxval = 0;
5313   __Pyx_LocalBuf_ND __pyx_pybuffernd_dom_ind;
5314   __Pyx_Buffer __pyx_pybuffer_dom_ind;
5315   __Pyx_LocalBuf_ND __pyx_pybuffernd_lvlmaxval;
5316   __Pyx_Buffer __pyx_pybuffer_lvlmaxval;
5317   __Pyx_LocalBuf_ND __pyx_pybuffernd_positions;
5318   __Pyx_Buffer __pyx_pybuffer_positions;
5319   PyObject *__pyx_r = NULL;
5320   __Pyx_RefNannyDeclarations
5321   int __pyx_t_1;
5322   int __pyx_t_2;
5323   PyObject *__pyx_t_3 = NULL;
5324   Py_ssize_t __pyx_t_4;
5325   PyObject *__pyx_t_5 = NULL;
5326   PyObject *__pyx_t_6 = NULL;
5327   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
5328   PyObject *__pyx_t_8 = NULL;
5329   __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
5330   long __pyx_t_10;
5331   PyObject *__pyx_t_11 = NULL;
5332   PyArrayObject *__pyx_t_12 = NULL;
5333   npy_intp __pyx_t_13;
5334   npy_intp __pyx_t_14;
5335   int __pyx_t_15;
5336   int __pyx_t_16;
5337   int __pyx_t_17;
5338   int __pyx_t_18;
5339   Py_ssize_t __pyx_t_19;
5340   Py_ssize_t __pyx_t_20;
5341   Py_ssize_t __pyx_t_21;
5342   Py_ssize_t __pyx_t_22;
5343   Py_ssize_t __pyx_t_23;
5344   struct __pyx_t_2yt_8geometry_12oct_visitors_Oct *__pyx_t_24;
5345   struct __pyx_opt_args_2yt_8geometry_13oct_container_15OctreeContainer_get __pyx_t_25;
5346   Py_ssize_t __pyx_t_26;
5347   __pyx_t_5numpy_int64_t __pyx_t_27;
5348   Py_ssize_t __pyx_t_28;
5349   Py_ssize_t __pyx_t_29;
5350   Py_ssize_t __pyx_t_30;
5351   __Pyx_RefNannySetupContext("process_octree", 0);
5352   __Pyx_INCREF(__pyx_v_fields);
5353   __Pyx_INCREF(__pyx_v_lvlmax);
5354   __pyx_pybuffer_lvlmaxval.pybuffer.buf = NULL;
5355   __pyx_pybuffer_lvlmaxval.refcount = 0;
5356   __pyx_pybuffernd_lvlmaxval.data = NULL;
5357   __pyx_pybuffernd_lvlmaxval.rcbuffer = &__pyx_pybuffer_lvlmaxval;
5358   __pyx_pybuffer_dom_ind.pybuffer.buf = NULL;
5359   __pyx_pybuffer_dom_ind.refcount = 0;
5360   __pyx_pybuffernd_dom_ind.data = NULL;
5361   __pyx_pybuffernd_dom_ind.rcbuffer = &__pyx_pybuffer_dom_ind;
5362   __pyx_pybuffer_positions.pybuffer.buf = NULL;
5363   __pyx_pybuffer_positions.refcount = 0;
5364   __pyx_pybuffernd_positions.data = NULL;
5365   __pyx_pybuffernd_positions.rcbuffer = &__pyx_pybuffer_positions;
5366   {
5367     __Pyx_BufFmt_StackElem __pyx_stack[1];
5368     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dom_ind.rcbuffer->pybuffer, (PyObject*)__pyx_v_dom_ind, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(1, 52, __pyx_L1_error)
5369   }
5370   __pyx_pybuffernd_dom_ind.diminfo[0].strides = __pyx_pybuffernd_dom_ind.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dom_ind.diminfo[0].shape = __pyx_pybuffernd_dom_ind.rcbuffer->pybuffer.shape[0];
5371   {
5372     __Pyx_BufFmt_StackElem __pyx_stack[1];
5373     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_positions.rcbuffer->pybuffer, (PyObject*)__pyx_v_positions, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(1, 52, __pyx_L1_error)
5374   }
5375   __pyx_pybuffernd_positions.diminfo[0].strides = __pyx_pybuffernd_positions.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_positions.diminfo[0].shape = __pyx_pybuffernd_positions.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_positions.diminfo[1].strides = __pyx_pybuffernd_positions.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_positions.diminfo[1].shape = __pyx_pybuffernd_positions.rcbuffer->pybuffer.shape[1];
5376 
5377   /* "yt/geometry/particle_deposit.pyx":58
5378  *                      int domain_offset = 0, lvlmax = None):
5379  *         cdef int nf, i, j
5380  *         if fields is None:             # <<<<<<<<<<<<<<
5381  *             fields = []
5382  *         nf = len(fields)
5383  */
5384   __pyx_t_1 = (__pyx_v_fields == Py_None);
5385   __pyx_t_2 = (__pyx_t_1 != 0);
5386   if (__pyx_t_2) {
5387 
5388     /* "yt/geometry/particle_deposit.pyx":59
5389  *         cdef int nf, i, j
5390  *         if fields is None:
5391  *             fields = []             # <<<<<<<<<<<<<<
5392  *         nf = len(fields)
5393  *         cdef np.float64_t[::cython.view.indirect, ::1] field_pointers
5394  */
5395     __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 59, __pyx_L1_error)
5396     __Pyx_GOTREF(__pyx_t_3);
5397     __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_3);
5398     __pyx_t_3 = 0;
5399 
5400     /* "yt/geometry/particle_deposit.pyx":58
5401  *                      int domain_offset = 0, lvlmax = None):
5402  *         cdef int nf, i, j
5403  *         if fields is None:             # <<<<<<<<<<<<<<
5404  *             fields = []
5405  *         nf = len(fields)
5406  */
5407   }
5408 
5409   /* "yt/geometry/particle_deposit.pyx":60
5410  *         if fields is None:
5411  *             fields = []
5412  *         nf = len(fields)             # <<<<<<<<<<<<<<
5413  *         cdef np.float64_t[::cython.view.indirect, ::1] field_pointers
5414  *         if nf > 0: field_pointers = OnceIndirect(fields)
5415  */
5416   __pyx_t_4 = PyObject_Length(__pyx_v_fields); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 60, __pyx_L1_error)
5417   __pyx_v_nf = __pyx_t_4;
5418 
5419   /* "yt/geometry/particle_deposit.pyx":62
5420  *         nf = len(fields)
5421  *         cdef np.float64_t[::cython.view.indirect, ::1] field_pointers
5422  *         if nf > 0: field_pointers = OnceIndirect(fields)             # <<<<<<<<<<<<<<
5423  *         cdef np.float64_t pos[3]
5424  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")
5425  */
5426   __pyx_t_2 = ((__pyx_v_nf > 0) != 0);
5427   if (__pyx_t_2) {
5428     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_OnceIndirect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error)
5429     __Pyx_GOTREF(__pyx_t_5);
5430     __pyx_t_6 = NULL;
5431     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
5432       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
5433       if (likely(__pyx_t_6)) {
5434         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5435         __Pyx_INCREF(__pyx_t_6);
5436         __Pyx_INCREF(function);
5437         __Pyx_DECREF_SET(__pyx_t_5, function);
5438       }
5439     }
5440     __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_fields) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fields);
5441     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5442     if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 62, __pyx_L1_error)
5443     __Pyx_GOTREF(__pyx_t_3);
5444     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5445     __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_psdc_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(1, 62, __pyx_L1_error)
5446     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5447     __pyx_v_field_pointers = __pyx_t_7;
5448     __pyx_t_7.memview = NULL;
5449     __pyx_t_7.data = NULL;
5450   }
5451 
5452   /* "yt/geometry/particle_deposit.pyx":64
5453  *         if nf > 0: field_pointers = OnceIndirect(fields)
5454  *         cdef np.float64_t pos[3]
5455  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")             # <<<<<<<<<<<<<<
5456  *         cdef int dims[3]
5457  *         dims[0] = dims[1] = dims[2] = (1 << octree.oref)
5458  */
5459   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 64, __pyx_L1_error)
5460   __Pyx_GOTREF(__pyx_t_3);
5461   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error)
5462   __Pyx_GOTREF(__pyx_t_5);
5463   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5464   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nf); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 64, __pyx_L1_error)
5465   __Pyx_GOTREF(__pyx_t_3);
5466   __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 64, __pyx_L1_error)
5467   __Pyx_GOTREF(__pyx_t_6);
5468   __Pyx_GIVEREF(__pyx_t_3);
5469   PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
5470   __pyx_t_3 = 0;
5471   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 64, __pyx_L1_error)
5472   __Pyx_GOTREF(__pyx_t_3);
5473   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
5474   __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 64, __pyx_L1_error)
5475   __Pyx_GOTREF(__pyx_t_8);
5476   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5477   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5478   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5479   __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(1, 64, __pyx_L1_error)
5480   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5481   __pyx_v_field_vals = __pyx_t_9;
5482   __pyx_t_9.memview = NULL;
5483   __pyx_t_9.data = NULL;
5484 
5485   /* "yt/geometry/particle_deposit.pyx":66
5486  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")
5487  *         cdef int dims[3]
5488  *         dims[0] = dims[1] = dims[2] = (1 << octree.oref)             # <<<<<<<<<<<<<<
5489  *         cdef int nz = dims[0] * dims[1] * dims[2]
5490  *         cdef OctInfo oi
5491  */
5492   __pyx_t_10 = (1 << __pyx_v_octree->oref);
5493   (__pyx_v_dims[0]) = __pyx_t_10;
5494   (__pyx_v_dims[1]) = __pyx_t_10;
5495   (__pyx_v_dims[2]) = __pyx_t_10;
5496 
5497   /* "yt/geometry/particle_deposit.pyx":67
5498  *         cdef int dims[3]
5499  *         dims[0] = dims[1] = dims[2] = (1 << octree.oref)
5500  *         cdef int nz = dims[0] * dims[1] * dims[2]             # <<<<<<<<<<<<<<
5501  *         cdef OctInfo oi
5502  *         cdef np.int64_t offset, moff
5503  */
5504   __pyx_v_nz = (((__pyx_v_dims[0]) * (__pyx_v_dims[1])) * (__pyx_v_dims[2]));
5505 
5506   /* "yt/geometry/particle_deposit.pyx":71
5507  *         cdef np.int64_t offset, moff
5508  *         cdef Oct *oct
5509  *         cdef np.int64_t numpart = positions.shape[0]             # <<<<<<<<<<<<<<
5510  *         cdef np.int8_t use_lvlmax
5511  *         moff = octree.get_domain_offset(domain_id + domain_offset)
5512  */
5513   __pyx_v_numpart = (__pyx_v_positions->dimensions[0]);
5514 
5515   /* "yt/geometry/particle_deposit.pyx":73
5516  *         cdef np.int64_t numpart = positions.shape[0]
5517  *         cdef np.int8_t use_lvlmax
5518  *         moff = octree.get_domain_offset(domain_id + domain_offset)             # <<<<<<<<<<<<<<
5519  *         if lvlmax is None:
5520  *             use_lvlmax = False
5521  */
5522   __pyx_v_moff = ((struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer *)__pyx_v_octree->__pyx_vtab)->get_domain_offset(__pyx_v_octree, (__pyx_v_domain_id + __pyx_v_domain_offset));
5523 
5524   /* "yt/geometry/particle_deposit.pyx":74
5525  *         cdef np.int8_t use_lvlmax
5526  *         moff = octree.get_domain_offset(domain_id + domain_offset)
5527  *         if lvlmax is None:             # <<<<<<<<<<<<<<
5528  *             use_lvlmax = False
5529  *             lvlmax = []
5530  */
5531   __pyx_t_2 = (__pyx_v_lvlmax == Py_None);
5532   __pyx_t_1 = (__pyx_t_2 != 0);
5533   if (__pyx_t_1) {
5534 
5535     /* "yt/geometry/particle_deposit.pyx":75
5536  *         moff = octree.get_domain_offset(domain_id + domain_offset)
5537  *         if lvlmax is None:
5538  *             use_lvlmax = False             # <<<<<<<<<<<<<<
5539  *             lvlmax = []
5540  *         else:
5541  */
5542     __pyx_v_use_lvlmax = 0;
5543 
5544     /* "yt/geometry/particle_deposit.pyx":76
5545  *         if lvlmax is None:
5546  *             use_lvlmax = False
5547  *             lvlmax = []             # <<<<<<<<<<<<<<
5548  *         else:
5549  *             use_lvlmax = True
5550  */
5551     __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 76, __pyx_L1_error)
5552     __Pyx_GOTREF(__pyx_t_8);
5553     __Pyx_DECREF_SET(__pyx_v_lvlmax, __pyx_t_8);
5554     __pyx_t_8 = 0;
5555 
5556     /* "yt/geometry/particle_deposit.pyx":74
5557  *         cdef np.int8_t use_lvlmax
5558  *         moff = octree.get_domain_offset(domain_id + domain_offset)
5559  *         if lvlmax is None:             # <<<<<<<<<<<<<<
5560  *             use_lvlmax = False
5561  *             lvlmax = []
5562  */
5563     goto __pyx_L5;
5564   }
5565 
5566   /* "yt/geometry/particle_deposit.pyx":78
5567  *             lvlmax = []
5568  *         else:
5569  *             use_lvlmax = True             # <<<<<<<<<<<<<<
5570  *         cdef np.ndarray[np.int32_t, ndim=1] lvlmaxval = np.asarray(lvlmax, dtype=np.int32)
5571  *
5572  */
5573   /*else*/ {
5574     __pyx_v_use_lvlmax = 1;
5575   }
5576   __pyx_L5:;
5577 
5578   /* "yt/geometry/particle_deposit.pyx":79
5579  *         else:
5580  *             use_lvlmax = True
5581  *         cdef np.ndarray[np.int32_t, ndim=1] lvlmaxval = np.asarray(lvlmax, dtype=np.int32)             # <<<<<<<<<<<<<<
5582  *
5583  *         for i in range(positions.shape[0]):
5584  */
5585   __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 79, __pyx_L1_error)
5586   __Pyx_GOTREF(__pyx_t_8);
5587   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 79, __pyx_L1_error)
5588   __Pyx_GOTREF(__pyx_t_3);
5589   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5590   __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 79, __pyx_L1_error)
5591   __Pyx_GOTREF(__pyx_t_8);
5592   __Pyx_INCREF(__pyx_v_lvlmax);
5593   __Pyx_GIVEREF(__pyx_v_lvlmax);
5594   PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_lvlmax);
5595   __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 79, __pyx_L1_error)
5596   __Pyx_GOTREF(__pyx_t_6);
5597   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 79, __pyx_L1_error)
5598   __Pyx_GOTREF(__pyx_t_5);
5599   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 79, __pyx_L1_error)
5600   __Pyx_GOTREF(__pyx_t_11);
5601   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5602   if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(1, 79, __pyx_L1_error)
5603   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5604   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 79, __pyx_L1_error)
5605   __Pyx_GOTREF(__pyx_t_11);
5606   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5607   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5608   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5609   if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 79, __pyx_L1_error)
5610   __pyx_t_12 = ((PyArrayObject *)__pyx_t_11);
5611   {
5612     __Pyx_BufFmt_StackElem __pyx_stack[1];
5613     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
5614       __pyx_v_lvlmaxval = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer.buf = NULL;
5615       __PYX_ERR(1, 79, __pyx_L1_error)
5616     } else {__pyx_pybuffernd_lvlmaxval.diminfo[0].strides = __pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lvlmaxval.diminfo[0].shape = __pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer.shape[0];
5617     }
5618   }
5619   __pyx_t_12 = 0;
5620   __pyx_v_lvlmaxval = ((PyArrayObject *)__pyx_t_11);
5621   __pyx_t_11 = 0;
5622 
5623   /* "yt/geometry/particle_deposit.pyx":81
5624  *         cdef np.ndarray[np.int32_t, ndim=1] lvlmaxval = np.asarray(lvlmax, dtype=np.int32)
5625  *
5626  *         for i in range(positions.shape[0]):             # <<<<<<<<<<<<<<
5627  *             # We should check if particle remains inside the Oct here
5628  *             for j in range(nf):
5629  */
5630   __pyx_t_13 = (__pyx_v_positions->dimensions[0]);
5631   __pyx_t_14 = __pyx_t_13;
5632   for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
5633     __pyx_v_i = __pyx_t_15;
5634 
5635     /* "yt/geometry/particle_deposit.pyx":83
5636  *         for i in range(positions.shape[0]):
5637  *             # We should check if particle remains inside the Oct here
5638  *             for j in range(nf):             # <<<<<<<<<<<<<<
5639  *                 field_vals[j] = field_pointers[j,i]
5640  *             for j in range(3):
5641  */
5642     __pyx_t_16 = __pyx_v_nf;
5643     __pyx_t_17 = __pyx_t_16;
5644     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
5645       __pyx_v_j = __pyx_t_18;
5646 
5647       /* "yt/geometry/particle_deposit.pyx":84
5648  *             # We should check if particle remains inside the Oct here
5649  *             for j in range(nf):
5650  *                 field_vals[j] = field_pointers[j,i]             # <<<<<<<<<<<<<<
5651  *             for j in range(3):
5652  *                 pos[j] = positions[i, j]
5653  */
5654       if (unlikely(!__pyx_v_field_pointers.memview)) { __Pyx_RaiseUnboundLocalError("field_pointers"); __PYX_ERR(1, 84, __pyx_L1_error) }
5655       __pyx_t_19 = __pyx_v_j;
5656       __pyx_t_20 = __pyx_v_i;
5657       __pyx_t_21 = __pyx_v_j;
5658       *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_field_vals.data + __pyx_t_21 * __pyx_v_field_vals.strides[0]) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (*((char **) (__pyx_v_field_pointers.data + __pyx_t_19 * __pyx_v_field_pointers.strides[0])) + __pyx_v_field_pointers.suboffsets[0]) )) + __pyx_t_20)) )));
5659     }
5660 
5661     /* "yt/geometry/particle_deposit.pyx":85
5662  *             for j in range(nf):
5663  *                 field_vals[j] = field_pointers[j,i]
5664  *             for j in range(3):             # <<<<<<<<<<<<<<
5665  *                 pos[j] = positions[i, j]
5666  *             # This line should be modified to have it return the index into an
5667  */
5668     for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
5669       __pyx_v_j = __pyx_t_16;
5670 
5671       /* "yt/geometry/particle_deposit.pyx":86
5672  *                 field_vals[j] = field_pointers[j,i]
5673  *             for j in range(3):
5674  *                 pos[j] = positions[i, j]             # <<<<<<<<<<<<<<
5675  *             # This line should be modified to have it return the index into an
5676  *             # array based on whatever cutting of the domain we have done.  This
5677  */
5678       __pyx_t_22 = __pyx_v_i;
5679       __pyx_t_23 = __pyx_v_j;
5680       (__pyx_v_pos[__pyx_v_j]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_positions.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_positions.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_positions.diminfo[1].strides));
5681     }
5682 
5683     /* "yt/geometry/particle_deposit.pyx":93
5684  *             # full octree structure.  All we *really* care about is some
5685  *             # arbitrary offset into a field value for deposition.
5686  *             if not use_lvlmax:             # <<<<<<<<<<<<<<
5687  *                 oct = octree.get(pos, &oi)
5688  *             else:
5689  */
5690     __pyx_t_1 = ((!(__pyx_v_use_lvlmax != 0)) != 0);
5691     if (__pyx_t_1) {
5692 
5693       /* "yt/geometry/particle_deposit.pyx":94
5694  *             # arbitrary offset into a field value for deposition.
5695  *             if not use_lvlmax:
5696  *                 oct = octree.get(pos, &oi)             # <<<<<<<<<<<<<<
5697  *             else:
5698  *                 oct = octree.get(pos, &oi, max_level=lvlmaxval[i])
5699  */
5700       __pyx_t_25.__pyx_n = 1;
5701       __pyx_t_25.oinfo = (&__pyx_v_oi);
5702       __pyx_t_24 = ((struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer *)__pyx_v_octree->__pyx_vtab)->get(__pyx_v_octree, __pyx_v_pos, &__pyx_t_25);
5703       __pyx_v_oct = __pyx_t_24;
5704 
5705       /* "yt/geometry/particle_deposit.pyx":93
5706  *             # full octree structure.  All we *really* care about is some
5707  *             # arbitrary offset into a field value for deposition.
5708  *             if not use_lvlmax:             # <<<<<<<<<<<<<<
5709  *                 oct = octree.get(pos, &oi)
5710  *             else:
5711  */
5712       goto __pyx_L12;
5713     }
5714 
5715     /* "yt/geometry/particle_deposit.pyx":96
5716  *                 oct = octree.get(pos, &oi)
5717  *             else:
5718  *                 oct = octree.get(pos, &oi, max_level=lvlmaxval[i])             # <<<<<<<<<<<<<<
5719  *             # This next line is unfortunate.  Basically it says, sometimes we
5720  *             # might have particles that belong to octs outside our domain.
5721  */
5722     /*else*/ {
5723       __pyx_t_26 = __pyx_v_i;
5724       __pyx_t_25.__pyx_n = 2;
5725       __pyx_t_25.oinfo = (&__pyx_v_oi);
5726       __pyx_t_25.max_level = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_lvlmaxval.diminfo[0].strides));
5727       __pyx_t_24 = ((struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer *)__pyx_v_octree->__pyx_vtab)->get(__pyx_v_octree, __pyx_v_pos, &__pyx_t_25);
5728       __pyx_v_oct = __pyx_t_24;
5729     }
5730     __pyx_L12:;
5731 
5732     /* "yt/geometry/particle_deposit.pyx":107
5733  *             # regions on other processors.  Addressing this is on the TODO
5734  *             # list.
5735  *             if oct == NULL or (domain_id > 0 and oct.domain != domain_id):             # <<<<<<<<<<<<<<
5736  *                 continue
5737  *             # Note that this has to be our local index, not our in-file index.
5738  */
5739     __pyx_t_2 = ((__pyx_v_oct == NULL) != 0);
5740     if (!__pyx_t_2) {
5741     } else {
5742       __pyx_t_1 = __pyx_t_2;
5743       goto __pyx_L14_bool_binop_done;
5744     }
5745     __pyx_t_2 = ((__pyx_v_domain_id > 0) != 0);
5746     if (__pyx_t_2) {
5747     } else {
5748       __pyx_t_1 = __pyx_t_2;
5749       goto __pyx_L14_bool_binop_done;
5750     }
5751     __pyx_t_2 = ((__pyx_v_oct->domain != __pyx_v_domain_id) != 0);
5752     __pyx_t_1 = __pyx_t_2;
5753     __pyx_L14_bool_binop_done:;
5754     if (__pyx_t_1) {
5755 
5756       /* "yt/geometry/particle_deposit.pyx":108
5757  *             # list.
5758  *             if oct == NULL or (domain_id > 0 and oct.domain != domain_id):
5759  *                 continue             # <<<<<<<<<<<<<<
5760  *             # Note that this has to be our local index, not our in-file index.
5761  *             offset = dom_ind[oct.domain_ind - moff]
5762  */
5763       goto __pyx_L6_continue;
5764 
5765       /* "yt/geometry/particle_deposit.pyx":107
5766  *             # regions on other processors.  Addressing this is on the TODO
5767  *             # list.
5768  *             if oct == NULL or (domain_id > 0 and oct.domain != domain_id):             # <<<<<<<<<<<<<<
5769  *                 continue
5770  *             # Note that this has to be our local index, not our in-file index.
5771  */
5772     }
5773 
5774     /* "yt/geometry/particle_deposit.pyx":110
5775  *                 continue
5776  *             # Note that this has to be our local index, not our in-file index.
5777  *             offset = dom_ind[oct.domain_ind - moff]             # <<<<<<<<<<<<<<
5778  *             if offset < 0: continue
5779  *             # Check that we found the oct ...
5780  */
5781     __pyx_t_27 = (__pyx_v_oct->domain_ind - __pyx_v_moff);
5782     __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dom_ind.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_dom_ind.diminfo[0].strides));
5783 
5784     /* "yt/geometry/particle_deposit.pyx":111
5785  *             # Note that this has to be our local index, not our in-file index.
5786  *             offset = dom_ind[oct.domain_ind - moff]
5787  *             if offset < 0: continue             # <<<<<<<<<<<<<<
5788  *             # Check that we found the oct ...
5789  *             self.process(dims, i, oi.left_edge, oi.dds,
5790  */
5791     __pyx_t_1 = ((__pyx_v_offset < 0) != 0);
5792     if (__pyx_t_1) {
5793       goto __pyx_L6_continue;
5794     }
5795 
5796     /* "yt/geometry/particle_deposit.pyx":113
5797  *             if offset < 0: continue
5798  *             # Check that we found the oct ...
5799  *             self.process(dims, i, oi.left_edge, oi.dds,             # <<<<<<<<<<<<<<
5800  *                          offset, pos, field_vals, oct.domain_ind)
5801  *             if self.update_values == 1:
5802  */
5803     __pyx_t_16 = ((struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self->__pyx_vtab)->process(__pyx_v_self, __pyx_v_dims, __pyx_v_i, __pyx_v_oi.left_edge, __pyx_v_oi.dds, __pyx_v_offset, __pyx_v_pos, __pyx_v_field_vals, __pyx_v_oct->domain_ind); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(1, 113, __pyx_L1_error)
5804 
5805     /* "yt/geometry/particle_deposit.pyx":115
5806  *             self.process(dims, i, oi.left_edge, oi.dds,
5807  *                          offset, pos, field_vals, oct.domain_ind)
5808  *             if self.update_values == 1:             # <<<<<<<<<<<<<<
5809  *                 for j in range(nf):
5810  *                     field_pointers[j][i] = field_vals[j]
5811  */
5812     __pyx_t_1 = ((__pyx_v_self->update_values == 1) != 0);
5813     if (__pyx_t_1) {
5814 
5815       /* "yt/geometry/particle_deposit.pyx":116
5816  *                          offset, pos, field_vals, oct.domain_ind)
5817  *             if self.update_values == 1:
5818  *                 for j in range(nf):             # <<<<<<<<<<<<<<
5819  *                     field_pointers[j][i] = field_vals[j]
5820  *
5821  */
5822       __pyx_t_16 = __pyx_v_nf;
5823       __pyx_t_17 = __pyx_t_16;
5824       for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
5825         __pyx_v_j = __pyx_t_18;
5826 
5827         /* "yt/geometry/particle_deposit.pyx":117
5828  *             if self.update_values == 1:
5829  *                 for j in range(nf):
5830  *                     field_pointers[j][i] = field_vals[j]             # <<<<<<<<<<<<<<
5831  *
5832  *     @cython.boundscheck(False)
5833  */
5834         __pyx_t_28 = __pyx_v_j;
5835         if (unlikely(!__pyx_v_field_pointers.memview)) { __Pyx_RaiseUnboundLocalError("field_pointers"); __PYX_ERR(1, 117, __pyx_L1_error) }
5836         __pyx_t_29 = __pyx_v_j;
5837         __pyx_t_30 = __pyx_v_i;
5838         *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (*((char **) (__pyx_v_field_pointers.data + __pyx_t_29 * __pyx_v_field_pointers.strides[0])) + __pyx_v_field_pointers.suboffsets[0]) )) + __pyx_t_30)) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_field_vals.data + __pyx_t_28 * __pyx_v_field_vals.strides[0]) )));
5839       }
5840 
5841       /* "yt/geometry/particle_deposit.pyx":115
5842  *             self.process(dims, i, oi.left_edge, oi.dds,
5843  *                          offset, pos, field_vals, oct.domain_ind)
5844  *             if self.update_values == 1:             # <<<<<<<<<<<<<<
5845  *                 for j in range(nf):
5846  *                     field_pointers[j][i] = field_vals[j]
5847  */
5848     }
5849     __pyx_L6_continue:;
5850   }
5851 
5852   /* "yt/geometry/particle_deposit.pyx":52
5853  *     @cython.boundscheck(False)
5854  *     @cython.wraparound(False)
5855  *     def process_octree(self, OctreeContainer octree,             # <<<<<<<<<<<<<<
5856  *                      np.ndarray[np.int64_t, ndim=1] dom_ind,
5857  *                      np.ndarray[np.float64_t, ndim=2] positions,
5858  */
5859 
5860   /* function exit code */
5861   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5862   goto __pyx_L0;
5863   __pyx_L1_error:;
5864   __Pyx_XDECREF(__pyx_t_3);
5865   __Pyx_XDECREF(__pyx_t_5);
5866   __Pyx_XDECREF(__pyx_t_6);
5867   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
5868   __Pyx_XDECREF(__pyx_t_8);
5869   __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
5870   __Pyx_XDECREF(__pyx_t_11);
5871   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
5872     __Pyx_PyThreadState_declare
5873     __Pyx_PyThreadState_assign
5874     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
5875     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dom_ind.rcbuffer->pybuffer);
5876     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer);
5877     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_positions.rcbuffer->pybuffer);
5878   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
5879   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.process_octree", __pyx_clineno, __pyx_lineno, __pyx_filename);
5880   __pyx_r = NULL;
5881   goto __pyx_L2;
5882   __pyx_L0:;
5883   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dom_ind.rcbuffer->pybuffer);
5884   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvlmaxval.rcbuffer->pybuffer);
5885   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_positions.rcbuffer->pybuffer);
5886   __pyx_L2:;
5887   __PYX_XDEC_MEMVIEW(&__pyx_v_field_pointers, 1);
5888   __PYX_XDEC_MEMVIEW(&__pyx_v_field_vals, 1);
5889   __Pyx_XDECREF((PyObject *)__pyx_v_lvlmaxval);
5890   __Pyx_XDECREF(__pyx_v_fields);
5891   __Pyx_XDECREF(__pyx_v_lvlmax);
5892   __Pyx_XGIVEREF(__pyx_r);
5893   __Pyx_RefNannyFinishContext();
5894   return __pyx_r;
5895 }
5896 
5897 /* "yt/geometry/particle_deposit.pyx":121
5898  *     @cython.boundscheck(False)
5899  *     @cython.wraparound(False)
5900  *     def process_grid(self, gobj,             # <<<<<<<<<<<<<<
5901  *                      np.ndarray[np.float64_t, ndim=2] positions,
5902  *                      fields = None):
5903  */
5904 
5905 /* Python wrapper */
5906 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_9process_grid(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_9process_grid(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)5907 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_9process_grid(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5908   PyObject *__pyx_v_gobj = 0;
5909   PyArrayObject *__pyx_v_positions = 0;
5910   PyObject *__pyx_v_fields = 0;
5911   PyObject *__pyx_r = 0;
5912   __Pyx_RefNannyDeclarations
5913   __Pyx_RefNannySetupContext("process_grid (wrapper)", 0);
5914   {
5915     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gobj,&__pyx_n_s_positions,&__pyx_n_s_fields,0};
5916     PyObject* values[3] = {0,0,0};
5917 
5918     /* "yt/geometry/particle_deposit.pyx":123
5919  *     def process_grid(self, gobj,
5920  *                      np.ndarray[np.float64_t, ndim=2] positions,
5921  *                      fields = None):             # <<<<<<<<<<<<<<
5922  *         cdef int nf, i, j
5923  *         if fields is None:
5924  */
5925     values[2] = ((PyObject *)Py_None);
5926     if (unlikely(__pyx_kwds)) {
5927       Py_ssize_t kw_args;
5928       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5929       switch (pos_args) {
5930         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5931         CYTHON_FALLTHROUGH;
5932         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5933         CYTHON_FALLTHROUGH;
5934         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5935         CYTHON_FALLTHROUGH;
5936         case  0: break;
5937         default: goto __pyx_L5_argtuple_error;
5938       }
5939       kw_args = PyDict_Size(__pyx_kwds);
5940       switch (pos_args) {
5941         case  0:
5942         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gobj)) != 0)) kw_args--;
5943         else goto __pyx_L5_argtuple_error;
5944         CYTHON_FALLTHROUGH;
5945         case  1:
5946         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_positions)) != 0)) kw_args--;
5947         else {
5948           __Pyx_RaiseArgtupleInvalid("process_grid", 0, 2, 3, 1); __PYX_ERR(1, 121, __pyx_L3_error)
5949         }
5950         CYTHON_FALLTHROUGH;
5951         case  2:
5952         if (kw_args > 0) {
5953           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fields);
5954           if (value) { values[2] = value; kw_args--; }
5955         }
5956       }
5957       if (unlikely(kw_args > 0)) {
5958         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process_grid") < 0)) __PYX_ERR(1, 121, __pyx_L3_error)
5959       }
5960     } else {
5961       switch (PyTuple_GET_SIZE(__pyx_args)) {
5962         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5963         CYTHON_FALLTHROUGH;
5964         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5965         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5966         break;
5967         default: goto __pyx_L5_argtuple_error;
5968       }
5969     }
5970     __pyx_v_gobj = values[0];
5971     __pyx_v_positions = ((PyArrayObject *)values[1]);
5972     __pyx_v_fields = values[2];
5973   }
5974   goto __pyx_L4_argument_unpacking_done;
5975   __pyx_L5_argtuple_error:;
5976   __Pyx_RaiseArgtupleInvalid("process_grid", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 121, __pyx_L3_error)
5977   __pyx_L3_error:;
5978   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.process_grid", __pyx_clineno, __pyx_lineno, __pyx_filename);
5979   __Pyx_RefNannyFinishContext();
5980   return NULL;
5981   __pyx_L4_argument_unpacking_done:;
5982   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_positions), __pyx_ptype_5numpy_ndarray, 1, "positions", 0))) __PYX_ERR(1, 122, __pyx_L1_error)
5983   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_8process_grid(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), __pyx_v_gobj, __pyx_v_positions, __pyx_v_fields);
5984 
5985   /* "yt/geometry/particle_deposit.pyx":121
5986  *     @cython.boundscheck(False)
5987  *     @cython.wraparound(False)
5988  *     def process_grid(self, gobj,             # <<<<<<<<<<<<<<
5989  *                      np.ndarray[np.float64_t, ndim=2] positions,
5990  *                      fields = None):
5991  */
5992 
5993   /* function exit code */
5994   goto __pyx_L0;
5995   __pyx_L1_error:;
5996   __pyx_r = NULL;
5997   __pyx_L0:;
5998   __Pyx_RefNannyFinishContext();
5999   return __pyx_r;
6000 }
6001 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_8process_grid(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,PyObject * __pyx_v_gobj,PyArrayObject * __pyx_v_positions,PyObject * __pyx_v_fields)6002 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_8process_grid(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_gobj, PyArrayObject *__pyx_v_positions, PyObject *__pyx_v_fields) {
6003   int __pyx_v_nf;
6004   int __pyx_v_i;
6005   int __pyx_v_j;
6006   __Pyx_memviewslice __pyx_v_field_vals = { 0, 0, { 0 }, { 0 }, { 0 } };
6007   __Pyx_memviewslice __pyx_v_field_pointers = { 0, 0, { 0 }, { 0 }, { 0 } };
6008   __pyx_t_5numpy_float64_t __pyx_v_pos[3];
6009   __pyx_t_5numpy_int64_t __pyx_v_gid;
6010   __pyx_t_5numpy_float64_t __pyx_v_dds[3];
6011   __pyx_t_5numpy_float64_t __pyx_v_left_edge[3];
6012   __pyx_t_5numpy_float64_t __pyx_v_right_edge[3];
6013   int __pyx_v_dims[3];
6014   int __pyx_v_continue_loop;
6015   __Pyx_LocalBuf_ND __pyx_pybuffernd_positions;
6016   __Pyx_Buffer __pyx_pybuffer_positions;
6017   PyObject *__pyx_r = NULL;
6018   __Pyx_RefNannyDeclarations
6019   int __pyx_t_1;
6020   int __pyx_t_2;
6021   PyObject *__pyx_t_3 = NULL;
6022   Py_ssize_t __pyx_t_4;
6023   PyObject *__pyx_t_5 = NULL;
6024   PyObject *__pyx_t_6 = NULL;
6025   PyObject *__pyx_t_7 = NULL;
6026   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
6027   __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
6028   __pyx_t_5numpy_int64_t __pyx_t_10;
6029   int __pyx_t_11;
6030   __pyx_t_5numpy_float64_t __pyx_t_12;
6031   int __pyx_t_13;
6032   npy_intp __pyx_t_14;
6033   npy_intp __pyx_t_15;
6034   int __pyx_t_16;
6035   int __pyx_t_17;
6036   Py_ssize_t __pyx_t_18;
6037   Py_ssize_t __pyx_t_19;
6038   Py_ssize_t __pyx_t_20;
6039   Py_ssize_t __pyx_t_21;
6040   Py_ssize_t __pyx_t_22;
6041   Py_ssize_t __pyx_t_23;
6042   Py_ssize_t __pyx_t_24;
6043   Py_ssize_t __pyx_t_25;
6044   __Pyx_RefNannySetupContext("process_grid", 0);
6045   __Pyx_INCREF(__pyx_v_fields);
6046   __pyx_pybuffer_positions.pybuffer.buf = NULL;
6047   __pyx_pybuffer_positions.refcount = 0;
6048   __pyx_pybuffernd_positions.data = NULL;
6049   __pyx_pybuffernd_positions.rcbuffer = &__pyx_pybuffer_positions;
6050   {
6051     __Pyx_BufFmt_StackElem __pyx_stack[1];
6052     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_positions.rcbuffer->pybuffer, (PyObject*)__pyx_v_positions, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(1, 121, __pyx_L1_error)
6053   }
6054   __pyx_pybuffernd_positions.diminfo[0].strides = __pyx_pybuffernd_positions.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_positions.diminfo[0].shape = __pyx_pybuffernd_positions.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_positions.diminfo[1].strides = __pyx_pybuffernd_positions.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_positions.diminfo[1].shape = __pyx_pybuffernd_positions.rcbuffer->pybuffer.shape[1];
6055 
6056   /* "yt/geometry/particle_deposit.pyx":125
6057  *                      fields = None):
6058  *         cdef int nf, i, j
6059  *         if fields is None:             # <<<<<<<<<<<<<<
6060  *             fields = []
6061  *         nf = len(fields)
6062  */
6063   __pyx_t_1 = (__pyx_v_fields == Py_None);
6064   __pyx_t_2 = (__pyx_t_1 != 0);
6065   if (__pyx_t_2) {
6066 
6067     /* "yt/geometry/particle_deposit.pyx":126
6068  *         cdef int nf, i, j
6069  *         if fields is None:
6070  *             fields = []             # <<<<<<<<<<<<<<
6071  *         nf = len(fields)
6072  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")
6073  */
6074     __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 126, __pyx_L1_error)
6075     __Pyx_GOTREF(__pyx_t_3);
6076     __Pyx_DECREF_SET(__pyx_v_fields, __pyx_t_3);
6077     __pyx_t_3 = 0;
6078 
6079     /* "yt/geometry/particle_deposit.pyx":125
6080  *                      fields = None):
6081  *         cdef int nf, i, j
6082  *         if fields is None:             # <<<<<<<<<<<<<<
6083  *             fields = []
6084  *         nf = len(fields)
6085  */
6086   }
6087 
6088   /* "yt/geometry/particle_deposit.pyx":127
6089  *         if fields is None:
6090  *             fields = []
6091  *         nf = len(fields)             # <<<<<<<<<<<<<<
6092  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")
6093  *         cdef np.float64_t[::cython.view.indirect, ::1] field_pointers
6094  */
6095   __pyx_t_4 = PyObject_Length(__pyx_v_fields); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 127, __pyx_L1_error)
6096   __pyx_v_nf = __pyx_t_4;
6097 
6098   /* "yt/geometry/particle_deposit.pyx":128
6099  *             fields = []
6100  *         nf = len(fields)
6101  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")             # <<<<<<<<<<<<<<
6102  *         cdef np.float64_t[::cython.view.indirect, ::1] field_pointers
6103  *         if nf > 0: field_pointers = OnceIndirect(fields)
6104  */
6105   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 128, __pyx_L1_error)
6106   __Pyx_GOTREF(__pyx_t_3);
6107   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 128, __pyx_L1_error)
6108   __Pyx_GOTREF(__pyx_t_5);
6109   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6110   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nf); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 128, __pyx_L1_error)
6111   __Pyx_GOTREF(__pyx_t_3);
6112   __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 128, __pyx_L1_error)
6113   __Pyx_GOTREF(__pyx_t_6);
6114   __Pyx_GIVEREF(__pyx_t_3);
6115   PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
6116   __pyx_t_3 = 0;
6117   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 128, __pyx_L1_error)
6118   __Pyx_GOTREF(__pyx_t_3);
6119   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 128, __pyx_L1_error)
6120   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 128, __pyx_L1_error)
6121   __Pyx_GOTREF(__pyx_t_7);
6122   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6123   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6124   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6125   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(1, 128, __pyx_L1_error)
6126   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6127   __pyx_v_field_vals = __pyx_t_8;
6128   __pyx_t_8.memview = NULL;
6129   __pyx_t_8.data = NULL;
6130 
6131   /* "yt/geometry/particle_deposit.pyx":130
6132  *         cdef np.float64_t[:] field_vals = np.empty(nf, dtype="float64")
6133  *         cdef np.float64_t[::cython.view.indirect, ::1] field_pointers
6134  *         if nf > 0: field_pointers = OnceIndirect(fields)             # <<<<<<<<<<<<<<
6135  *         cdef np.float64_t pos[3]
6136  *         cdef np.int64_t gid = getattr(gobj, "id", -1)
6137  */
6138   __pyx_t_2 = ((__pyx_v_nf > 0) != 0);
6139   if (__pyx_t_2) {
6140     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_OnceIndirect); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 130, __pyx_L1_error)
6141     __Pyx_GOTREF(__pyx_t_3);
6142     __pyx_t_6 = NULL;
6143     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6144       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
6145       if (likely(__pyx_t_6)) {
6146         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6147         __Pyx_INCREF(__pyx_t_6);
6148         __Pyx_INCREF(function);
6149         __Pyx_DECREF_SET(__pyx_t_3, function);
6150       }
6151     }
6152     __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_fields) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_fields);
6153     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6154     if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 130, __pyx_L1_error)
6155     __Pyx_GOTREF(__pyx_t_7);
6156     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6157     __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_psdc_nn___pyx_t_5numpy_float64_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(1, 130, __pyx_L1_error)
6158     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6159     __pyx_v_field_pointers = __pyx_t_9;
6160     __pyx_t_9.memview = NULL;
6161     __pyx_t_9.data = NULL;
6162   }
6163 
6164   /* "yt/geometry/particle_deposit.pyx":132
6165  *         if nf > 0: field_pointers = OnceIndirect(fields)
6166  *         cdef np.float64_t pos[3]
6167  *         cdef np.int64_t gid = getattr(gobj, "id", -1)             # <<<<<<<<<<<<<<
6168  *         cdef np.float64_t dds[3]
6169  *         cdef np.float64_t left_edge[3]
6170  */
6171   __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_gobj, __pyx_n_s_id, __pyx_int_neg_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 132, __pyx_L1_error)
6172   __Pyx_GOTREF(__pyx_t_7);
6173   __pyx_t_10 = __Pyx_PyInt_As_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L1_error)
6174   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6175   __pyx_v_gid = __pyx_t_10;
6176 
6177   /* "yt/geometry/particle_deposit.pyx":137
6178  *         cdef np.float64_t right_edge[3]
6179  *         cdef int dims[3]
6180  *         for i in range(3):             # <<<<<<<<<<<<<<
6181  *             dds[i] = gobj.dds[i]
6182  *             left_edge[i] = gobj.LeftEdge[i]
6183  */
6184   for (__pyx_t_11 = 0; __pyx_t_11 < 3; __pyx_t_11+=1) {
6185     __pyx_v_i = __pyx_t_11;
6186 
6187     /* "yt/geometry/particle_deposit.pyx":138
6188  *         cdef int dims[3]
6189  *         for i in range(3):
6190  *             dds[i] = gobj.dds[i]             # <<<<<<<<<<<<<<
6191  *             left_edge[i] = gobj.LeftEdge[i]
6192  *             right_edge[i] = gobj.RightEdge[i]
6193  */
6194     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gobj, __pyx_n_s_dds); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 138, __pyx_L1_error)
6195     __Pyx_GOTREF(__pyx_t_7);
6196     __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error)
6197     __Pyx_GOTREF(__pyx_t_3);
6198     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6199     __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_12 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 138, __pyx_L1_error)
6200     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6201     (__pyx_v_dds[__pyx_v_i]) = __pyx_t_12;
6202 
6203     /* "yt/geometry/particle_deposit.pyx":139
6204  *         for i in range(3):
6205  *             dds[i] = gobj.dds[i]
6206  *             left_edge[i] = gobj.LeftEdge[i]             # <<<<<<<<<<<<<<
6207  *             right_edge[i] = gobj.RightEdge[i]
6208  *             dims[i] = gobj.ActiveDimensions[i]
6209  */
6210     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gobj, __pyx_n_s_LeftEdge); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)
6211     __Pyx_GOTREF(__pyx_t_3);
6212     __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 139, __pyx_L1_error)
6213     __Pyx_GOTREF(__pyx_t_7);
6214     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6215     __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_12 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 139, __pyx_L1_error)
6216     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6217     (__pyx_v_left_edge[__pyx_v_i]) = __pyx_t_12;
6218 
6219     /* "yt/geometry/particle_deposit.pyx":140
6220  *             dds[i] = gobj.dds[i]
6221  *             left_edge[i] = gobj.LeftEdge[i]
6222  *             right_edge[i] = gobj.RightEdge[i]             # <<<<<<<<<<<<<<
6223  *             dims[i] = gobj.ActiveDimensions[i]
6224  *         for i in range(positions.shape[0]):
6225  */
6226     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gobj, __pyx_n_s_RightEdge); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 140, __pyx_L1_error)
6227     __Pyx_GOTREF(__pyx_t_7);
6228     __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 140, __pyx_L1_error)
6229     __Pyx_GOTREF(__pyx_t_3);
6230     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6231     __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_12 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 140, __pyx_L1_error)
6232     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6233     (__pyx_v_right_edge[__pyx_v_i]) = __pyx_t_12;
6234 
6235     /* "yt/geometry/particle_deposit.pyx":141
6236  *             left_edge[i] = gobj.LeftEdge[i]
6237  *             right_edge[i] = gobj.RightEdge[i]
6238  *             dims[i] = gobj.ActiveDimensions[i]             # <<<<<<<<<<<<<<
6239  *         for i in range(positions.shape[0]):
6240  *             # Now we process
6241  */
6242     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gobj, __pyx_n_s_ActiveDimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 141, __pyx_L1_error)
6243     __Pyx_GOTREF(__pyx_t_3);
6244     __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 141, __pyx_L1_error)
6245     __Pyx_GOTREF(__pyx_t_7);
6246     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6247     __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error)
6248     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6249     (__pyx_v_dims[__pyx_v_i]) = __pyx_t_13;
6250   }
6251 
6252   /* "yt/geometry/particle_deposit.pyx":142
6253  *             right_edge[i] = gobj.RightEdge[i]
6254  *             dims[i] = gobj.ActiveDimensions[i]
6255  *         for i in range(positions.shape[0]):             # <<<<<<<<<<<<<<
6256  *             # Now we process
6257  *             for j in range(nf):
6258  */
6259   __pyx_t_14 = (__pyx_v_positions->dimensions[0]);
6260   __pyx_t_15 = __pyx_t_14;
6261   for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_15; __pyx_t_11+=1) {
6262     __pyx_v_i = __pyx_t_11;
6263 
6264     /* "yt/geometry/particle_deposit.pyx":144
6265  *         for i in range(positions.shape[0]):
6266  *             # Now we process
6267  *             for j in range(nf):             # <<<<<<<<<<<<<<
6268  *                 field_vals[j] = field_pointers[j,i]
6269  *             for j in range(3):
6270  */
6271     __pyx_t_13 = __pyx_v_nf;
6272     __pyx_t_16 = __pyx_t_13;
6273     for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
6274       __pyx_v_j = __pyx_t_17;
6275 
6276       /* "yt/geometry/particle_deposit.pyx":145
6277  *             # Now we process
6278  *             for j in range(nf):
6279  *                 field_vals[j] = field_pointers[j,i]             # <<<<<<<<<<<<<<
6280  *             for j in range(3):
6281  *                 pos[j] = positions[i, j]
6282  */
6283       if (unlikely(!__pyx_v_field_pointers.memview)) { __Pyx_RaiseUnboundLocalError("field_pointers"); __PYX_ERR(1, 145, __pyx_L1_error) }
6284       __pyx_t_18 = __pyx_v_j;
6285       __pyx_t_19 = __pyx_v_i;
6286       __pyx_t_20 = __pyx_v_j;
6287       *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_field_vals.data + __pyx_t_20 * __pyx_v_field_vals.strides[0]) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (*((char **) (__pyx_v_field_pointers.data + __pyx_t_18 * __pyx_v_field_pointers.strides[0])) + __pyx_v_field_pointers.suboffsets[0]) )) + __pyx_t_19)) )));
6288     }
6289 
6290     /* "yt/geometry/particle_deposit.pyx":146
6291  *             for j in range(nf):
6292  *                 field_vals[j] = field_pointers[j,i]
6293  *             for j in range(3):             # <<<<<<<<<<<<<<
6294  *                 pos[j] = positions[i, j]
6295  *             continue_loop = False
6296  */
6297     for (__pyx_t_13 = 0; __pyx_t_13 < 3; __pyx_t_13+=1) {
6298       __pyx_v_j = __pyx_t_13;
6299 
6300       /* "yt/geometry/particle_deposit.pyx":147
6301  *                 field_vals[j] = field_pointers[j,i]
6302  *             for j in range(3):
6303  *                 pos[j] = positions[i, j]             # <<<<<<<<<<<<<<
6304  *             continue_loop = False
6305  *             for j in range(3):
6306  */
6307       __pyx_t_21 = __pyx_v_i;
6308       __pyx_t_22 = __pyx_v_j;
6309       (__pyx_v_pos[__pyx_v_j]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_positions.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_positions.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_positions.diminfo[1].strides));
6310     }
6311 
6312     /* "yt/geometry/particle_deposit.pyx":148
6313  *             for j in range(3):
6314  *                 pos[j] = positions[i, j]
6315  *             continue_loop = False             # <<<<<<<<<<<<<<
6316  *             for j in range(3):
6317  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:
6318  */
6319     __pyx_v_continue_loop = 0;
6320 
6321     /* "yt/geometry/particle_deposit.pyx":149
6322  *                 pos[j] = positions[i, j]
6323  *             continue_loop = False
6324  *             for j in range(3):             # <<<<<<<<<<<<<<
6325  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:
6326  *                     continue_loop = True
6327  */
6328     for (__pyx_t_13 = 0; __pyx_t_13 < 3; __pyx_t_13+=1) {
6329       __pyx_v_j = __pyx_t_13;
6330 
6331       /* "yt/geometry/particle_deposit.pyx":150
6332  *             continue_loop = False
6333  *             for j in range(3):
6334  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:             # <<<<<<<<<<<<<<
6335  *                     continue_loop = True
6336  *             if continue_loop:
6337  */
6338       __pyx_t_1 = (((__pyx_v_pos[__pyx_v_j]) < (__pyx_v_left_edge[__pyx_v_j])) != 0);
6339       if (!__pyx_t_1) {
6340       } else {
6341         __pyx_t_2 = __pyx_t_1;
6342         goto __pyx_L16_bool_binop_done;
6343       }
6344       __pyx_t_1 = (((__pyx_v_pos[__pyx_v_j]) > (__pyx_v_right_edge[__pyx_v_j])) != 0);
6345       __pyx_t_2 = __pyx_t_1;
6346       __pyx_L16_bool_binop_done:;
6347       if (__pyx_t_2) {
6348 
6349         /* "yt/geometry/particle_deposit.pyx":151
6350  *             for j in range(3):
6351  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:
6352  *                     continue_loop = True             # <<<<<<<<<<<<<<
6353  *             if continue_loop:
6354  *                 continue
6355  */
6356         __pyx_v_continue_loop = 1;
6357 
6358         /* "yt/geometry/particle_deposit.pyx":150
6359  *             continue_loop = False
6360  *             for j in range(3):
6361  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:             # <<<<<<<<<<<<<<
6362  *                     continue_loop = True
6363  *             if continue_loop:
6364  */
6365       }
6366     }
6367 
6368     /* "yt/geometry/particle_deposit.pyx":152
6369  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:
6370  *                     continue_loop = True
6371  *             if continue_loop:             # <<<<<<<<<<<<<<
6372  *                 continue
6373  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)
6374  */
6375     __pyx_t_2 = (__pyx_v_continue_loop != 0);
6376     if (__pyx_t_2) {
6377 
6378       /* "yt/geometry/particle_deposit.pyx":153
6379  *                     continue_loop = True
6380  *             if continue_loop:
6381  *                 continue             # <<<<<<<<<<<<<<
6382  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)
6383  *             if self.update_values == 1:
6384  */
6385       goto __pyx_L7_continue;
6386 
6387       /* "yt/geometry/particle_deposit.pyx":152
6388  *                 if pos[j] < left_edge[j] or pos[j] > right_edge[j]:
6389  *                     continue_loop = True
6390  *             if continue_loop:             # <<<<<<<<<<<<<<
6391  *                 continue
6392  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)
6393  */
6394     }
6395 
6396     /* "yt/geometry/particle_deposit.pyx":154
6397  *             if continue_loop:
6398  *                 continue
6399  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)             # <<<<<<<<<<<<<<
6400  *             if self.update_values == 1:
6401  *                 for j in range(nf):
6402  */
6403     __pyx_t_13 = ((struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self->__pyx_vtab)->process(__pyx_v_self, __pyx_v_dims, __pyx_v_i, __pyx_v_left_edge, __pyx_v_dds, 0, __pyx_v_pos, __pyx_v_field_vals, __pyx_v_gid); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 154, __pyx_L1_error)
6404 
6405     /* "yt/geometry/particle_deposit.pyx":155
6406  *                 continue
6407  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)
6408  *             if self.update_values == 1:             # <<<<<<<<<<<<<<
6409  *                 for j in range(nf):
6410  *                     field_pointers[j][i] = field_vals[j]
6411  */
6412     __pyx_t_2 = ((__pyx_v_self->update_values == 1) != 0);
6413     if (__pyx_t_2) {
6414 
6415       /* "yt/geometry/particle_deposit.pyx":156
6416  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)
6417  *             if self.update_values == 1:
6418  *                 for j in range(nf):             # <<<<<<<<<<<<<<
6419  *                     field_pointers[j][i] = field_vals[j]
6420  *
6421  */
6422       __pyx_t_13 = __pyx_v_nf;
6423       __pyx_t_16 = __pyx_t_13;
6424       for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
6425         __pyx_v_j = __pyx_t_17;
6426 
6427         /* "yt/geometry/particle_deposit.pyx":157
6428  *             if self.update_values == 1:
6429  *                 for j in range(nf):
6430  *                     field_pointers[j][i] = field_vals[j]             # <<<<<<<<<<<<<<
6431  *
6432  *     cdef int process(self, int dim[3], int ipart, np.float64_t left_edge[3],
6433  */
6434         __pyx_t_23 = __pyx_v_j;
6435         if (unlikely(!__pyx_v_field_pointers.memview)) { __Pyx_RaiseUnboundLocalError("field_pointers"); __PYX_ERR(1, 157, __pyx_L1_error) }
6436         __pyx_t_24 = __pyx_v_j;
6437         __pyx_t_25 = __pyx_v_i;
6438         *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (*((char **) (__pyx_v_field_pointers.data + __pyx_t_24 * __pyx_v_field_pointers.strides[0])) + __pyx_v_field_pointers.suboffsets[0]) )) + __pyx_t_25)) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_field_vals.data + __pyx_t_23 * __pyx_v_field_vals.strides[0]) )));
6439       }
6440 
6441       /* "yt/geometry/particle_deposit.pyx":155
6442  *                 continue
6443  *             self.process(dims, i, left_edge, dds, 0, pos, field_vals, gid)
6444  *             if self.update_values == 1:             # <<<<<<<<<<<<<<
6445  *                 for j in range(nf):
6446  *                     field_pointers[j][i] = field_vals[j]
6447  */
6448     }
6449     __pyx_L7_continue:;
6450   }
6451 
6452   /* "yt/geometry/particle_deposit.pyx":121
6453  *     @cython.boundscheck(False)
6454  *     @cython.wraparound(False)
6455  *     def process_grid(self, gobj,             # <<<<<<<<<<<<<<
6456  *                      np.ndarray[np.float64_t, ndim=2] positions,
6457  *                      fields = None):
6458  */
6459 
6460   /* function exit code */
6461   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6462   goto __pyx_L0;
6463   __pyx_L1_error:;
6464   __Pyx_XDECREF(__pyx_t_3);
6465   __Pyx_XDECREF(__pyx_t_5);
6466   __Pyx_XDECREF(__pyx_t_6);
6467   __Pyx_XDECREF(__pyx_t_7);
6468   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
6469   __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
6470   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6471     __Pyx_PyThreadState_declare
6472     __Pyx_PyThreadState_assign
6473     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6474     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_positions.rcbuffer->pybuffer);
6475   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6476   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.process_grid", __pyx_clineno, __pyx_lineno, __pyx_filename);
6477   __pyx_r = NULL;
6478   goto __pyx_L2;
6479   __pyx_L0:;
6480   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_positions.rcbuffer->pybuffer);
6481   __pyx_L2:;
6482   __PYX_XDEC_MEMVIEW(&__pyx_v_field_vals, 1);
6483   __PYX_XDEC_MEMVIEW(&__pyx_v_field_pointers, 1);
6484   __Pyx_XDECREF(__pyx_v_fields);
6485   __Pyx_XGIVEREF(__pyx_r);
6486   __Pyx_RefNannyFinishContext();
6487   return __pyx_r;
6488 }
6489 
6490 /* "yt/geometry/particle_deposit.pyx":159
6491  *                     field_pointers[j][i] = field_vals[j]
6492  *
6493  *     cdef int process(self, int dim[3], int ipart, np.float64_t left_edge[3],             # <<<<<<<<<<<<<<
6494  *                      np.float64_t dds[3], np.int64_t offset,
6495  *                      np.float64_t ppos[3], np.float64_t[:] fields,
6496  */
6497 
__pyx_f_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_process(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,CYTHON_UNUSED __pyx_t_5numpy_float64_t * __pyx_v_left_edge,CYTHON_UNUSED __pyx_t_5numpy_float64_t * __pyx_v_dds,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_offset,CYTHON_UNUSED __pyx_t_5numpy_float64_t * __pyx_v_ppos,CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)6498 static int __pyx_f_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_process(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_left_edge, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_dds, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_offset, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_ppos, CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
6499   int __pyx_r;
6500   __Pyx_RefNannyDeclarations
6501   #ifdef WITH_THREAD
6502   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
6503   #endif
6504   __Pyx_RefNannySetupContext("process", 0);
6505   #ifdef WITH_THREAD
6506   __Pyx_PyGILState_Release(__pyx_gilstate_save);
6507   #endif
6508 
6509   /* "yt/geometry/particle_deposit.pyx":163
6510  *                      np.float64_t ppos[3], np.float64_t[:] fields,
6511  *                      np.int64_t domain_ind) nogil except -1:
6512  *         with gil:             # <<<<<<<<<<<<<<
6513  *             raise NotImplementedError
6514  *
6515  */
6516   /*try:*/ {
6517     {
6518         #ifdef WITH_THREAD
6519         PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
6520         #endif
6521         /*try:*/ {
6522 
6523           /* "yt/geometry/particle_deposit.pyx":164
6524  *                      np.int64_t domain_ind) nogil except -1:
6525  *         with gil:
6526  *             raise NotImplementedError             # <<<<<<<<<<<<<<
6527  *
6528  * cdef class CountParticles(ParticleDepositOperation):
6529  */
6530           __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
6531           __PYX_ERR(1, 164, __pyx_L7_error)
6532         }
6533 
6534         /* "yt/geometry/particle_deposit.pyx":163
6535  *                      np.float64_t ppos[3], np.float64_t[:] fields,
6536  *                      np.int64_t domain_ind) nogil except -1:
6537  *         with gil:             # <<<<<<<<<<<<<<
6538  *             raise NotImplementedError
6539  *
6540  */
6541         /*finally:*/ {
6542           __pyx_L7_error: {
6543             #ifdef WITH_THREAD
6544             __Pyx_PyGILState_Release(__pyx_gilstate_save);
6545             #endif
6546             goto __pyx_L4_error;
6547           }
6548         }
6549     }
6550   }
6551   /*finally:*/ {
6552     __pyx_L4_error: {
6553       #ifdef WITH_THREAD
6554       __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
6555       #endif
6556       goto __pyx_L1_error;
6557     }
6558   }
6559 
6560   /* "yt/geometry/particle_deposit.pyx":159
6561  *                     field_pointers[j][i] = field_vals[j]
6562  *
6563  *     cdef int process(self, int dim[3], int ipart, np.float64_t left_edge[3],             # <<<<<<<<<<<<<<
6564  *                      np.float64_t dds[3], np.int64_t offset,
6565  *                      np.float64_t ppos[3], np.float64_t[:] fields,
6566  */
6567 
6568   /* function exit code */
6569   __pyx_r = 0;
6570   goto __pyx_L0;
6571   __pyx_L1_error:;
6572   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
6573   __pyx_r = -1;
6574   __pyx_L0:;
6575   #ifdef WITH_THREAD
6576   __Pyx_PyGILState_Release(__pyx_gilstate_save);
6577   #endif
6578   return __pyx_r;
6579 }
6580 
6581 /* "yt/geometry/particle_deposit.pxd":142
6582  *     # We assume each will allocate and define their own temporary storage
6583  *     cdef kernel_func sph_kernel
6584  *     cdef public object nvals             # <<<<<<<<<<<<<<
6585  *     cdef public int update_values
6586  *     cdef int process(self, int dim[3], int ipart, np.float64_t left_edge[3],
6587  */
6588 
6589 /* Python wrapper */
6590 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_1__get__(PyObject * __pyx_v_self)6591 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_1__get__(PyObject *__pyx_v_self) {
6592   PyObject *__pyx_r = 0;
6593   __Pyx_RefNannyDeclarations
6594   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6595   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals___get__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self));
6596 
6597   /* function exit code */
6598   __Pyx_RefNannyFinishContext();
6599   return __pyx_r;
6600 }
6601 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self)6602 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self) {
6603   PyObject *__pyx_r = NULL;
6604   __Pyx_RefNannyDeclarations
6605   __Pyx_RefNannySetupContext("__get__", 0);
6606   __Pyx_XDECREF(__pyx_r);
6607   __Pyx_INCREF(__pyx_v_self->nvals);
6608   __pyx_r = __pyx_v_self->nvals;
6609   goto __pyx_L0;
6610 
6611   /* function exit code */
6612   __pyx_L0:;
6613   __Pyx_XGIVEREF(__pyx_r);
6614   __Pyx_RefNannyFinishContext();
6615   return __pyx_r;
6616 }
6617 
6618 /* Python wrapper */
6619 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6620 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6621   int __pyx_r;
6622   __Pyx_RefNannyDeclarations
6623   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6624   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_2__set__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6625 
6626   /* function exit code */
6627   __Pyx_RefNannyFinishContext();
6628   return __pyx_r;
6629 }
6630 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,PyObject * __pyx_v_value)6631 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_value) {
6632   int __pyx_r;
6633   __Pyx_RefNannyDeclarations
6634   __Pyx_RefNannySetupContext("__set__", 0);
6635   __Pyx_INCREF(__pyx_v_value);
6636   __Pyx_GIVEREF(__pyx_v_value);
6637   __Pyx_GOTREF(__pyx_v_self->nvals);
6638   __Pyx_DECREF(__pyx_v_self->nvals);
6639   __pyx_v_self->nvals = __pyx_v_value;
6640 
6641   /* function exit code */
6642   __pyx_r = 0;
6643   __Pyx_RefNannyFinishContext();
6644   return __pyx_r;
6645 }
6646 
6647 /* Python wrapper */
6648 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_5__del__(PyObject * __pyx_v_self)6649 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_5__del__(PyObject *__pyx_v_self) {
6650   int __pyx_r;
6651   __Pyx_RefNannyDeclarations
6652   __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6653   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_4__del__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self));
6654 
6655   /* function exit code */
6656   __Pyx_RefNannyFinishContext();
6657   return __pyx_r;
6658 }
6659 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_4__del__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self)6660 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_4__del__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self) {
6661   int __pyx_r;
6662   __Pyx_RefNannyDeclarations
6663   __Pyx_RefNannySetupContext("__del__", 0);
6664   __Pyx_INCREF(Py_None);
6665   __Pyx_GIVEREF(Py_None);
6666   __Pyx_GOTREF(__pyx_v_self->nvals);
6667   __Pyx_DECREF(__pyx_v_self->nvals);
6668   __pyx_v_self->nvals = Py_None;
6669 
6670   /* function exit code */
6671   __pyx_r = 0;
6672   __Pyx_RefNannyFinishContext();
6673   return __pyx_r;
6674 }
6675 
6676 /* "yt/geometry/particle_deposit.pxd":143
6677  *     cdef kernel_func sph_kernel
6678  *     cdef public object nvals
6679  *     cdef public int update_values             # <<<<<<<<<<<<<<
6680  *     cdef int process(self, int dim[3], int ipart, np.float64_t left_edge[3],
6681  *                      np.float64_t dds[3], np.int64_t offset,
6682  */
6683 
6684 /* Python wrapper */
6685 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_1__get__(PyObject * __pyx_v_self)6686 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_1__get__(PyObject *__pyx_v_self) {
6687   PyObject *__pyx_r = 0;
6688   __Pyx_RefNannyDeclarations
6689   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6690   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values___get__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self));
6691 
6692   /* function exit code */
6693   __Pyx_RefNannyFinishContext();
6694   return __pyx_r;
6695 }
6696 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self)6697 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self) {
6698   PyObject *__pyx_r = NULL;
6699   __Pyx_RefNannyDeclarations
6700   PyObject *__pyx_t_1 = NULL;
6701   __Pyx_RefNannySetupContext("__get__", 0);
6702   __Pyx_XDECREF(__pyx_r);
6703   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->update_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
6704   __Pyx_GOTREF(__pyx_t_1);
6705   __pyx_r = __pyx_t_1;
6706   __pyx_t_1 = 0;
6707   goto __pyx_L0;
6708 
6709   /* function exit code */
6710   __pyx_L1_error:;
6711   __Pyx_XDECREF(__pyx_t_1);
6712   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.update_values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6713   __pyx_r = NULL;
6714   __pyx_L0:;
6715   __Pyx_XGIVEREF(__pyx_r);
6716   __Pyx_RefNannyFinishContext();
6717   return __pyx_r;
6718 }
6719 
6720 /* Python wrapper */
6721 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6722 static int __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6723   int __pyx_r;
6724   __Pyx_RefNannyDeclarations
6725   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6726   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_2__set__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6727 
6728   /* function exit code */
6729   __Pyx_RefNannyFinishContext();
6730   return __pyx_r;
6731 }
6732 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,PyObject * __pyx_v_value)6733 static int __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, PyObject *__pyx_v_value) {
6734   int __pyx_r;
6735   __Pyx_RefNannyDeclarations
6736   int __pyx_t_1;
6737   __Pyx_RefNannySetupContext("__set__", 0);
6738   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
6739   __pyx_v_self->update_values = __pyx_t_1;
6740 
6741   /* function exit code */
6742   __pyx_r = 0;
6743   goto __pyx_L0;
6744   __pyx_L1_error:;
6745   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.update_values.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6746   __pyx_r = -1;
6747   __pyx_L0:;
6748   __Pyx_RefNannyFinishContext();
6749   return __pyx_r;
6750 }
6751 
6752 /* "(tree fragment)":1
6753  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
6754  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6755  * def __setstate_cython__(self, __pyx_state):
6756  */
6757 
6758 /* Python wrapper */
6759 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_11__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)6760 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6761   PyObject *__pyx_r = 0;
6762   __Pyx_RefNannyDeclarations
6763   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6764   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_10__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self));
6765 
6766   /* function exit code */
6767   __Pyx_RefNannyFinishContext();
6768   return __pyx_r;
6769 }
6770 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self)6771 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self) {
6772   PyObject *__pyx_r = NULL;
6773   __Pyx_RefNannyDeclarations
6774   PyObject *__pyx_t_1 = NULL;
6775   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
6776 
6777   /* "(tree fragment)":2
6778  * def __reduce_cython__(self):
6779  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
6780  * def __setstate_cython__(self, __pyx_state):
6781  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6782  */
6783   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
6784   __Pyx_GOTREF(__pyx_t_1);
6785   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6786   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6787   __PYX_ERR(2, 2, __pyx_L1_error)
6788 
6789   /* "(tree fragment)":1
6790  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
6791  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6792  * def __setstate_cython__(self, __pyx_state):
6793  */
6794 
6795   /* function exit code */
6796   __pyx_L1_error:;
6797   __Pyx_XDECREF(__pyx_t_1);
6798   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6799   __pyx_r = NULL;
6800   __Pyx_XGIVEREF(__pyx_r);
6801   __Pyx_RefNannyFinishContext();
6802   return __pyx_r;
6803 }
6804 
6805 /* "(tree fragment)":3
6806  * def __reduce_cython__(self):
6807  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6808  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
6809  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6810  */
6811 
6812 /* Python wrapper */
6813 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)6814 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
6815   PyObject *__pyx_r = 0;
6816   __Pyx_RefNannyDeclarations
6817   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
6818   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_12__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
6819 
6820   /* function exit code */
6821   __Pyx_RefNannyFinishContext();
6822   return __pyx_r;
6823 }
6824 
__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)6825 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
6826   PyObject *__pyx_r = NULL;
6827   __Pyx_RefNannyDeclarations
6828   PyObject *__pyx_t_1 = NULL;
6829   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
6830 
6831   /* "(tree fragment)":4
6832  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6833  * def __setstate_cython__(self, __pyx_state):
6834  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
6835  */
6836   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
6837   __Pyx_GOTREF(__pyx_t_1);
6838   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6839   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6840   __PYX_ERR(2, 4, __pyx_L1_error)
6841 
6842   /* "(tree fragment)":3
6843  * def __reduce_cython__(self):
6844  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6845  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
6846  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
6847  */
6848 
6849   /* function exit code */
6850   __pyx_L1_error:;
6851   __Pyx_XDECREF(__pyx_t_1);
6852   __Pyx_AddTraceback("yt.geometry.particle_deposit.ParticleDepositOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6853   __pyx_r = NULL;
6854   __Pyx_XGIVEREF(__pyx_r);
6855   __Pyx_RefNannyFinishContext();
6856   return __pyx_r;
6857 }
6858 
6859 /* "yt/geometry/particle_deposit.pyx":168
6860  * cdef class CountParticles(ParticleDepositOperation):
6861  *     cdef np.int64_t[:,:,:,:] count
6862  *     def initialize(self):             # <<<<<<<<<<<<<<
6863  *         # Create a numpy array accessible to python
6864  *         self.count = append_axes(
6865  */
6866 
6867 /* Python wrapper */
6868 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)6869 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6870   PyObject *__pyx_r = 0;
6871   __Pyx_RefNannyDeclarations
6872   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
6873   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *)__pyx_v_self));
6874 
6875   /* function exit code */
6876   __Pyx_RefNannyFinishContext();
6877   return __pyx_r;
6878 }
6879 
__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles * __pyx_v_self)6880 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self) {
6881   PyObject *__pyx_r = NULL;
6882   __Pyx_RefNannyDeclarations
6883   PyObject *__pyx_t_1 = NULL;
6884   PyObject *__pyx_t_2 = NULL;
6885   PyObject *__pyx_t_3 = NULL;
6886   PyObject *__pyx_t_4 = NULL;
6887   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
6888   __Pyx_RefNannySetupContext("initialize", 0);
6889 
6890   /* "yt/geometry/particle_deposit.pyx":171
6891  *         # Create a numpy array accessible to python
6892  *         self.count = append_axes(
6893  *             np.zeros(self.nvals, dtype="int64", order='F'), 4)             # <<<<<<<<<<<<<<
6894  *
6895  *     @cython.cdivision(True)
6896  */
6897   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 171, __pyx_L1_error)
6898   __Pyx_GOTREF(__pyx_t_1);
6899   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 171, __pyx_L1_error)
6900   __Pyx_GOTREF(__pyx_t_2);
6901   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6902   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 171, __pyx_L1_error)
6903   __Pyx_GOTREF(__pyx_t_1);
6904   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
6905   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
6906   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
6907   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 171, __pyx_L1_error)
6908   __Pyx_GOTREF(__pyx_t_3);
6909   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_int64) < 0) __PYX_ERR(1, 171, __pyx_L1_error)
6910   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 171, __pyx_L1_error)
6911   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 171, __pyx_L1_error)
6912   __Pyx_GOTREF(__pyx_t_4);
6913   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6914   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6915   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6916   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 171, __pyx_L1_error)
6917 
6918   /* "yt/geometry/particle_deposit.pyx":170
6919  *     def initialize(self):
6920  *         # Create a numpy array accessible to python
6921  *         self.count = append_axes(             # <<<<<<<<<<<<<<
6922  *             np.zeros(self.nvals, dtype="int64", order='F'), 4)
6923  *
6924  */
6925   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 170, __pyx_L1_error)
6926   __Pyx_GOTREF(__pyx_t_3);
6927   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6928   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_int64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 170, __pyx_L1_error)
6929   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6930   __PYX_XDEC_MEMVIEW(&__pyx_v_self->count, 0);
6931   __pyx_v_self->count = __pyx_t_5;
6932   __pyx_t_5.memview = NULL;
6933   __pyx_t_5.data = NULL;
6934 
6935   /* "yt/geometry/particle_deposit.pyx":168
6936  * cdef class CountParticles(ParticleDepositOperation):
6937  *     cdef np.int64_t[:,:,:,:] count
6938  *     def initialize(self):             # <<<<<<<<<<<<<<
6939  *         # Create a numpy array accessible to python
6940  *         self.count = append_axes(
6941  */
6942 
6943   /* function exit code */
6944   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6945   goto __pyx_L0;
6946   __pyx_L1_error:;
6947   __Pyx_XDECREF(__pyx_t_1);
6948   __Pyx_XDECREF(__pyx_t_2);
6949   __Pyx_XDECREF(__pyx_t_3);
6950   __Pyx_XDECREF(__pyx_t_4);
6951   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
6952   __Pyx_AddTraceback("yt.geometry.particle_deposit.CountParticles.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
6953   __pyx_r = NULL;
6954   __pyx_L0:;
6955   __Pyx_XGIVEREF(__pyx_r);
6956   __Pyx_RefNannyFinishContext();
6957   return __pyx_r;
6958 }
6959 
6960 /* "yt/geometry/particle_deposit.pyx":175
6961  *     @cython.cdivision(True)
6962  *     @cython.boundscheck(False)
6963  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
6964  *                      np.float64_t left_edge[3],
6965  *                      np.float64_t dds[3],
6966  */
6967 
__pyx_f_2yt_8geometry_16particle_deposit_14CountParticles_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)6968 static int __pyx_f_2yt_8geometry_16particle_deposit_14CountParticles_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
6969   int __pyx_v_ii[3];
6970   int __pyx_v_i;
6971   int __pyx_r;
6972   int __pyx_t_1;
6973   Py_ssize_t __pyx_t_2;
6974   Py_ssize_t __pyx_t_3;
6975   Py_ssize_t __pyx_t_4;
6976   __pyx_t_5numpy_int64_t __pyx_t_5;
6977 
6978   /* "yt/geometry/particle_deposit.pyx":186
6979  *         cdef int ii[3]
6980  *         cdef int i
6981  *         for i in range(3):             # <<<<<<<<<<<<<<
6982  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
6983  *         self.count[ii[2], ii[1], ii[0], offset] += 1
6984  */
6985   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
6986     __pyx_v_i = __pyx_t_1;
6987 
6988     /* "yt/geometry/particle_deposit.pyx":187
6989  *         cdef int i
6990  *         for i in range(3):
6991  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])             # <<<<<<<<<<<<<<
6992  *         self.count[ii[2], ii[1], ii[0], offset] += 1
6993  *         return 0
6994  */
6995     (__pyx_v_ii[__pyx_v_i]) = ((int)(((__pyx_v_ppos[__pyx_v_i]) - (__pyx_v_left_edge[__pyx_v_i])) / (__pyx_v_dds[__pyx_v_i])));
6996   }
6997 
6998   /* "yt/geometry/particle_deposit.pyx":188
6999  *         for i in range(3):
7000  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
7001  *         self.count[ii[2], ii[1], ii[0], offset] += 1             # <<<<<<<<<<<<<<
7002  *         return 0
7003  *
7004  */
7005   if (unlikely(!__pyx_v_self->count.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 188, __pyx_L1_error)}
7006   __pyx_t_2 = (__pyx_v_ii[2]);
7007   __pyx_t_3 = (__pyx_v_ii[1]);
7008   __pyx_t_4 = (__pyx_v_ii[0]);
7009   __pyx_t_5 = __pyx_v_offset;
7010   if (__pyx_t_2 < 0) __pyx_t_2 += __pyx_v_self->count.shape[0];
7011   if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_v_self->count.shape[1];
7012   if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_self->count.shape[2];
7013   if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_self->count.shape[3];
7014   *((__pyx_t_5numpy_int64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->count.data + __pyx_t_2 * __pyx_v_self->count.strides[0]) ) + __pyx_t_3 * __pyx_v_self->count.strides[1]) ) + __pyx_t_4 * __pyx_v_self->count.strides[2]) ) + __pyx_t_5 * __pyx_v_self->count.strides[3]) )) += 1;
7015 
7016   /* "yt/geometry/particle_deposit.pyx":189
7017  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
7018  *         self.count[ii[2], ii[1], ii[0], offset] += 1
7019  *         return 0             # <<<<<<<<<<<<<<
7020  *
7021  *     def finalize(self):
7022  */
7023   __pyx_r = 0;
7024   goto __pyx_L0;
7025 
7026   /* "yt/geometry/particle_deposit.pyx":175
7027  *     @cython.cdivision(True)
7028  *     @cython.boundscheck(False)
7029  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
7030  *                      np.float64_t left_edge[3],
7031  *                      np.float64_t dds[3],
7032  */
7033 
7034   /* function exit code */
7035   __pyx_L1_error:;
7036   {
7037     #ifdef WITH_THREAD
7038     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
7039     #endif
7040     __Pyx_AddTraceback("yt.geometry.particle_deposit.CountParticles.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
7041     #ifdef WITH_THREAD
7042     __Pyx_PyGILState_Release(__pyx_gilstate_save);
7043     #endif
7044   }
7045   __pyx_r = -1;
7046   __pyx_L0:;
7047   return __pyx_r;
7048 }
7049 
7050 /* "yt/geometry/particle_deposit.pyx":191
7051  *         return 0
7052  *
7053  *     def finalize(self):             # <<<<<<<<<<<<<<
7054  *         arr = np.asarray(self.count)
7055  *         arr.shape = self.nvals
7056  */
7057 
7058 /* Python wrapper */
7059 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7060 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7061   PyObject *__pyx_r = 0;
7062   __Pyx_RefNannyDeclarations
7063   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
7064   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *)__pyx_v_self));
7065 
7066   /* function exit code */
7067   __Pyx_RefNannyFinishContext();
7068   return __pyx_r;
7069 }
7070 
__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles * __pyx_v_self)7071 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self) {
7072   PyObject *__pyx_v_arr = NULL;
7073   PyObject *__pyx_r = NULL;
7074   __Pyx_RefNannyDeclarations
7075   PyObject *__pyx_t_1 = NULL;
7076   PyObject *__pyx_t_2 = NULL;
7077   PyObject *__pyx_t_3 = NULL;
7078   PyObject *__pyx_t_4 = NULL;
7079   __Pyx_RefNannySetupContext("finalize", 0);
7080 
7081   /* "yt/geometry/particle_deposit.pyx":192
7082  *
7083  *     def finalize(self):
7084  *         arr = np.asarray(self.count)             # <<<<<<<<<<<<<<
7085  *         arr.shape = self.nvals
7086  *         return arr.astype("float64")
7087  */
7088   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 192, __pyx_L1_error)
7089   __Pyx_GOTREF(__pyx_t_2);
7090   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error)
7091   __Pyx_GOTREF(__pyx_t_3);
7092   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7093   if (unlikely(!__pyx_v_self->count.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 192, __pyx_L1_error)}
7094   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->count, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 192, __pyx_L1_error)
7095   __Pyx_GOTREF(__pyx_t_2);
7096   __pyx_t_4 = NULL;
7097   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
7098     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
7099     if (likely(__pyx_t_4)) {
7100       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7101       __Pyx_INCREF(__pyx_t_4);
7102       __Pyx_INCREF(function);
7103       __Pyx_DECREF_SET(__pyx_t_3, function);
7104     }
7105   }
7106   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
7107   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7108   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7109   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error)
7110   __Pyx_GOTREF(__pyx_t_1);
7111   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7112   __pyx_v_arr = __pyx_t_1;
7113   __pyx_t_1 = 0;
7114 
7115   /* "yt/geometry/particle_deposit.pyx":193
7116  *     def finalize(self):
7117  *         arr = np.asarray(self.count)
7118  *         arr.shape = self.nvals             # <<<<<<<<<<<<<<
7119  *         return arr.astype("float64")
7120  *
7121  */
7122   __pyx_t_1 = __pyx_v_self->__pyx_base.nvals;
7123   __Pyx_INCREF(__pyx_t_1);
7124   if (__Pyx_PyObject_SetAttrStr(__pyx_v_arr, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(1, 193, __pyx_L1_error)
7125   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7126 
7127   /* "yt/geometry/particle_deposit.pyx":194
7128  *         arr = np.asarray(self.count)
7129  *         arr.shape = self.nvals
7130  *         return arr.astype("float64")             # <<<<<<<<<<<<<<
7131  *
7132  * deposit_count = CountParticles
7133  */
7134   __Pyx_XDECREF(__pyx_r);
7135   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 194, __pyx_L1_error)
7136   __Pyx_GOTREF(__pyx_t_3);
7137   __pyx_t_2 = NULL;
7138   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
7139     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
7140     if (likely(__pyx_t_2)) {
7141       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7142       __Pyx_INCREF(__pyx_t_2);
7143       __Pyx_INCREF(function);
7144       __Pyx_DECREF_SET(__pyx_t_3, function);
7145     }
7146   }
7147   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_float64) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_float64);
7148   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
7149   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error)
7150   __Pyx_GOTREF(__pyx_t_1);
7151   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7152   __pyx_r = __pyx_t_1;
7153   __pyx_t_1 = 0;
7154   goto __pyx_L0;
7155 
7156   /* "yt/geometry/particle_deposit.pyx":191
7157  *         return 0
7158  *
7159  *     def finalize(self):             # <<<<<<<<<<<<<<
7160  *         arr = np.asarray(self.count)
7161  *         arr.shape = self.nvals
7162  */
7163 
7164   /* function exit code */
7165   __pyx_L1_error:;
7166   __Pyx_XDECREF(__pyx_t_1);
7167   __Pyx_XDECREF(__pyx_t_2);
7168   __Pyx_XDECREF(__pyx_t_3);
7169   __Pyx_XDECREF(__pyx_t_4);
7170   __Pyx_AddTraceback("yt.geometry.particle_deposit.CountParticles.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
7171   __pyx_r = NULL;
7172   __pyx_L0:;
7173   __Pyx_XDECREF(__pyx_v_arr);
7174   __Pyx_XGIVEREF(__pyx_r);
7175   __Pyx_RefNannyFinishContext();
7176   return __pyx_r;
7177 }
7178 
7179 /* "(tree fragment)":1
7180  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
7181  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7182  * def __setstate_cython__(self, __pyx_state):
7183  */
7184 
7185 /* Python wrapper */
7186 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7187 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7188   PyObject *__pyx_r = 0;
7189   __Pyx_RefNannyDeclarations
7190   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7191   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *)__pyx_v_self));
7192 
7193   /* function exit code */
7194   __Pyx_RefNannyFinishContext();
7195   return __pyx_r;
7196 }
7197 
__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles * __pyx_v_self)7198 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self) {
7199   PyObject *__pyx_r = NULL;
7200   __Pyx_RefNannyDeclarations
7201   PyObject *__pyx_t_1 = NULL;
7202   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
7203 
7204   /* "(tree fragment)":2
7205  * def __reduce_cython__(self):
7206  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
7207  * def __setstate_cython__(self, __pyx_state):
7208  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7209  */
7210   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
7211   __Pyx_GOTREF(__pyx_t_1);
7212   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7213   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7214   __PYX_ERR(2, 2, __pyx_L1_error)
7215 
7216   /* "(tree fragment)":1
7217  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
7218  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7219  * def __setstate_cython__(self, __pyx_state):
7220  */
7221 
7222   /* function exit code */
7223   __pyx_L1_error:;
7224   __Pyx_XDECREF(__pyx_t_1);
7225   __Pyx_AddTraceback("yt.geometry.particle_deposit.CountParticles.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7226   __pyx_r = NULL;
7227   __Pyx_XGIVEREF(__pyx_r);
7228   __Pyx_RefNannyFinishContext();
7229   return __pyx_r;
7230 }
7231 
7232 /* "(tree fragment)":3
7233  * def __reduce_cython__(self):
7234  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7235  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
7236  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7237  */
7238 
7239 /* Python wrapper */
7240 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)7241 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7242   PyObject *__pyx_r = 0;
7243   __Pyx_RefNannyDeclarations
7244   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7245   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
7246 
7247   /* function exit code */
7248   __Pyx_RefNannyFinishContext();
7249   return __pyx_r;
7250 }
7251 
__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)7252 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CountParticles_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
7253   PyObject *__pyx_r = NULL;
7254   __Pyx_RefNannyDeclarations
7255   PyObject *__pyx_t_1 = NULL;
7256   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7257 
7258   /* "(tree fragment)":4
7259  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7260  * def __setstate_cython__(self, __pyx_state):
7261  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
7262  */
7263   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
7264   __Pyx_GOTREF(__pyx_t_1);
7265   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7266   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7267   __PYX_ERR(2, 4, __pyx_L1_error)
7268 
7269   /* "(tree fragment)":3
7270  * def __reduce_cython__(self):
7271  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7272  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
7273  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7274  */
7275 
7276   /* function exit code */
7277   __pyx_L1_error:;
7278   __Pyx_XDECREF(__pyx_t_1);
7279   __Pyx_AddTraceback("yt.geometry.particle_deposit.CountParticles.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7280   __pyx_r = NULL;
7281   __Pyx_XGIVEREF(__pyx_r);
7282   __Pyx_RefNannyFinishContext();
7283   return __pyx_r;
7284 }
7285 
7286 /* "yt/geometry/particle_deposit.pyx":205
7287  *     cdef np.float64_t[:,:,:,:] temp
7288  *
7289  *     def initialize(self):             # <<<<<<<<<<<<<<
7290  *         self.data = append_axes(
7291  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7292  */
7293 
7294 /* Python wrapper */
7295 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7296 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7297   PyObject *__pyx_r = 0;
7298   __Pyx_RefNannyDeclarations
7299   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
7300   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *)__pyx_v_self));
7301 
7302   /* function exit code */
7303   __Pyx_RefNannyFinishContext();
7304   return __pyx_r;
7305 }
7306 
__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth * __pyx_v_self)7307 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self) {
7308   PyObject *__pyx_r = NULL;
7309   __Pyx_RefNannyDeclarations
7310   PyObject *__pyx_t_1 = NULL;
7311   PyObject *__pyx_t_2 = NULL;
7312   PyObject *__pyx_t_3 = NULL;
7313   PyObject *__pyx_t_4 = NULL;
7314   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
7315   __Pyx_RefNannySetupContext("initialize", 0);
7316 
7317   /* "yt/geometry/particle_deposit.pyx":207
7318  *     def initialize(self):
7319  *         self.data = append_axes(
7320  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
7321  *         self.temp = append_axes(
7322  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7323  */
7324   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 207, __pyx_L1_error)
7325   __Pyx_GOTREF(__pyx_t_1);
7326   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 207, __pyx_L1_error)
7327   __Pyx_GOTREF(__pyx_t_2);
7328   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7329   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 207, __pyx_L1_error)
7330   __Pyx_GOTREF(__pyx_t_1);
7331   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
7332   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
7333   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
7334   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 207, __pyx_L1_error)
7335   __Pyx_GOTREF(__pyx_t_3);
7336   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 207, __pyx_L1_error)
7337   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 207, __pyx_L1_error)
7338   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 207, __pyx_L1_error)
7339   __Pyx_GOTREF(__pyx_t_4);
7340   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7341   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7342   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7343   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 207, __pyx_L1_error)
7344 
7345   /* "yt/geometry/particle_deposit.pyx":206
7346  *
7347  *     def initialize(self):
7348  *         self.data = append_axes(             # <<<<<<<<<<<<<<
7349  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7350  *         self.temp = append_axes(
7351  */
7352   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 206, __pyx_L1_error)
7353   __Pyx_GOTREF(__pyx_t_3);
7354   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7355   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 206, __pyx_L1_error)
7356   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7357   __PYX_XDEC_MEMVIEW(&__pyx_v_self->data, 0);
7358   __pyx_v_self->data = __pyx_t_5;
7359   __pyx_t_5.memview = NULL;
7360   __pyx_t_5.data = NULL;
7361 
7362   /* "yt/geometry/particle_deposit.pyx":209
7363  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7364  *         self.temp = append_axes(
7365  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
7366  *
7367  *     @cython.cdivision(True)
7368  */
7369   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 209, __pyx_L1_error)
7370   __Pyx_GOTREF(__pyx_t_3);
7371   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 209, __pyx_L1_error)
7372   __Pyx_GOTREF(__pyx_t_4);
7373   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7374   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 209, __pyx_L1_error)
7375   __Pyx_GOTREF(__pyx_t_3);
7376   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
7377   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
7378   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.nvals);
7379   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
7380   __Pyx_GOTREF(__pyx_t_1);
7381   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
7382   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
7383   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 209, __pyx_L1_error)
7384   __Pyx_GOTREF(__pyx_t_2);
7385   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7386   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7387   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7388   if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 209, __pyx_L1_error)
7389 
7390   /* "yt/geometry/particle_deposit.pyx":208
7391  *         self.data = append_axes(
7392  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7393  *         self.temp = append_axes(             # <<<<<<<<<<<<<<
7394  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7395  *
7396  */
7397   __pyx_t_1 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_2), 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 208, __pyx_L1_error)
7398   __Pyx_GOTREF(__pyx_t_1);
7399   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7400   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 208, __pyx_L1_error)
7401   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7402   __PYX_XDEC_MEMVIEW(&__pyx_v_self->temp, 0);
7403   __pyx_v_self->temp = __pyx_t_5;
7404   __pyx_t_5.memview = NULL;
7405   __pyx_t_5.data = NULL;
7406 
7407   /* "yt/geometry/particle_deposit.pyx":205
7408  *     cdef np.float64_t[:,:,:,:] temp
7409  *
7410  *     def initialize(self):             # <<<<<<<<<<<<<<
7411  *         self.data = append_axes(
7412  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
7413  */
7414 
7415   /* function exit code */
7416   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7417   goto __pyx_L0;
7418   __pyx_L1_error:;
7419   __Pyx_XDECREF(__pyx_t_1);
7420   __Pyx_XDECREF(__pyx_t_2);
7421   __Pyx_XDECREF(__pyx_t_3);
7422   __Pyx_XDECREF(__pyx_t_4);
7423   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
7424   __Pyx_AddTraceback("yt.geometry.particle_deposit.SimpleSmooth.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
7425   __pyx_r = NULL;
7426   __pyx_L0:;
7427   __Pyx_XGIVEREF(__pyx_r);
7428   __Pyx_RefNannyFinishContext();
7429   return __pyx_r;
7430 }
7431 
7432 /* "yt/geometry/particle_deposit.pyx":213
7433  *     @cython.cdivision(True)
7434  *     @cython.boundscheck(False)
7435  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
7436  *                      np.float64_t left_edge[3],
7437  *                      np.float64_t dds[3],
7438  */
7439 
__pyx_f_2yt_8geometry_16particle_deposit_12SimpleSmooth_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth * __pyx_v_self,int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)7440 static int __pyx_f_2yt_8geometry_16particle_deposit_12SimpleSmooth_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self, int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
7441   int __pyx_v_ii[3];
7442   int __pyx_v_ib0[3];
7443   int __pyx_v_ib1[3];
7444   int __pyx_v_i;
7445   int __pyx_v_j;
7446   int __pyx_v_k;
7447   int __pyx_v_half_len;
7448   __pyx_t_5numpy_float64_t __pyx_v_idist[3];
7449   __pyx_t_5numpy_float64_t __pyx_v_kernel_sum;
7450   __pyx_t_5numpy_float64_t __pyx_v_dist;
7451   int __pyx_r;
7452   __Pyx_RefNannyDeclarations
7453   int __pyx_t_1;
7454   Py_ssize_t __pyx_t_2;
7455   int __pyx_t_3;
7456   int __pyx_t_4;
7457   long __pyx_t_5;
7458   int __pyx_t_6;
7459   int __pyx_t_7;
7460   Py_ssize_t __pyx_t_8;
7461   Py_ssize_t __pyx_t_9;
7462   Py_ssize_t __pyx_t_10;
7463   Py_ssize_t __pyx_t_11;
7464   __pyx_t_5numpy_int64_t __pyx_t_12;
7465   Py_ssize_t __pyx_t_13;
7466   Py_ssize_t __pyx_t_14;
7467   Py_ssize_t __pyx_t_15;
7468   __pyx_t_5numpy_int64_t __pyx_t_16;
7469   Py_ssize_t __pyx_t_17;
7470   Py_ssize_t __pyx_t_18;
7471   Py_ssize_t __pyx_t_19;
7472   __pyx_t_5numpy_int64_t __pyx_t_20;
7473   Py_ssize_t __pyx_t_21;
7474   Py_ssize_t __pyx_t_22;
7475   Py_ssize_t __pyx_t_23;
7476   Py_ssize_t __pyx_t_24;
7477   __pyx_t_5numpy_int64_t __pyx_t_25;
7478   #ifdef WITH_THREAD
7479   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
7480   #endif
7481   __Pyx_RefNannySetupContext("process", 0);
7482   #ifdef WITH_THREAD
7483   __Pyx_PyGILState_Release(__pyx_gilstate_save);
7484   #endif
7485 
7486   /* "yt/geometry/particle_deposit.pyx":221
7487  *                      np.int64_t domain_ind
7488  *                      ) nogil except -1:
7489  *         cdef int ii[3]             # <<<<<<<<<<<<<<
7490  *         cdef int ib0[3]
7491  *         cdef int ib1[3]
7492  */
7493   /*try:*/ {
7494 
7495     /* "yt/geometry/particle_deposit.pyx":228
7496  *         cdef np.float64_t kernel_sum, dist
7497  *         # Smoothing length is fields[0]
7498  *         kernel_sum = 0.0             # <<<<<<<<<<<<<<
7499  *         for i in range(3):
7500  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
7501  */
7502     __pyx_v_kernel_sum = 0.0;
7503 
7504     /* "yt/geometry/particle_deposit.pyx":229
7505  *         # Smoothing length is fields[0]
7506  *         kernel_sum = 0.0
7507  *         for i in range(3):             # <<<<<<<<<<<<<<
7508  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
7509  *             half_len = <int>(fields[0]/dds[i]) + 1
7510  */
7511     for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
7512       __pyx_v_i = __pyx_t_1;
7513 
7514       /* "yt/geometry/particle_deposit.pyx":230
7515  *         kernel_sum = 0.0
7516  *         for i in range(3):
7517  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])             # <<<<<<<<<<<<<<
7518  *             half_len = <int>(fields[0]/dds[i]) + 1
7519  *             ib0[i] = ii[i] - half_len
7520  */
7521       (__pyx_v_ii[__pyx_v_i]) = ((int)(((__pyx_v_ppos[__pyx_v_i]) - (__pyx_v_left_edge[__pyx_v_i])) / (__pyx_v_dds[__pyx_v_i])));
7522 
7523       /* "yt/geometry/particle_deposit.pyx":231
7524  *         for i in range(3):
7525  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
7526  *             half_len = <int>(fields[0]/dds[i]) + 1             # <<<<<<<<<<<<<<
7527  *             ib0[i] = ii[i] - half_len
7528  *             ib1[i] = ii[i] + half_len
7529  */
7530       __pyx_t_2 = 0;
7531       if (__pyx_t_2 < 0) __pyx_t_2 += __pyx_v_fields.shape[0];
7532       __pyx_v_half_len = (((int)((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_2 * __pyx_v_fields.strides[0]) ))) / (__pyx_v_dds[__pyx_v_i]))) + 1);
7533 
7534       /* "yt/geometry/particle_deposit.pyx":232
7535  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
7536  *             half_len = <int>(fields[0]/dds[i]) + 1
7537  *             ib0[i] = ii[i] - half_len             # <<<<<<<<<<<<<<
7538  *             ib1[i] = ii[i] + half_len
7539  *             if ib0[i] >= dim[i] or ib1[i] <0:
7540  */
7541       (__pyx_v_ib0[__pyx_v_i]) = ((__pyx_v_ii[__pyx_v_i]) - __pyx_v_half_len);
7542 
7543       /* "yt/geometry/particle_deposit.pyx":233
7544  *             half_len = <int>(fields[0]/dds[i]) + 1
7545  *             ib0[i] = ii[i] - half_len
7546  *             ib1[i] = ii[i] + half_len             # <<<<<<<<<<<<<<
7547  *             if ib0[i] >= dim[i] or ib1[i] <0:
7548  *                 return 0
7549  */
7550       (__pyx_v_ib1[__pyx_v_i]) = ((__pyx_v_ii[__pyx_v_i]) + __pyx_v_half_len);
7551 
7552       /* "yt/geometry/particle_deposit.pyx":234
7553  *             ib0[i] = ii[i] - half_len
7554  *             ib1[i] = ii[i] + half_len
7555  *             if ib0[i] >= dim[i] or ib1[i] <0:             # <<<<<<<<<<<<<<
7556  *                 return 0
7557  *             ib0[i] = iclip(ib0[i], 0, dim[i] - 1)
7558  */
7559       __pyx_t_4 = (((__pyx_v_ib0[__pyx_v_i]) >= (__pyx_v_dim[__pyx_v_i])) != 0);
7560       if (!__pyx_t_4) {
7561       } else {
7562         __pyx_t_3 = __pyx_t_4;
7563         goto __pyx_L9_bool_binop_done;
7564       }
7565       __pyx_t_4 = (((__pyx_v_ib1[__pyx_v_i]) < 0) != 0);
7566       __pyx_t_3 = __pyx_t_4;
7567       __pyx_L9_bool_binop_done:;
7568       if (__pyx_t_3) {
7569 
7570         /* "yt/geometry/particle_deposit.pyx":235
7571  *             ib1[i] = ii[i] + half_len
7572  *             if ib0[i] >= dim[i] or ib1[i] <0:
7573  *                 return 0             # <<<<<<<<<<<<<<
7574  *             ib0[i] = iclip(ib0[i], 0, dim[i] - 1)
7575  *             ib1[i] = iclip(ib1[i], 0, dim[i] - 1)
7576  */
7577         __pyx_r = 0;
7578         goto __pyx_L3_return;
7579 
7580         /* "yt/geometry/particle_deposit.pyx":234
7581  *             ib0[i] = ii[i] - half_len
7582  *             ib1[i] = ii[i] + half_len
7583  *             if ib0[i] >= dim[i] or ib1[i] <0:             # <<<<<<<<<<<<<<
7584  *                 return 0
7585  *             ib0[i] = iclip(ib0[i], 0, dim[i] - 1)
7586  */
7587       }
7588 
7589       /* "yt/geometry/particle_deposit.pyx":236
7590  *             if ib0[i] >= dim[i] or ib1[i] <0:
7591  *                 return 0
7592  *             ib0[i] = iclip(ib0[i], 0, dim[i] - 1)             # <<<<<<<<<<<<<<
7593  *             ib1[i] = iclip(ib1[i], 0, dim[i] - 1)
7594  *         for i from ib0[0] <= i <= ib1[0]:
7595  */
7596       (__pyx_v_ib0[__pyx_v_i]) = __pyx_f_2yt_9utilities_3lib_8fp_utils_iclip((__pyx_v_ib0[__pyx_v_i]), 0, ((__pyx_v_dim[__pyx_v_i]) - 1));
7597 
7598       /* "yt/geometry/particle_deposit.pyx":237
7599  *                 return 0
7600  *             ib0[i] = iclip(ib0[i], 0, dim[i] - 1)
7601  *             ib1[i] = iclip(ib1[i], 0, dim[i] - 1)             # <<<<<<<<<<<<<<
7602  *         for i from ib0[0] <= i <= ib1[0]:
7603  *             idist[0] = (ii[0] - i) * dds[0]
7604  */
7605       (__pyx_v_ib1[__pyx_v_i]) = __pyx_f_2yt_9utilities_3lib_8fp_utils_iclip((__pyx_v_ib1[__pyx_v_i]), 0, ((__pyx_v_dim[__pyx_v_i]) - 1));
7606     }
7607 
7608     /* "yt/geometry/particle_deposit.pyx":238
7609  *             ib0[i] = iclip(ib0[i], 0, dim[i] - 1)
7610  *             ib1[i] = iclip(ib1[i], 0, dim[i] - 1)
7611  *         for i from ib0[0] <= i <= ib1[0]:             # <<<<<<<<<<<<<<
7612  *             idist[0] = (ii[0] - i) * dds[0]
7613  *             idist[0] *= idist[0]
7614  */
7615     __pyx_t_1 = (__pyx_v_ib1[0]);
7616     for (__pyx_v_i = (__pyx_v_ib0[0]); __pyx_v_i <= __pyx_t_1; __pyx_v_i++) {
7617 
7618       /* "yt/geometry/particle_deposit.pyx":239
7619  *             ib1[i] = iclip(ib1[i], 0, dim[i] - 1)
7620  *         for i from ib0[0] <= i <= ib1[0]:
7621  *             idist[0] = (ii[0] - i) * dds[0]             # <<<<<<<<<<<<<<
7622  *             idist[0] *= idist[0]
7623  *             for j from ib0[1] <= j <= ib1[1]:
7624  */
7625       (__pyx_v_idist[0]) = (((__pyx_v_ii[0]) - __pyx_v_i) * (__pyx_v_dds[0]));
7626 
7627       /* "yt/geometry/particle_deposit.pyx":240
7628  *         for i from ib0[0] <= i <= ib1[0]:
7629  *             idist[0] = (ii[0] - i) * dds[0]
7630  *             idist[0] *= idist[0]             # <<<<<<<<<<<<<<
7631  *             for j from ib0[1] <= j <= ib1[1]:
7632  *                 idist[1] = (ii[1] - j) * dds[1]
7633  */
7634       __pyx_t_5 = 0;
7635       (__pyx_v_idist[__pyx_t_5]) = ((__pyx_v_idist[__pyx_t_5]) * (__pyx_v_idist[0]));
7636 
7637       /* "yt/geometry/particle_deposit.pyx":241
7638  *             idist[0] = (ii[0] - i) * dds[0]
7639  *             idist[0] *= idist[0]
7640  *             for j from ib0[1] <= j <= ib1[1]:             # <<<<<<<<<<<<<<
7641  *                 idist[1] = (ii[1] - j) * dds[1]
7642  *                 idist[1] *= idist[1]
7643  */
7644       __pyx_t_6 = (__pyx_v_ib1[1]);
7645       for (__pyx_v_j = (__pyx_v_ib0[1]); __pyx_v_j <= __pyx_t_6; __pyx_v_j++) {
7646 
7647         /* "yt/geometry/particle_deposit.pyx":242
7648  *             idist[0] *= idist[0]
7649  *             for j from ib0[1] <= j <= ib1[1]:
7650  *                 idist[1] = (ii[1] - j) * dds[1]             # <<<<<<<<<<<<<<
7651  *                 idist[1] *= idist[1]
7652  *                 for k from ib0[2] <= k <= ib1[2]:
7653  */
7654         (__pyx_v_idist[1]) = (((__pyx_v_ii[1]) - __pyx_v_j) * (__pyx_v_dds[1]));
7655 
7656         /* "yt/geometry/particle_deposit.pyx":243
7657  *             for j from ib0[1] <= j <= ib1[1]:
7658  *                 idist[1] = (ii[1] - j) * dds[1]
7659  *                 idist[1] *= idist[1]             # <<<<<<<<<<<<<<
7660  *                 for k from ib0[2] <= k <= ib1[2]:
7661  *                     idist[2] = (ii[2] - k) * dds[2]
7662  */
7663         __pyx_t_5 = 1;
7664         (__pyx_v_idist[__pyx_t_5]) = ((__pyx_v_idist[__pyx_t_5]) * (__pyx_v_idist[1]));
7665 
7666         /* "yt/geometry/particle_deposit.pyx":244
7667  *                 idist[1] = (ii[1] - j) * dds[1]
7668  *                 idist[1] *= idist[1]
7669  *                 for k from ib0[2] <= k <= ib1[2]:             # <<<<<<<<<<<<<<
7670  *                     idist[2] = (ii[2] - k) * dds[2]
7671  *                     idist[2] *= idist[2]
7672  */
7673         __pyx_t_7 = (__pyx_v_ib1[2]);
7674         for (__pyx_v_k = (__pyx_v_ib0[2]); __pyx_v_k <= __pyx_t_7; __pyx_v_k++) {
7675 
7676           /* "yt/geometry/particle_deposit.pyx":245
7677  *                 idist[1] *= idist[1]
7678  *                 for k from ib0[2] <= k <= ib1[2]:
7679  *                     idist[2] = (ii[2] - k) * dds[2]             # <<<<<<<<<<<<<<
7680  *                     idist[2] *= idist[2]
7681  *                     dist = idist[0] + idist[1] + idist[2]
7682  */
7683           (__pyx_v_idist[2]) = (((__pyx_v_ii[2]) - __pyx_v_k) * (__pyx_v_dds[2]));
7684 
7685           /* "yt/geometry/particle_deposit.pyx":246
7686  *                 for k from ib0[2] <= k <= ib1[2]:
7687  *                     idist[2] = (ii[2] - k) * dds[2]
7688  *                     idist[2] *= idist[2]             # <<<<<<<<<<<<<<
7689  *                     dist = idist[0] + idist[1] + idist[2]
7690  *                     # Calculate distance in multiples of the smoothing length
7691  */
7692           __pyx_t_5 = 2;
7693           (__pyx_v_idist[__pyx_t_5]) = ((__pyx_v_idist[__pyx_t_5]) * (__pyx_v_idist[2]));
7694 
7695           /* "yt/geometry/particle_deposit.pyx":247
7696  *                     idist[2] = (ii[2] - k) * dds[2]
7697  *                     idist[2] *= idist[2]
7698  *                     dist = idist[0] + idist[1] + idist[2]             # <<<<<<<<<<<<<<
7699  *                     # Calculate distance in multiples of the smoothing length
7700  *                     dist = sqrt(dist) / fields[0]
7701  */
7702           __pyx_v_dist = (((__pyx_v_idist[0]) + (__pyx_v_idist[1])) + (__pyx_v_idist[2]));
7703 
7704           /* "yt/geometry/particle_deposit.pyx":249
7705  *                     dist = idist[0] + idist[1] + idist[2]
7706  *                     # Calculate distance in multiples of the smoothing length
7707  *                     dist = sqrt(dist) / fields[0]             # <<<<<<<<<<<<<<
7708  *                     with gil:
7709  *                         self.temp[k,j,i,offset] = self.sph_kernel(dist)
7710  */
7711           __pyx_t_8 = 0;
7712           if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_fields.shape[0];
7713           __pyx_v_dist = (sqrt(__pyx_v_dist) / (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_8 * __pyx_v_fields.strides[0]) ))));
7714 
7715           /* "yt/geometry/particle_deposit.pyx":250
7716  *                     # Calculate distance in multiples of the smoothing length
7717  *                     dist = sqrt(dist) / fields[0]
7718  *                     with gil:             # <<<<<<<<<<<<<<
7719  *                         self.temp[k,j,i,offset] = self.sph_kernel(dist)
7720  *                     kernel_sum += self.temp[k,j,i,offset]
7721  */
7722           {
7723               #ifdef WITH_THREAD
7724               PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
7725               #endif
7726               /*try:*/ {
7727 
7728                 /* "yt/geometry/particle_deposit.pyx":251
7729  *                     dist = sqrt(dist) / fields[0]
7730  *                     with gil:
7731  *                         self.temp[k,j,i,offset] = self.sph_kernel(dist)             # <<<<<<<<<<<<<<
7732  *                     kernel_sum += self.temp[k,j,i,offset]
7733  *         # Having found the kernel, deposit accordingly into gdata
7734  */
7735                 if (unlikely(!__pyx_v_self->temp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 251, __pyx_L20_error)}
7736                 __pyx_t_9 = __pyx_v_k;
7737                 __pyx_t_10 = __pyx_v_j;
7738                 __pyx_t_11 = __pyx_v_i;
7739                 __pyx_t_12 = __pyx_v_offset;
7740                 if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_self->temp.shape[0];
7741                 if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_self->temp.shape[1];
7742                 if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_v_self->temp.shape[2];
7743                 if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_self->temp.shape[3];
7744                 *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->temp.data + __pyx_t_9 * __pyx_v_self->temp.strides[0]) ) + __pyx_t_10 * __pyx_v_self->temp.strides[1]) ) + __pyx_t_11 * __pyx_v_self->temp.strides[2]) ) + __pyx_t_12 * __pyx_v_self->temp.strides[3]) )) = __pyx_v_self->__pyx_base.sph_kernel(__pyx_v_dist);
7745               }
7746 
7747               /* "yt/geometry/particle_deposit.pyx":250
7748  *                     # Calculate distance in multiples of the smoothing length
7749  *                     dist = sqrt(dist) / fields[0]
7750  *                     with gil:             # <<<<<<<<<<<<<<
7751  *                         self.temp[k,j,i,offset] = self.sph_kernel(dist)
7752  *                     kernel_sum += self.temp[k,j,i,offset]
7753  */
7754               /*finally:*/ {
7755                 /*normal exit:*/{
7756                   #ifdef WITH_THREAD
7757                   __Pyx_PyGILState_Release(__pyx_gilstate_save);
7758                   #endif
7759                   goto __pyx_L21;
7760                 }
7761                 __pyx_L20_error: {
7762                   #ifdef WITH_THREAD
7763                   __Pyx_PyGILState_Release(__pyx_gilstate_save);
7764                   #endif
7765                   goto __pyx_L4_error;
7766                 }
7767                 __pyx_L21:;
7768               }
7769           }
7770 
7771           /* "yt/geometry/particle_deposit.pyx":252
7772  *                     with gil:
7773  *                         self.temp[k,j,i,offset] = self.sph_kernel(dist)
7774  *                     kernel_sum += self.temp[k,j,i,offset]             # <<<<<<<<<<<<<<
7775  *         # Having found the kernel, deposit accordingly into gdata
7776  *         for i from ib0[0] <= i <= ib1[0]:
7777  */
7778           if (unlikely(!__pyx_v_self->temp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L4_error)}
7779           __pyx_t_13 = __pyx_v_k;
7780           __pyx_t_14 = __pyx_v_j;
7781           __pyx_t_15 = __pyx_v_i;
7782           __pyx_t_16 = __pyx_v_offset;
7783           if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_self->temp.shape[0];
7784           if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_self->temp.shape[1];
7785           if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_self->temp.shape[2];
7786           if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_self->temp.shape[3];
7787           __pyx_v_kernel_sum = (__pyx_v_kernel_sum + (*((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->temp.data + __pyx_t_13 * __pyx_v_self->temp.strides[0]) ) + __pyx_t_14 * __pyx_v_self->temp.strides[1]) ) + __pyx_t_15 * __pyx_v_self->temp.strides[2]) ) + __pyx_t_16 * __pyx_v_self->temp.strides[3]) ))));
7788         }
7789       }
7790     }
7791 
7792     /* "yt/geometry/particle_deposit.pyx":254
7793  *                     kernel_sum += self.temp[k,j,i,offset]
7794  *         # Having found the kernel, deposit accordingly into gdata
7795  *         for i from ib0[0] <= i <= ib1[0]:             # <<<<<<<<<<<<<<
7796  *             for j from ib0[1] <= j <= ib1[1]:
7797  *                 for k from ib0[2] <= k <= ib1[2]:
7798  */
7799     __pyx_t_1 = (__pyx_v_ib1[0]);
7800     for (__pyx_v_i = (__pyx_v_ib0[0]); __pyx_v_i <= __pyx_t_1; __pyx_v_i++) {
7801 
7802       /* "yt/geometry/particle_deposit.pyx":255
7803  *         # Having found the kernel, deposit accordingly into gdata
7804  *         for i from ib0[0] <= i <= ib1[0]:
7805  *             for j from ib0[1] <= j <= ib1[1]:             # <<<<<<<<<<<<<<
7806  *                 for k from ib0[2] <= k <= ib1[2]:
7807  *                     dist = self.temp[k,j,i,offset] / kernel_sum
7808  */
7809       __pyx_t_6 = (__pyx_v_ib1[1]);
7810       for (__pyx_v_j = (__pyx_v_ib0[1]); __pyx_v_j <= __pyx_t_6; __pyx_v_j++) {
7811 
7812         /* "yt/geometry/particle_deposit.pyx":256
7813  *         for i from ib0[0] <= i <= ib1[0]:
7814  *             for j from ib0[1] <= j <= ib1[1]:
7815  *                 for k from ib0[2] <= k <= ib1[2]:             # <<<<<<<<<<<<<<
7816  *                     dist = self.temp[k,j,i,offset] / kernel_sum
7817  *                     self.data[k,j,i,offset] += fields[1] * dist
7818  */
7819         __pyx_t_7 = (__pyx_v_ib1[2]);
7820         for (__pyx_v_k = (__pyx_v_ib0[2]); __pyx_v_k <= __pyx_t_7; __pyx_v_k++) {
7821 
7822           /* "yt/geometry/particle_deposit.pyx":257
7823  *             for j from ib0[1] <= j <= ib1[1]:
7824  *                 for k from ib0[2] <= k <= ib1[2]:
7825  *                     dist = self.temp[k,j,i,offset] / kernel_sum             # <<<<<<<<<<<<<<
7826  *                     self.data[k,j,i,offset] += fields[1] * dist
7827  *         return 0
7828  */
7829           if (unlikely(!__pyx_v_self->temp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 257, __pyx_L4_error)}
7830           __pyx_t_17 = __pyx_v_k;
7831           __pyx_t_18 = __pyx_v_j;
7832           __pyx_t_19 = __pyx_v_i;
7833           __pyx_t_20 = __pyx_v_offset;
7834           if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_self->temp.shape[0];
7835           if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_v_self->temp.shape[1];
7836           if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_v_self->temp.shape[2];
7837           if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_v_self->temp.shape[3];
7838           __pyx_v_dist = ((*((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->temp.data + __pyx_t_17 * __pyx_v_self->temp.strides[0]) ) + __pyx_t_18 * __pyx_v_self->temp.strides[1]) ) + __pyx_t_19 * __pyx_v_self->temp.strides[2]) ) + __pyx_t_20 * __pyx_v_self->temp.strides[3]) ))) / __pyx_v_kernel_sum);
7839 
7840           /* "yt/geometry/particle_deposit.pyx":258
7841  *                 for k from ib0[2] <= k <= ib1[2]:
7842  *                     dist = self.temp[k,j,i,offset] / kernel_sum
7843  *                     self.data[k,j,i,offset] += fields[1] * dist             # <<<<<<<<<<<<<<
7844  *         return 0
7845  *
7846  */
7847           __pyx_t_21 = 1;
7848           if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_v_fields.shape[0];
7849           if (unlikely(!__pyx_v_self->data.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 258, __pyx_L4_error)}
7850           __pyx_t_22 = __pyx_v_k;
7851           __pyx_t_23 = __pyx_v_j;
7852           __pyx_t_24 = __pyx_v_i;
7853           __pyx_t_25 = __pyx_v_offset;
7854           if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_v_self->data.shape[0];
7855           if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_v_self->data.shape[1];
7856           if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_self->data.shape[2];
7857           if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_v_self->data.shape[3];
7858           *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->data.data + __pyx_t_22 * __pyx_v_self->data.strides[0]) ) + __pyx_t_23 * __pyx_v_self->data.strides[1]) ) + __pyx_t_24 * __pyx_v_self->data.strides[2]) ) + __pyx_t_25 * __pyx_v_self->data.strides[3]) )) += ((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_21 * __pyx_v_fields.strides[0]) ))) * __pyx_v_dist);
7859         }
7860       }
7861     }
7862 
7863     /* "yt/geometry/particle_deposit.pyx":259
7864  *                     dist = self.temp[k,j,i,offset] / kernel_sum
7865  *                     self.data[k,j,i,offset] += fields[1] * dist
7866  *         return 0             # <<<<<<<<<<<<<<
7867  *
7868  *     def finalize(self):
7869  */
7870     __pyx_r = 0;
7871     goto __pyx_L3_return;
7872   }
7873 
7874   /* "yt/geometry/particle_deposit.pyx":221
7875  *                      np.int64_t domain_ind
7876  *                      ) nogil except -1:
7877  *         cdef int ii[3]             # <<<<<<<<<<<<<<
7878  *         cdef int ib0[3]
7879  *         cdef int ib1[3]
7880  */
7881   /*finally:*/ {
7882     __pyx_L3_return: {
7883       #ifdef WITH_THREAD
7884       __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
7885       #endif
7886       goto __pyx_L0;
7887     }
7888     __pyx_L4_error: {
7889       #ifdef WITH_THREAD
7890       __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
7891       #endif
7892       goto __pyx_L1_error;
7893     }
7894   }
7895 
7896   /* "yt/geometry/particle_deposit.pyx":213
7897  *     @cython.cdivision(True)
7898  *     @cython.boundscheck(False)
7899  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
7900  *                      np.float64_t left_edge[3],
7901  *                      np.float64_t dds[3],
7902  */
7903 
7904   /* function exit code */
7905   __pyx_r = 0;
7906   goto __pyx_L0;
7907   __pyx_L1_error:;
7908   __Pyx_AddTraceback("yt.geometry.particle_deposit.SimpleSmooth.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
7909   __pyx_r = -1;
7910   __pyx_L0:;
7911   #ifdef WITH_THREAD
7912   __Pyx_PyGILState_Release(__pyx_gilstate_save);
7913   #endif
7914   return __pyx_r;
7915 }
7916 
7917 /* "yt/geometry/particle_deposit.pyx":261
7918  *         return 0
7919  *
7920  *     def finalize(self):             # <<<<<<<<<<<<<<
7921  *         return self.odata
7922  *
7923  */
7924 
7925 /* Python wrapper */
7926 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7927 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7928   PyObject *__pyx_r = 0;
7929   __Pyx_RefNannyDeclarations
7930   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
7931   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *)__pyx_v_self));
7932 
7933   /* function exit code */
7934   __Pyx_RefNannyFinishContext();
7935   return __pyx_r;
7936 }
7937 
__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth * __pyx_v_self)7938 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self) {
7939   PyObject *__pyx_r = NULL;
7940   __Pyx_RefNannyDeclarations
7941   PyObject *__pyx_t_1 = NULL;
7942   __Pyx_RefNannySetupContext("finalize", 0);
7943 
7944   /* "yt/geometry/particle_deposit.pyx":262
7945  *
7946  *     def finalize(self):
7947  *         return self.odata             # <<<<<<<<<<<<<<
7948  *
7949  * deposit_simple_smooth = SimpleSmooth
7950  */
7951   __Pyx_XDECREF(__pyx_r);
7952   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_odata); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 262, __pyx_L1_error)
7953   __Pyx_GOTREF(__pyx_t_1);
7954   __pyx_r = __pyx_t_1;
7955   __pyx_t_1 = 0;
7956   goto __pyx_L0;
7957 
7958   /* "yt/geometry/particle_deposit.pyx":261
7959  *         return 0
7960  *
7961  *     def finalize(self):             # <<<<<<<<<<<<<<
7962  *         return self.odata
7963  *
7964  */
7965 
7966   /* function exit code */
7967   __pyx_L1_error:;
7968   __Pyx_XDECREF(__pyx_t_1);
7969   __Pyx_AddTraceback("yt.geometry.particle_deposit.SimpleSmooth.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
7970   __pyx_r = NULL;
7971   __pyx_L0:;
7972   __Pyx_XGIVEREF(__pyx_r);
7973   __Pyx_RefNannyFinishContext();
7974   return __pyx_r;
7975 }
7976 
7977 /* "(tree fragment)":1
7978  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
7979  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
7980  * def __setstate_cython__(self, __pyx_state):
7981  */
7982 
7983 /* Python wrapper */
7984 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7985 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7986   PyObject *__pyx_r = 0;
7987   __Pyx_RefNannyDeclarations
7988   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7989   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *)__pyx_v_self));
7990 
7991   /* function exit code */
7992   __Pyx_RefNannyFinishContext();
7993   return __pyx_r;
7994 }
7995 
__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth * __pyx_v_self)7996 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self) {
7997   PyObject *__pyx_r = NULL;
7998   __Pyx_RefNannyDeclarations
7999   PyObject *__pyx_t_1 = NULL;
8000   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8001 
8002   /* "(tree fragment)":2
8003  * def __reduce_cython__(self):
8004  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
8005  * def __setstate_cython__(self, __pyx_state):
8006  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8007  */
8008   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
8009   __Pyx_GOTREF(__pyx_t_1);
8010   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8011   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8012   __PYX_ERR(2, 2, __pyx_L1_error)
8013 
8014   /* "(tree fragment)":1
8015  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
8016  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8017  * def __setstate_cython__(self, __pyx_state):
8018  */
8019 
8020   /* function exit code */
8021   __pyx_L1_error:;
8022   __Pyx_XDECREF(__pyx_t_1);
8023   __Pyx_AddTraceback("yt.geometry.particle_deposit.SimpleSmooth.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8024   __pyx_r = NULL;
8025   __Pyx_XGIVEREF(__pyx_r);
8026   __Pyx_RefNannyFinishContext();
8027   return __pyx_r;
8028 }
8029 
8030 /* "(tree fragment)":3
8031  * def __reduce_cython__(self):
8032  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8033  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
8034  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8035  */
8036 
8037 /* Python wrapper */
8038 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)8039 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8040   PyObject *__pyx_r = 0;
8041   __Pyx_RefNannyDeclarations
8042   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8043   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8044 
8045   /* function exit code */
8046   __Pyx_RefNannyFinishContext();
8047   return __pyx_r;
8048 }
8049 
__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)8050 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_12SimpleSmooth_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
8051   PyObject *__pyx_r = NULL;
8052   __Pyx_RefNannyDeclarations
8053   PyObject *__pyx_t_1 = NULL;
8054   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8055 
8056   /* "(tree fragment)":4
8057  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8058  * def __setstate_cython__(self, __pyx_state):
8059  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
8060  */
8061   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
8062   __Pyx_GOTREF(__pyx_t_1);
8063   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8064   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8065   __PYX_ERR(2, 4, __pyx_L1_error)
8066 
8067   /* "(tree fragment)":3
8068  * def __reduce_cython__(self):
8069  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8070  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
8071  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8072  */
8073 
8074   /* function exit code */
8075   __pyx_L1_error:;
8076   __Pyx_XDECREF(__pyx_t_1);
8077   __Pyx_AddTraceback("yt.geometry.particle_deposit.SimpleSmooth.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8078   __pyx_r = NULL;
8079   __Pyx_XGIVEREF(__pyx_r);
8080   __Pyx_RefNannyFinishContext();
8081   return __pyx_r;
8082 }
8083 
8084 /* "yt/geometry/particle_deposit.pyx":268
8085  * cdef class SumParticleField(ParticleDepositOperation):
8086  *     cdef np.float64_t[:,:,:,:] sum
8087  *     def initialize(self):             # <<<<<<<<<<<<<<
8088  *         self.sum = append_axes(
8089  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8090  */
8091 
8092 /* Python wrapper */
8093 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)8094 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8095   PyObject *__pyx_r = 0;
8096   __Pyx_RefNannyDeclarations
8097   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
8098   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *)__pyx_v_self));
8099 
8100   /* function exit code */
8101   __Pyx_RefNannyFinishContext();
8102   return __pyx_r;
8103 }
8104 
__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField * __pyx_v_self)8105 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self) {
8106   PyObject *__pyx_r = NULL;
8107   __Pyx_RefNannyDeclarations
8108   PyObject *__pyx_t_1 = NULL;
8109   PyObject *__pyx_t_2 = NULL;
8110   PyObject *__pyx_t_3 = NULL;
8111   PyObject *__pyx_t_4 = NULL;
8112   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
8113   __Pyx_RefNannySetupContext("initialize", 0);
8114 
8115   /* "yt/geometry/particle_deposit.pyx":270
8116  *     def initialize(self):
8117  *         self.sum = append_axes(
8118  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
8119  *
8120  *     @cython.cdivision(True)
8121  */
8122   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 270, __pyx_L1_error)
8123   __Pyx_GOTREF(__pyx_t_1);
8124   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 270, __pyx_L1_error)
8125   __Pyx_GOTREF(__pyx_t_2);
8126   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8127   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 270, __pyx_L1_error)
8128   __Pyx_GOTREF(__pyx_t_1);
8129   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
8130   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
8131   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
8132   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 270, __pyx_L1_error)
8133   __Pyx_GOTREF(__pyx_t_3);
8134   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 270, __pyx_L1_error)
8135   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 270, __pyx_L1_error)
8136   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 270, __pyx_L1_error)
8137   __Pyx_GOTREF(__pyx_t_4);
8138   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8139   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8140   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8141   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 270, __pyx_L1_error)
8142 
8143   /* "yt/geometry/particle_deposit.pyx":269
8144  *     cdef np.float64_t[:,:,:,:] sum
8145  *     def initialize(self):
8146  *         self.sum = append_axes(             # <<<<<<<<<<<<<<
8147  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8148  *
8149  */
8150   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 269, __pyx_L1_error)
8151   __Pyx_GOTREF(__pyx_t_3);
8152   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8153   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 269, __pyx_L1_error)
8154   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8155   __PYX_XDEC_MEMVIEW(&__pyx_v_self->sum, 0);
8156   __pyx_v_self->sum = __pyx_t_5;
8157   __pyx_t_5.memview = NULL;
8158   __pyx_t_5.data = NULL;
8159 
8160   /* "yt/geometry/particle_deposit.pyx":268
8161  * cdef class SumParticleField(ParticleDepositOperation):
8162  *     cdef np.float64_t[:,:,:,:] sum
8163  *     def initialize(self):             # <<<<<<<<<<<<<<
8164  *         self.sum = append_axes(
8165  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8166  */
8167 
8168   /* function exit code */
8169   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8170   goto __pyx_L0;
8171   __pyx_L1_error:;
8172   __Pyx_XDECREF(__pyx_t_1);
8173   __Pyx_XDECREF(__pyx_t_2);
8174   __Pyx_XDECREF(__pyx_t_3);
8175   __Pyx_XDECREF(__pyx_t_4);
8176   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
8177   __Pyx_AddTraceback("yt.geometry.particle_deposit.SumParticleField.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
8178   __pyx_r = NULL;
8179   __pyx_L0:;
8180   __Pyx_XGIVEREF(__pyx_r);
8181   __Pyx_RefNannyFinishContext();
8182   return __pyx_r;
8183 }
8184 
8185 /* "yt/geometry/particle_deposit.pyx":274
8186  *     @cython.cdivision(True)
8187  *     @cython.boundscheck(False)
8188  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
8189  *                      np.float64_t left_edge[3],
8190  *                      np.float64_t dds[3],
8191  */
8192 
__pyx_f_2yt_8geometry_16particle_deposit_16SumParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)8193 static int __pyx_f_2yt_8geometry_16particle_deposit_16SumParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
8194   int __pyx_v_ii[3];
8195   int __pyx_v_i;
8196   int __pyx_r;
8197   int __pyx_t_1;
8198   Py_ssize_t __pyx_t_2;
8199   Py_ssize_t __pyx_t_3;
8200   Py_ssize_t __pyx_t_4;
8201   Py_ssize_t __pyx_t_5;
8202   __pyx_t_5numpy_int64_t __pyx_t_6;
8203 
8204   /* "yt/geometry/particle_deposit.pyx":284
8205  *         cdef int ii[3]
8206  *         cdef int i
8207  *         for i in range(3):             # <<<<<<<<<<<<<<
8208  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])
8209  *         self.sum[ii[2], ii[1], ii[0], offset] += fields[0]
8210  */
8211   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
8212     __pyx_v_i = __pyx_t_1;
8213 
8214     /* "yt/geometry/particle_deposit.pyx":285
8215  *         cdef int i
8216  *         for i in range(3):
8217  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])             # <<<<<<<<<<<<<<
8218  *         self.sum[ii[2], ii[1], ii[0], offset] += fields[0]
8219  *         return 0
8220  */
8221     (__pyx_v_ii[__pyx_v_i]) = ((int)(((__pyx_v_ppos[__pyx_v_i]) - (__pyx_v_left_edge[__pyx_v_i])) / (__pyx_v_dds[__pyx_v_i])));
8222   }
8223 
8224   /* "yt/geometry/particle_deposit.pyx":286
8225  *         for i in range(3):
8226  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])
8227  *         self.sum[ii[2], ii[1], ii[0], offset] += fields[0]             # <<<<<<<<<<<<<<
8228  *         return 0
8229  *
8230  */
8231   __pyx_t_2 = 0;
8232   if (__pyx_t_2 < 0) __pyx_t_2 += __pyx_v_fields.shape[0];
8233   if (unlikely(!__pyx_v_self->sum.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 286, __pyx_L1_error)}
8234   __pyx_t_3 = (__pyx_v_ii[2]);
8235   __pyx_t_4 = (__pyx_v_ii[1]);
8236   __pyx_t_5 = (__pyx_v_ii[0]);
8237   __pyx_t_6 = __pyx_v_offset;
8238   if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_v_self->sum.shape[0];
8239   if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_self->sum.shape[1];
8240   if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_self->sum.shape[2];
8241   if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_v_self->sum.shape[3];
8242   *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->sum.data + __pyx_t_3 * __pyx_v_self->sum.strides[0]) ) + __pyx_t_4 * __pyx_v_self->sum.strides[1]) ) + __pyx_t_5 * __pyx_v_self->sum.strides[2]) ) + __pyx_t_6 * __pyx_v_self->sum.strides[3]) )) += (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_2 * __pyx_v_fields.strides[0]) )));
8243 
8244   /* "yt/geometry/particle_deposit.pyx":287
8245  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])
8246  *         self.sum[ii[2], ii[1], ii[0], offset] += fields[0]
8247  *         return 0             # <<<<<<<<<<<<<<
8248  *
8249  *     def finalize(self):
8250  */
8251   __pyx_r = 0;
8252   goto __pyx_L0;
8253 
8254   /* "yt/geometry/particle_deposit.pyx":274
8255  *     @cython.cdivision(True)
8256  *     @cython.boundscheck(False)
8257  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
8258  *                      np.float64_t left_edge[3],
8259  *                      np.float64_t dds[3],
8260  */
8261 
8262   /* function exit code */
8263   __pyx_L1_error:;
8264   {
8265     #ifdef WITH_THREAD
8266     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
8267     #endif
8268     __Pyx_AddTraceback("yt.geometry.particle_deposit.SumParticleField.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
8269     #ifdef WITH_THREAD
8270     __Pyx_PyGILState_Release(__pyx_gilstate_save);
8271     #endif
8272   }
8273   __pyx_r = -1;
8274   __pyx_L0:;
8275   return __pyx_r;
8276 }
8277 
8278 /* "yt/geometry/particle_deposit.pyx":289
8279  *         return 0
8280  *
8281  *     def finalize(self):             # <<<<<<<<<<<<<<
8282  *         sum = np.asarray(self.sum)
8283  *         sum.shape = self.nvals
8284  */
8285 
8286 /* Python wrapper */
8287 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)8288 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8289   PyObject *__pyx_r = 0;
8290   __Pyx_RefNannyDeclarations
8291   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
8292   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *)__pyx_v_self));
8293 
8294   /* function exit code */
8295   __Pyx_RefNannyFinishContext();
8296   return __pyx_r;
8297 }
8298 
__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField * __pyx_v_self)8299 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self) {
8300   PyObject *__pyx_v_sum = NULL;
8301   PyObject *__pyx_r = NULL;
8302   __Pyx_RefNannyDeclarations
8303   PyObject *__pyx_t_1 = NULL;
8304   PyObject *__pyx_t_2 = NULL;
8305   PyObject *__pyx_t_3 = NULL;
8306   PyObject *__pyx_t_4 = NULL;
8307   __Pyx_RefNannySetupContext("finalize", 0);
8308 
8309   /* "yt/geometry/particle_deposit.pyx":290
8310  *
8311  *     def finalize(self):
8312  *         sum = np.asarray(self.sum)             # <<<<<<<<<<<<<<
8313  *         sum.shape = self.nvals
8314  *         return sum
8315  */
8316   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 290, __pyx_L1_error)
8317   __Pyx_GOTREF(__pyx_t_2);
8318   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 290, __pyx_L1_error)
8319   __Pyx_GOTREF(__pyx_t_3);
8320   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8321   if (unlikely(!__pyx_v_self->sum.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 290, __pyx_L1_error)}
8322   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->sum, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 290, __pyx_L1_error)
8323   __Pyx_GOTREF(__pyx_t_2);
8324   __pyx_t_4 = NULL;
8325   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
8326     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
8327     if (likely(__pyx_t_4)) {
8328       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
8329       __Pyx_INCREF(__pyx_t_4);
8330       __Pyx_INCREF(function);
8331       __Pyx_DECREF_SET(__pyx_t_3, function);
8332     }
8333   }
8334   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
8335   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
8336   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8337   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error)
8338   __Pyx_GOTREF(__pyx_t_1);
8339   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8340   __pyx_v_sum = __pyx_t_1;
8341   __pyx_t_1 = 0;
8342 
8343   /* "yt/geometry/particle_deposit.pyx":291
8344  *     def finalize(self):
8345  *         sum = np.asarray(self.sum)
8346  *         sum.shape = self.nvals             # <<<<<<<<<<<<<<
8347  *         return sum
8348  *
8349  */
8350   __pyx_t_1 = __pyx_v_self->__pyx_base.nvals;
8351   __Pyx_INCREF(__pyx_t_1);
8352   if (__Pyx_PyObject_SetAttrStr(__pyx_v_sum, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(1, 291, __pyx_L1_error)
8353   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8354 
8355   /* "yt/geometry/particle_deposit.pyx":292
8356  *         sum = np.asarray(self.sum)
8357  *         sum.shape = self.nvals
8358  *         return sum             # <<<<<<<<<<<<<<
8359  *
8360  * deposit_sum = SumParticleField
8361  */
8362   __Pyx_XDECREF(__pyx_r);
8363   __Pyx_INCREF(__pyx_v_sum);
8364   __pyx_r = __pyx_v_sum;
8365   goto __pyx_L0;
8366 
8367   /* "yt/geometry/particle_deposit.pyx":289
8368  *         return 0
8369  *
8370  *     def finalize(self):             # <<<<<<<<<<<<<<
8371  *         sum = np.asarray(self.sum)
8372  *         sum.shape = self.nvals
8373  */
8374 
8375   /* function exit code */
8376   __pyx_L1_error:;
8377   __Pyx_XDECREF(__pyx_t_1);
8378   __Pyx_XDECREF(__pyx_t_2);
8379   __Pyx_XDECREF(__pyx_t_3);
8380   __Pyx_XDECREF(__pyx_t_4);
8381   __Pyx_AddTraceback("yt.geometry.particle_deposit.SumParticleField.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
8382   __pyx_r = NULL;
8383   __pyx_L0:;
8384   __Pyx_XDECREF(__pyx_v_sum);
8385   __Pyx_XGIVEREF(__pyx_r);
8386   __Pyx_RefNannyFinishContext();
8387   return __pyx_r;
8388 }
8389 
8390 /* "(tree fragment)":1
8391  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
8392  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8393  * def __setstate_cython__(self, __pyx_state):
8394  */
8395 
8396 /* Python wrapper */
8397 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)8398 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8399   PyObject *__pyx_r = 0;
8400   __Pyx_RefNannyDeclarations
8401   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
8402   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *)__pyx_v_self));
8403 
8404   /* function exit code */
8405   __Pyx_RefNannyFinishContext();
8406   return __pyx_r;
8407 }
8408 
__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField * __pyx_v_self)8409 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self) {
8410   PyObject *__pyx_r = NULL;
8411   __Pyx_RefNannyDeclarations
8412   PyObject *__pyx_t_1 = NULL;
8413   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8414 
8415   /* "(tree fragment)":2
8416  * def __reduce_cython__(self):
8417  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
8418  * def __setstate_cython__(self, __pyx_state):
8419  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8420  */
8421   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
8422   __Pyx_GOTREF(__pyx_t_1);
8423   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8424   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8425   __PYX_ERR(2, 2, __pyx_L1_error)
8426 
8427   /* "(tree fragment)":1
8428  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
8429  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8430  * def __setstate_cython__(self, __pyx_state):
8431  */
8432 
8433   /* function exit code */
8434   __pyx_L1_error:;
8435   __Pyx_XDECREF(__pyx_t_1);
8436   __Pyx_AddTraceback("yt.geometry.particle_deposit.SumParticleField.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8437   __pyx_r = NULL;
8438   __Pyx_XGIVEREF(__pyx_r);
8439   __Pyx_RefNannyFinishContext();
8440   return __pyx_r;
8441 }
8442 
8443 /* "(tree fragment)":3
8444  * def __reduce_cython__(self):
8445  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8446  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
8447  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8448  */
8449 
8450 /* Python wrapper */
8451 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)8452 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8453   PyObject *__pyx_r = 0;
8454   __Pyx_RefNannyDeclarations
8455   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8456   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8457 
8458   /* function exit code */
8459   __Pyx_RefNannyFinishContext();
8460   return __pyx_r;
8461 }
8462 
__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)8463 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16SumParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
8464   PyObject *__pyx_r = NULL;
8465   __Pyx_RefNannyDeclarations
8466   PyObject *__pyx_t_1 = NULL;
8467   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8468 
8469   /* "(tree fragment)":4
8470  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8471  * def __setstate_cython__(self, __pyx_state):
8472  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
8473  */
8474   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
8475   __Pyx_GOTREF(__pyx_t_1);
8476   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8477   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8478   __PYX_ERR(2, 4, __pyx_L1_error)
8479 
8480   /* "(tree fragment)":3
8481  * def __reduce_cython__(self):
8482  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8483  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
8484  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
8485  */
8486 
8487   /* function exit code */
8488   __pyx_L1_error:;
8489   __Pyx_XDECREF(__pyx_t_1);
8490   __Pyx_AddTraceback("yt.geometry.particle_deposit.SumParticleField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8491   __pyx_r = NULL;
8492   __Pyx_XGIVEREF(__pyx_r);
8493   __Pyx_RefNannyFinishContext();
8494   return __pyx_r;
8495 }
8496 
8497 /* "yt/geometry/particle_deposit.pyx":303
8498  *     cdef np.float64_t[:,:,:,:] qk
8499  *     cdef np.float64_t[:,:,:,:] i
8500  *     def initialize(self):             # <<<<<<<<<<<<<<
8501  *         # we do this in a single pass, but need two scalar
8502  *         # per cell, M_k, and Q_k and also the number of particles
8503  */
8504 
8505 /* Python wrapper */
8506 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)8507 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8508   PyObject *__pyx_r = 0;
8509   __Pyx_RefNannyDeclarations
8510   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
8511   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *)__pyx_v_self));
8512 
8513   /* function exit code */
8514   __Pyx_RefNannyFinishContext();
8515   return __pyx_r;
8516 }
8517 
__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField * __pyx_v_self)8518 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self) {
8519   PyObject *__pyx_r = NULL;
8520   __Pyx_RefNannyDeclarations
8521   PyObject *__pyx_t_1 = NULL;
8522   PyObject *__pyx_t_2 = NULL;
8523   PyObject *__pyx_t_3 = NULL;
8524   PyObject *__pyx_t_4 = NULL;
8525   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
8526   __Pyx_RefNannySetupContext("initialize", 0);
8527 
8528   /* "yt/geometry/particle_deposit.pyx":309
8529  *         # the M_k term
8530  *         self.mk = append_axes(
8531  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
8532  *         self.qk = append_axes(
8533  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8534  */
8535   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error)
8536   __Pyx_GOTREF(__pyx_t_1);
8537   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 309, __pyx_L1_error)
8538   __Pyx_GOTREF(__pyx_t_2);
8539   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8540   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error)
8541   __Pyx_GOTREF(__pyx_t_1);
8542   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
8543   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
8544   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
8545   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 309, __pyx_L1_error)
8546   __Pyx_GOTREF(__pyx_t_3);
8547   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 309, __pyx_L1_error)
8548   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 309, __pyx_L1_error)
8549   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error)
8550   __Pyx_GOTREF(__pyx_t_4);
8551   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8552   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8553   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8554   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 309, __pyx_L1_error)
8555 
8556   /* "yt/geometry/particle_deposit.pyx":308
8557  *         # deposited into each one
8558  *         # the M_k term
8559  *         self.mk = append_axes(             # <<<<<<<<<<<<<<
8560  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8561  *         self.qk = append_axes(
8562  */
8563   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 308, __pyx_L1_error)
8564   __Pyx_GOTREF(__pyx_t_3);
8565   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8566   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 308, __pyx_L1_error)
8567   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8568   __PYX_XDEC_MEMVIEW(&__pyx_v_self->mk, 0);
8569   __pyx_v_self->mk = __pyx_t_5;
8570   __pyx_t_5.memview = NULL;
8571   __pyx_t_5.data = NULL;
8572 
8573   /* "yt/geometry/particle_deposit.pyx":311
8574  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8575  *         self.qk = append_axes(
8576  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
8577  *         self.i = append_axes(
8578  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8579  */
8580   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 311, __pyx_L1_error)
8581   __Pyx_GOTREF(__pyx_t_3);
8582   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 311, __pyx_L1_error)
8583   __Pyx_GOTREF(__pyx_t_4);
8584   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8585   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 311, __pyx_L1_error)
8586   __Pyx_GOTREF(__pyx_t_3);
8587   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
8588   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
8589   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.nvals);
8590   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 311, __pyx_L1_error)
8591   __Pyx_GOTREF(__pyx_t_1);
8592   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 311, __pyx_L1_error)
8593   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 311, __pyx_L1_error)
8594   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 311, __pyx_L1_error)
8595   __Pyx_GOTREF(__pyx_t_2);
8596   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8597   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8598   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8599   if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 311, __pyx_L1_error)
8600 
8601   /* "yt/geometry/particle_deposit.pyx":310
8602  *         self.mk = append_axes(
8603  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8604  *         self.qk = append_axes(             # <<<<<<<<<<<<<<
8605  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8606  *         self.i = append_axes(
8607  */
8608   __pyx_t_1 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_2), 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 310, __pyx_L1_error)
8609   __Pyx_GOTREF(__pyx_t_1);
8610   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8611   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 310, __pyx_L1_error)
8612   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8613   __PYX_XDEC_MEMVIEW(&__pyx_v_self->qk, 0);
8614   __pyx_v_self->qk = __pyx_t_5;
8615   __pyx_t_5.memview = NULL;
8616   __pyx_t_5.data = NULL;
8617 
8618   /* "yt/geometry/particle_deposit.pyx":313
8619  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8620  *         self.i = append_axes(
8621  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
8622  *
8623  *     @cython.cdivision(True)
8624  */
8625   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 313, __pyx_L1_error)
8626   __Pyx_GOTREF(__pyx_t_1);
8627   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 313, __pyx_L1_error)
8628   __Pyx_GOTREF(__pyx_t_2);
8629   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8630   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 313, __pyx_L1_error)
8631   __Pyx_GOTREF(__pyx_t_1);
8632   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
8633   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
8634   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
8635   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 313, __pyx_L1_error)
8636   __Pyx_GOTREF(__pyx_t_3);
8637   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 313, __pyx_L1_error)
8638   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 313, __pyx_L1_error)
8639   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 313, __pyx_L1_error)
8640   __Pyx_GOTREF(__pyx_t_4);
8641   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8642   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8643   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8644   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 313, __pyx_L1_error)
8645 
8646   /* "yt/geometry/particle_deposit.pyx":312
8647  *         self.qk = append_axes(
8648  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8649  *         self.i = append_axes(             # <<<<<<<<<<<<<<
8650  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
8651  *
8652  */
8653   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 312, __pyx_L1_error)
8654   __Pyx_GOTREF(__pyx_t_3);
8655   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8656   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 312, __pyx_L1_error)
8657   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8658   __PYX_XDEC_MEMVIEW(&__pyx_v_self->i, 0);
8659   __pyx_v_self->i = __pyx_t_5;
8660   __pyx_t_5.memview = NULL;
8661   __pyx_t_5.data = NULL;
8662 
8663   /* "yt/geometry/particle_deposit.pyx":303
8664  *     cdef np.float64_t[:,:,:,:] qk
8665  *     cdef np.float64_t[:,:,:,:] i
8666  *     def initialize(self):             # <<<<<<<<<<<<<<
8667  *         # we do this in a single pass, but need two scalar
8668  *         # per cell, M_k, and Q_k and also the number of particles
8669  */
8670 
8671   /* function exit code */
8672   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8673   goto __pyx_L0;
8674   __pyx_L1_error:;
8675   __Pyx_XDECREF(__pyx_t_1);
8676   __Pyx_XDECREF(__pyx_t_2);
8677   __Pyx_XDECREF(__pyx_t_3);
8678   __Pyx_XDECREF(__pyx_t_4);
8679   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
8680   __Pyx_AddTraceback("yt.geometry.particle_deposit.StdParticleField.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
8681   __pyx_r = NULL;
8682   __pyx_L0:;
8683   __Pyx_XGIVEREF(__pyx_r);
8684   __Pyx_RefNannyFinishContext();
8685   return __pyx_r;
8686 }
8687 
8688 /* "yt/geometry/particle_deposit.pyx":317
8689  *     @cython.cdivision(True)
8690  *     @cython.boundscheck(False)
8691  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
8692  *                      np.float64_t left_edge[3],
8693  *                      np.float64_t dds[3],
8694  */
8695 
__pyx_f_2yt_8geometry_16particle_deposit_16StdParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)8696 static int __pyx_f_2yt_8geometry_16particle_deposit_16StdParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
8697   int __pyx_v_ii[3];
8698   int __pyx_v_i;
8699   float __pyx_v_k;
8700   float __pyx_v_mk;
8701   float __pyx_v_qk;
8702   int __pyx_r;
8703   int __pyx_t_1;
8704   Py_ssize_t __pyx_t_2;
8705   Py_ssize_t __pyx_t_3;
8706   Py_ssize_t __pyx_t_4;
8707   __pyx_t_5numpy_int64_t __pyx_t_5;
8708   Py_ssize_t __pyx_t_6;
8709   Py_ssize_t __pyx_t_7;
8710   Py_ssize_t __pyx_t_8;
8711   __pyx_t_5numpy_int64_t __pyx_t_9;
8712   Py_ssize_t __pyx_t_10;
8713   Py_ssize_t __pyx_t_11;
8714   Py_ssize_t __pyx_t_12;
8715   __pyx_t_5numpy_int64_t __pyx_t_13;
8716   int __pyx_t_14;
8717   Py_ssize_t __pyx_t_15;
8718   Py_ssize_t __pyx_t_16;
8719   Py_ssize_t __pyx_t_17;
8720   Py_ssize_t __pyx_t_18;
8721   __pyx_t_5numpy_int64_t __pyx_t_19;
8722   Py_ssize_t __pyx_t_20;
8723   Py_ssize_t __pyx_t_21;
8724   Py_ssize_t __pyx_t_22;
8725   Py_ssize_t __pyx_t_23;
8726   __pyx_t_5numpy_int64_t __pyx_t_24;
8727   Py_ssize_t __pyx_t_25;
8728   Py_ssize_t __pyx_t_26;
8729   Py_ssize_t __pyx_t_27;
8730   Py_ssize_t __pyx_t_28;
8731   Py_ssize_t __pyx_t_29;
8732   __pyx_t_5numpy_int64_t __pyx_t_30;
8733   Py_ssize_t __pyx_t_31;
8734   Py_ssize_t __pyx_t_32;
8735   Py_ssize_t __pyx_t_33;
8736   __pyx_t_5numpy_int64_t __pyx_t_34;
8737 
8738   /* "yt/geometry/particle_deposit.pyx":328
8739  *         cdef int i, cell_index
8740  *         cdef float k, mk, qk
8741  *         for i in range(3):             # <<<<<<<<<<<<<<
8742  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
8743  *         k = self.i[ii[2], ii[1], ii[0], offset]
8744  */
8745   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
8746     __pyx_v_i = __pyx_t_1;
8747 
8748     /* "yt/geometry/particle_deposit.pyx":329
8749  *         cdef float k, mk, qk
8750  *         for i in range(3):
8751  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])             # <<<<<<<<<<<<<<
8752  *         k = self.i[ii[2], ii[1], ii[0], offset]
8753  *         mk = self.mk[ii[2], ii[1], ii[0], offset]
8754  */
8755     (__pyx_v_ii[__pyx_v_i]) = ((int)(((__pyx_v_ppos[__pyx_v_i]) - (__pyx_v_left_edge[__pyx_v_i])) / (__pyx_v_dds[__pyx_v_i])));
8756   }
8757 
8758   /* "yt/geometry/particle_deposit.pyx":330
8759  *         for i in range(3):
8760  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
8761  *         k = self.i[ii[2], ii[1], ii[0], offset]             # <<<<<<<<<<<<<<
8762  *         mk = self.mk[ii[2], ii[1], ii[0], offset]
8763  *         qk = self.qk[ii[2], ii[1], ii[0], offset]
8764  */
8765   if (unlikely(!__pyx_v_self->i.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 330, __pyx_L1_error)}
8766   __pyx_t_2 = (__pyx_v_ii[2]);
8767   __pyx_t_3 = (__pyx_v_ii[1]);
8768   __pyx_t_4 = (__pyx_v_ii[0]);
8769   __pyx_t_5 = __pyx_v_offset;
8770   if (__pyx_t_2 < 0) __pyx_t_2 += __pyx_v_self->i.shape[0];
8771   if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_v_self->i.shape[1];
8772   if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_self->i.shape[2];
8773   if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_self->i.shape[3];
8774   __pyx_v_k = (*((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->i.data + __pyx_t_2 * __pyx_v_self->i.strides[0]) ) + __pyx_t_3 * __pyx_v_self->i.strides[1]) ) + __pyx_t_4 * __pyx_v_self->i.strides[2]) ) + __pyx_t_5 * __pyx_v_self->i.strides[3]) )));
8775 
8776   /* "yt/geometry/particle_deposit.pyx":331
8777  *             ii[i] = <int>((ppos[i] - left_edge[i])/dds[i])
8778  *         k = self.i[ii[2], ii[1], ii[0], offset]
8779  *         mk = self.mk[ii[2], ii[1], ii[0], offset]             # <<<<<<<<<<<<<<
8780  *         qk = self.qk[ii[2], ii[1], ii[0], offset]
8781  *         if k == 0.0:
8782  */
8783   if (unlikely(!__pyx_v_self->mk.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 331, __pyx_L1_error)}
8784   __pyx_t_6 = (__pyx_v_ii[2]);
8785   __pyx_t_7 = (__pyx_v_ii[1]);
8786   __pyx_t_8 = (__pyx_v_ii[0]);
8787   __pyx_t_9 = __pyx_v_offset;
8788   if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_v_self->mk.shape[0];
8789   if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_v_self->mk.shape[1];
8790   if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_self->mk.shape[2];
8791   if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_self->mk.shape[3];
8792   __pyx_v_mk = (*((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->mk.data + __pyx_t_6 * __pyx_v_self->mk.strides[0]) ) + __pyx_t_7 * __pyx_v_self->mk.strides[1]) ) + __pyx_t_8 * __pyx_v_self->mk.strides[2]) ) + __pyx_t_9 * __pyx_v_self->mk.strides[3]) )));
8793 
8794   /* "yt/geometry/particle_deposit.pyx":332
8795  *         k = self.i[ii[2], ii[1], ii[0], offset]
8796  *         mk = self.mk[ii[2], ii[1], ii[0], offset]
8797  *         qk = self.qk[ii[2], ii[1], ii[0], offset]             # <<<<<<<<<<<<<<
8798  *         if k == 0.0:
8799  *             # Initialize cell values
8800  */
8801   if (unlikely(!__pyx_v_self->qk.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 332, __pyx_L1_error)}
8802   __pyx_t_10 = (__pyx_v_ii[2]);
8803   __pyx_t_11 = (__pyx_v_ii[1]);
8804   __pyx_t_12 = (__pyx_v_ii[0]);
8805   __pyx_t_13 = __pyx_v_offset;
8806   if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_self->qk.shape[0];
8807   if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_v_self->qk.shape[1];
8808   if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_self->qk.shape[2];
8809   if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_self->qk.shape[3];
8810   __pyx_v_qk = (*((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->qk.data + __pyx_t_10 * __pyx_v_self->qk.strides[0]) ) + __pyx_t_11 * __pyx_v_self->qk.strides[1]) ) + __pyx_t_12 * __pyx_v_self->qk.strides[2]) ) + __pyx_t_13 * __pyx_v_self->qk.strides[3]) )));
8811 
8812   /* "yt/geometry/particle_deposit.pyx":333
8813  *         mk = self.mk[ii[2], ii[1], ii[0], offset]
8814  *         qk = self.qk[ii[2], ii[1], ii[0], offset]
8815  *         if k == 0.0:             # <<<<<<<<<<<<<<
8816  *             # Initialize cell values
8817  *             self.mk[ii[2], ii[1], ii[0], offset] = fields[0]
8818  */
8819   __pyx_t_14 = ((__pyx_v_k == 0.0) != 0);
8820   if (__pyx_t_14) {
8821 
8822     /* "yt/geometry/particle_deposit.pyx":335
8823  *         if k == 0.0:
8824  *             # Initialize cell values
8825  *             self.mk[ii[2], ii[1], ii[0], offset] = fields[0]             # <<<<<<<<<<<<<<
8826  *         else:
8827  *             self.mk[ii[2], ii[1], ii[0], offset] = mk + (fields[0] - mk) / k
8828  */
8829     __pyx_t_15 = 0;
8830     if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_fields.shape[0];
8831     if (unlikely(!__pyx_v_self->mk.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 335, __pyx_L1_error)}
8832     __pyx_t_16 = (__pyx_v_ii[2]);
8833     __pyx_t_17 = (__pyx_v_ii[1]);
8834     __pyx_t_18 = (__pyx_v_ii[0]);
8835     __pyx_t_19 = __pyx_v_offset;
8836     if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_self->mk.shape[0];
8837     if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_self->mk.shape[1];
8838     if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_v_self->mk.shape[2];
8839     if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_v_self->mk.shape[3];
8840     *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->mk.data + __pyx_t_16 * __pyx_v_self->mk.strides[0]) ) + __pyx_t_17 * __pyx_v_self->mk.strides[1]) ) + __pyx_t_18 * __pyx_v_self->mk.strides[2]) ) + __pyx_t_19 * __pyx_v_self->mk.strides[3]) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_15 * __pyx_v_fields.strides[0]) )));
8841 
8842     /* "yt/geometry/particle_deposit.pyx":333
8843  *         mk = self.mk[ii[2], ii[1], ii[0], offset]
8844  *         qk = self.qk[ii[2], ii[1], ii[0], offset]
8845  *         if k == 0.0:             # <<<<<<<<<<<<<<
8846  *             # Initialize cell values
8847  *             self.mk[ii[2], ii[1], ii[0], offset] = fields[0]
8848  */
8849     goto __pyx_L5;
8850   }
8851 
8852   /* "yt/geometry/particle_deposit.pyx":337
8853  *             self.mk[ii[2], ii[1], ii[0], offset] = fields[0]
8854  *         else:
8855  *             self.mk[ii[2], ii[1], ii[0], offset] = mk + (fields[0] - mk) / k             # <<<<<<<<<<<<<<
8856  *             self.qk[ii[2], ii[1], ii[0], offset] = \
8857  *                 qk + (k - 1.0) * (fields[0] - mk) * (fields[0] - mk) / k
8858  */
8859   /*else*/ {
8860     __pyx_t_20 = 0;
8861     if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_v_fields.shape[0];
8862     if (unlikely(!__pyx_v_self->mk.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 337, __pyx_L1_error)}
8863     __pyx_t_21 = (__pyx_v_ii[2]);
8864     __pyx_t_22 = (__pyx_v_ii[1]);
8865     __pyx_t_23 = (__pyx_v_ii[0]);
8866     __pyx_t_24 = __pyx_v_offset;
8867     if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_v_self->mk.shape[0];
8868     if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_v_self->mk.shape[1];
8869     if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_v_self->mk.shape[2];
8870     if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_self->mk.shape[3];
8871     *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->mk.data + __pyx_t_21 * __pyx_v_self->mk.strides[0]) ) + __pyx_t_22 * __pyx_v_self->mk.strides[1]) ) + __pyx_t_23 * __pyx_v_self->mk.strides[2]) ) + __pyx_t_24 * __pyx_v_self->mk.strides[3]) )) = (__pyx_v_mk + (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_20 * __pyx_v_fields.strides[0]) ))) - __pyx_v_mk) / __pyx_v_k));
8872 
8873     /* "yt/geometry/particle_deposit.pyx":339
8874  *             self.mk[ii[2], ii[1], ii[0], offset] = mk + (fields[0] - mk) / k
8875  *             self.qk[ii[2], ii[1], ii[0], offset] = \
8876  *                 qk + (k - 1.0) * (fields[0] - mk) * (fields[0] - mk) / k             # <<<<<<<<<<<<<<
8877  *         self.i[ii[2], ii[1], ii[0], offset] += 1
8878  *         return 0
8879  */
8880     __pyx_t_25 = 0;
8881     if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_v_fields.shape[0];
8882     __pyx_t_26 = 0;
8883     if (__pyx_t_26 < 0) __pyx_t_26 += __pyx_v_fields.shape[0];
8884 
8885     /* "yt/geometry/particle_deposit.pyx":338
8886  *         else:
8887  *             self.mk[ii[2], ii[1], ii[0], offset] = mk + (fields[0] - mk) / k
8888  *             self.qk[ii[2], ii[1], ii[0], offset] = \             # <<<<<<<<<<<<<<
8889  *                 qk + (k - 1.0) * (fields[0] - mk) * (fields[0] - mk) / k
8890  *         self.i[ii[2], ii[1], ii[0], offset] += 1
8891  */
8892     if (unlikely(!__pyx_v_self->qk.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 338, __pyx_L1_error)}
8893     __pyx_t_27 = (__pyx_v_ii[2]);
8894     __pyx_t_28 = (__pyx_v_ii[1]);
8895     __pyx_t_29 = (__pyx_v_ii[0]);
8896     __pyx_t_30 = __pyx_v_offset;
8897     if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_v_self->qk.shape[0];
8898     if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_v_self->qk.shape[1];
8899     if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_v_self->qk.shape[2];
8900     if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_v_self->qk.shape[3];
8901     *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->qk.data + __pyx_t_27 * __pyx_v_self->qk.strides[0]) ) + __pyx_t_28 * __pyx_v_self->qk.strides[1]) ) + __pyx_t_29 * __pyx_v_self->qk.strides[2]) ) + __pyx_t_30 * __pyx_v_self->qk.strides[3]) )) = (__pyx_v_qk + ((((__pyx_v_k - 1.0) * ((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_25 * __pyx_v_fields.strides[0]) ))) - __pyx_v_mk)) * ((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_26 * __pyx_v_fields.strides[0]) ))) - __pyx_v_mk)) / __pyx_v_k));
8902   }
8903   __pyx_L5:;
8904 
8905   /* "yt/geometry/particle_deposit.pyx":340
8906  *             self.qk[ii[2], ii[1], ii[0], offset] = \
8907  *                 qk + (k - 1.0) * (fields[0] - mk) * (fields[0] - mk) / k
8908  *         self.i[ii[2], ii[1], ii[0], offset] += 1             # <<<<<<<<<<<<<<
8909  *         return 0
8910  *
8911  */
8912   if (unlikely(!__pyx_v_self->i.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 340, __pyx_L1_error)}
8913   __pyx_t_31 = (__pyx_v_ii[2]);
8914   __pyx_t_32 = (__pyx_v_ii[1]);
8915   __pyx_t_33 = (__pyx_v_ii[0]);
8916   __pyx_t_34 = __pyx_v_offset;
8917   if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_v_self->i.shape[0];
8918   if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_v_self->i.shape[1];
8919   if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_v_self->i.shape[2];
8920   if (__pyx_t_34 < 0) __pyx_t_34 += __pyx_v_self->i.shape[3];
8921   *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->i.data + __pyx_t_31 * __pyx_v_self->i.strides[0]) ) + __pyx_t_32 * __pyx_v_self->i.strides[1]) ) + __pyx_t_33 * __pyx_v_self->i.strides[2]) ) + __pyx_t_34 * __pyx_v_self->i.strides[3]) )) += 1.0;
8922 
8923   /* "yt/geometry/particle_deposit.pyx":341
8924  *                 qk + (k - 1.0) * (fields[0] - mk) * (fields[0] - mk) / k
8925  *         self.i[ii[2], ii[1], ii[0], offset] += 1
8926  *         return 0             # <<<<<<<<<<<<<<
8927  *
8928  *     def finalize(self):
8929  */
8930   __pyx_r = 0;
8931   goto __pyx_L0;
8932 
8933   /* "yt/geometry/particle_deposit.pyx":317
8934  *     @cython.cdivision(True)
8935  *     @cython.boundscheck(False)
8936  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
8937  *                      np.float64_t left_edge[3],
8938  *                      np.float64_t dds[3],
8939  */
8940 
8941   /* function exit code */
8942   __pyx_L1_error:;
8943   {
8944     #ifdef WITH_THREAD
8945     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
8946     #endif
8947     __Pyx_AddTraceback("yt.geometry.particle_deposit.StdParticleField.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
8948     #ifdef WITH_THREAD
8949     __Pyx_PyGILState_Release(__pyx_gilstate_save);
8950     #endif
8951   }
8952   __pyx_r = -1;
8953   __pyx_L0:;
8954   return __pyx_r;
8955 }
8956 
8957 /* "yt/geometry/particle_deposit.pyx":343
8958  *         return 0
8959  *
8960  *     def finalize(self):             # <<<<<<<<<<<<<<
8961  *         # This is the standard variance
8962  *         # if we want sample variance divide by (self.oi - 1.0)
8963  */
8964 
8965 /* Python wrapper */
8966 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)8967 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8968   PyObject *__pyx_r = 0;
8969   __Pyx_RefNannyDeclarations
8970   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
8971   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *)__pyx_v_self));
8972 
8973   /* function exit code */
8974   __Pyx_RefNannyFinishContext();
8975   return __pyx_r;
8976 }
8977 
__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField * __pyx_v_self)8978 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self) {
8979   PyObject *__pyx_v_i = NULL;
8980   PyObject *__pyx_v_std2 = NULL;
8981   PyObject *__pyx_r = NULL;
8982   __Pyx_RefNannyDeclarations
8983   PyObject *__pyx_t_1 = NULL;
8984   PyObject *__pyx_t_2 = NULL;
8985   PyObject *__pyx_t_3 = NULL;
8986   PyObject *__pyx_t_4 = NULL;
8987   __Pyx_RefNannySetupContext("finalize", 0);
8988 
8989   /* "yt/geometry/particle_deposit.pyx":346
8990  *         # This is the standard variance
8991  *         # if we want sample variance divide by (self.oi - 1.0)
8992  *         i = np.asarray(self.i)             # <<<<<<<<<<<<<<
8993  *         std2 = np.asarray(self.qk) / i
8994  *         std2[i == 0.0] = 0.0
8995  */
8996   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 346, __pyx_L1_error)
8997   __Pyx_GOTREF(__pyx_t_2);
8998   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 346, __pyx_L1_error)
8999   __Pyx_GOTREF(__pyx_t_3);
9000   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9001   if (unlikely(!__pyx_v_self->i.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 346, __pyx_L1_error)}
9002   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->i, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 346, __pyx_L1_error)
9003   __Pyx_GOTREF(__pyx_t_2);
9004   __pyx_t_4 = NULL;
9005   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9006     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
9007     if (likely(__pyx_t_4)) {
9008       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9009       __Pyx_INCREF(__pyx_t_4);
9010       __Pyx_INCREF(function);
9011       __Pyx_DECREF_SET(__pyx_t_3, function);
9012     }
9013   }
9014   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
9015   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9016   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9017   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 346, __pyx_L1_error)
9018   __Pyx_GOTREF(__pyx_t_1);
9019   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9020   __pyx_v_i = __pyx_t_1;
9021   __pyx_t_1 = 0;
9022 
9023   /* "yt/geometry/particle_deposit.pyx":347
9024  *         # if we want sample variance divide by (self.oi - 1.0)
9025  *         i = np.asarray(self.i)
9026  *         std2 = np.asarray(self.qk) / i             # <<<<<<<<<<<<<<
9027  *         std2[i == 0.0] = 0.0
9028  *         std2.shape = self.nvals
9029  */
9030   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 347, __pyx_L1_error)
9031   __Pyx_GOTREF(__pyx_t_3);
9032   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 347, __pyx_L1_error)
9033   __Pyx_GOTREF(__pyx_t_2);
9034   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9035   if (unlikely(!__pyx_v_self->qk.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 347, __pyx_L1_error)}
9036   __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_self->qk, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 347, __pyx_L1_error)
9037   __Pyx_GOTREF(__pyx_t_3);
9038   __pyx_t_4 = NULL;
9039   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
9040     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
9041     if (likely(__pyx_t_4)) {
9042       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9043       __Pyx_INCREF(__pyx_t_4);
9044       __Pyx_INCREF(function);
9045       __Pyx_DECREF_SET(__pyx_t_2, function);
9046     }
9047   }
9048   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
9049   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9050   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9051   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 347, __pyx_L1_error)
9052   __Pyx_GOTREF(__pyx_t_1);
9053   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9054   __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 347, __pyx_L1_error)
9055   __Pyx_GOTREF(__pyx_t_2);
9056   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9057   __pyx_v_std2 = __pyx_t_2;
9058   __pyx_t_2 = 0;
9059 
9060   /* "yt/geometry/particle_deposit.pyx":348
9061  *         i = np.asarray(self.i)
9062  *         std2 = np.asarray(self.qk) / i
9063  *         std2[i == 0.0] = 0.0             # <<<<<<<<<<<<<<
9064  *         std2.shape = self.nvals
9065  *         return np.sqrt(std2)
9066  */
9067   __pyx_t_2 = __Pyx_PyFloat_EqObjC(__pyx_v_i, __pyx_float_0_0, 0.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 348, __pyx_L1_error)
9068   __Pyx_GOTREF(__pyx_t_2);
9069   if (unlikely(PyObject_SetItem(__pyx_v_std2, __pyx_t_2, __pyx_float_0_0) < 0)) __PYX_ERR(1, 348, __pyx_L1_error)
9070   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9071 
9072   /* "yt/geometry/particle_deposit.pyx":349
9073  *         std2 = np.asarray(self.qk) / i
9074  *         std2[i == 0.0] = 0.0
9075  *         std2.shape = self.nvals             # <<<<<<<<<<<<<<
9076  *         return np.sqrt(std2)
9077  *
9078  */
9079   __pyx_t_2 = __pyx_v_self->__pyx_base.nvals;
9080   __Pyx_INCREF(__pyx_t_2);
9081   if (__Pyx_PyObject_SetAttrStr(__pyx_v_std2, __pyx_n_s_shape, __pyx_t_2) < 0) __PYX_ERR(1, 349, __pyx_L1_error)
9082   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9083 
9084   /* "yt/geometry/particle_deposit.pyx":350
9085  *         std2[i == 0.0] = 0.0
9086  *         std2.shape = self.nvals
9087  *         return np.sqrt(std2)             # <<<<<<<<<<<<<<
9088  *
9089  * deposit_std = StdParticleField
9090  */
9091   __Pyx_XDECREF(__pyx_r);
9092   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
9093   __Pyx_GOTREF(__pyx_t_1);
9094   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 350, __pyx_L1_error)
9095   __Pyx_GOTREF(__pyx_t_3);
9096   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9097   __pyx_t_1 = NULL;
9098   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9099     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
9100     if (likely(__pyx_t_1)) {
9101       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9102       __Pyx_INCREF(__pyx_t_1);
9103       __Pyx_INCREF(function);
9104       __Pyx_DECREF_SET(__pyx_t_3, function);
9105     }
9106   }
9107   __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_std2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_std2);
9108   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9109   if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 350, __pyx_L1_error)
9110   __Pyx_GOTREF(__pyx_t_2);
9111   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9112   __pyx_r = __pyx_t_2;
9113   __pyx_t_2 = 0;
9114   goto __pyx_L0;
9115 
9116   /* "yt/geometry/particle_deposit.pyx":343
9117  *         return 0
9118  *
9119  *     def finalize(self):             # <<<<<<<<<<<<<<
9120  *         # This is the standard variance
9121  *         # if we want sample variance divide by (self.oi - 1.0)
9122  */
9123 
9124   /* function exit code */
9125   __pyx_L1_error:;
9126   __Pyx_XDECREF(__pyx_t_1);
9127   __Pyx_XDECREF(__pyx_t_2);
9128   __Pyx_XDECREF(__pyx_t_3);
9129   __Pyx_XDECREF(__pyx_t_4);
9130   __Pyx_AddTraceback("yt.geometry.particle_deposit.StdParticleField.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
9131   __pyx_r = NULL;
9132   __pyx_L0:;
9133   __Pyx_XDECREF(__pyx_v_i);
9134   __Pyx_XDECREF(__pyx_v_std2);
9135   __Pyx_XGIVEREF(__pyx_r);
9136   __Pyx_RefNannyFinishContext();
9137   return __pyx_r;
9138 }
9139 
9140 /* "(tree fragment)":1
9141  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
9142  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9143  * def __setstate_cython__(self, __pyx_state):
9144  */
9145 
9146 /* Python wrapper */
9147 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)9148 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9149   PyObject *__pyx_r = 0;
9150   __Pyx_RefNannyDeclarations
9151   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
9152   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *)__pyx_v_self));
9153 
9154   /* function exit code */
9155   __Pyx_RefNannyFinishContext();
9156   return __pyx_r;
9157 }
9158 
__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField * __pyx_v_self)9159 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self) {
9160   PyObject *__pyx_r = NULL;
9161   __Pyx_RefNannyDeclarations
9162   PyObject *__pyx_t_1 = NULL;
9163   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
9164 
9165   /* "(tree fragment)":2
9166  * def __reduce_cython__(self):
9167  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
9168  * def __setstate_cython__(self, __pyx_state):
9169  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9170  */
9171   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
9172   __Pyx_GOTREF(__pyx_t_1);
9173   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9174   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9175   __PYX_ERR(2, 2, __pyx_L1_error)
9176 
9177   /* "(tree fragment)":1
9178  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
9179  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9180  * def __setstate_cython__(self, __pyx_state):
9181  */
9182 
9183   /* function exit code */
9184   __pyx_L1_error:;
9185   __Pyx_XDECREF(__pyx_t_1);
9186   __Pyx_AddTraceback("yt.geometry.particle_deposit.StdParticleField.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9187   __pyx_r = NULL;
9188   __Pyx_XGIVEREF(__pyx_r);
9189   __Pyx_RefNannyFinishContext();
9190   return __pyx_r;
9191 }
9192 
9193 /* "(tree fragment)":3
9194  * def __reduce_cython__(self):
9195  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9196  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
9197  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9198  */
9199 
9200 /* Python wrapper */
9201 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)9202 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
9203   PyObject *__pyx_r = 0;
9204   __Pyx_RefNannyDeclarations
9205   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
9206   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
9207 
9208   /* function exit code */
9209   __Pyx_RefNannyFinishContext();
9210   return __pyx_r;
9211 }
9212 
__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)9213 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_16StdParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
9214   PyObject *__pyx_r = NULL;
9215   __Pyx_RefNannyDeclarations
9216   PyObject *__pyx_t_1 = NULL;
9217   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
9218 
9219   /* "(tree fragment)":4
9220  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9221  * def __setstate_cython__(self, __pyx_state):
9222  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
9223  */
9224   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
9225   __Pyx_GOTREF(__pyx_t_1);
9226   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9227   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9228   __PYX_ERR(2, 4, __pyx_L1_error)
9229 
9230   /* "(tree fragment)":3
9231  * def __reduce_cython__(self):
9232  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9233  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
9234  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
9235  */
9236 
9237   /* function exit code */
9238   __pyx_L1_error:;
9239   __Pyx_XDECREF(__pyx_t_1);
9240   __Pyx_AddTraceback("yt.geometry.particle_deposit.StdParticleField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9241   __pyx_r = NULL;
9242   __Pyx_XGIVEREF(__pyx_r);
9243   __Pyx_RefNannyFinishContext();
9244   return __pyx_r;
9245 }
9246 
9247 /* "yt/geometry/particle_deposit.pyx":357
9248  *     cdef np.float64_t[:,:,:,:] field
9249  *     cdef public object ofield
9250  *     def initialize(self):             # <<<<<<<<<<<<<<
9251  *         if not all(_ > 1 for _ in self.nvals[:-1]):
9252  *             from yt.utilities.exceptions import YTBoundsDefinitionError
9253  */
9254 
9255 /* Python wrapper */
9256 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)9257 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9258   PyObject *__pyx_r = 0;
9259   __Pyx_RefNannyDeclarations
9260   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
9261   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self));
9262 
9263   /* function exit code */
9264   __Pyx_RefNannyFinishContext();
9265   return __pyx_r;
9266 }
9267 static PyObject *__pyx_gb_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
9268 
9269 /* "yt/geometry/particle_deposit.pyx":358
9270  *     cdef public object ofield
9271  *     def initialize(self):
9272  *         if not all(_ > 1 for _ in self.nvals[:-1]):             # <<<<<<<<<<<<<<
9273  *             from yt.utilities.exceptions import YTBoundsDefinitionError
9274  *             raise YTBoundsDefinitionError(
9275  */
9276 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_genexpr(PyObject * __pyx_self)9277 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_genexpr(PyObject *__pyx_self) {
9278   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
9279   PyObject *__pyx_r = NULL;
9280   __Pyx_RefNannyDeclarations
9281   __Pyx_RefNannySetupContext("genexpr", 0);
9282   __pyx_cur_scope = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *)__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(__pyx_ptype_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
9283   if (unlikely(!__pyx_cur_scope)) {
9284     __pyx_cur_scope = ((struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *)Py_None);
9285     __Pyx_INCREF(Py_None);
9286     __PYX_ERR(1, 358, __pyx_L1_error)
9287   } else {
9288     __Pyx_GOTREF(__pyx_cur_scope);
9289   }
9290   __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *) __pyx_self;
9291   __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
9292   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
9293   {
9294     __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_initialize_locals_genexpr, __pyx_n_s_yt_geometry_particle_deposit); if (unlikely(!gen)) __PYX_ERR(1, 358, __pyx_L1_error)
9295     __Pyx_DECREF(__pyx_cur_scope);
9296     __Pyx_RefNannyFinishContext();
9297     return (PyObject *) gen;
9298   }
9299 
9300   /* function exit code */
9301   __pyx_L1_error:;
9302   __Pyx_AddTraceback("yt.geometry.particle_deposit.CICDeposit.initialize.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
9303   __pyx_r = NULL;
9304   __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
9305   __Pyx_XGIVEREF(__pyx_r);
9306   __Pyx_RefNannyFinishContext();
9307   return __pyx_r;
9308 }
9309 
__pyx_gb_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_2generator(__pyx_CoroutineObject * __pyx_generator,CYTHON_UNUSED PyThreadState * __pyx_tstate,PyObject * __pyx_sent_value)9310 static PyObject *__pyx_gb_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
9311 {
9312   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
9313   PyObject *__pyx_r = NULL;
9314   PyObject *__pyx_t_1 = NULL;
9315   PyObject *__pyx_t_2 = NULL;
9316   Py_ssize_t __pyx_t_3;
9317   PyObject *(*__pyx_t_4)(PyObject *);
9318   int __pyx_t_5;
9319   int __pyx_t_6;
9320   __Pyx_RefNannyDeclarations
9321   __Pyx_RefNannySetupContext("genexpr", 0);
9322   switch (__pyx_generator->resume_label) {
9323     case 0: goto __pyx_L3_first_run;
9324     default: /* CPython raises the right error here */
9325     __Pyx_RefNannyFinishContext();
9326     return NULL;
9327   }
9328   __pyx_L3_first_run:;
9329   if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 358, __pyx_L1_error)
9330   if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 358, __pyx_L1_error) }
9331   __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_base.nvals, 0, -1L, NULL, NULL, &__pyx_slice__12, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
9332   __Pyx_GOTREF(__pyx_t_1);
9333   if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
9334     __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
9335     __pyx_t_4 = NULL;
9336   } else {
9337     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 358, __pyx_L1_error)
9338     __Pyx_GOTREF(__pyx_t_2);
9339     __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 358, __pyx_L1_error)
9340   }
9341   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9342   for (;;) {
9343     if (likely(!__pyx_t_4)) {
9344       if (likely(PyList_CheckExact(__pyx_t_2))) {
9345         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
9346         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9347         __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
9348         #else
9349         __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
9350         __Pyx_GOTREF(__pyx_t_1);
9351         #endif
9352       } else {
9353         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
9354         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9355         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
9356         #else
9357         __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
9358         __Pyx_GOTREF(__pyx_t_1);
9359         #endif
9360       }
9361     } else {
9362       __pyx_t_1 = __pyx_t_4(__pyx_t_2);
9363       if (unlikely(!__pyx_t_1)) {
9364         PyObject* exc_type = PyErr_Occurred();
9365         if (exc_type) {
9366           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9367           else __PYX_ERR(1, 358, __pyx_L1_error)
9368         }
9369         break;
9370       }
9371       __Pyx_GOTREF(__pyx_t_1);
9372     }
9373     __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__);
9374     __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_1);
9375     __Pyx_GIVEREF(__pyx_t_1);
9376     __pyx_t_1 = 0;
9377     __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v__, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
9378     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
9379     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9380     __pyx_t_6 = ((!__pyx_t_5) != 0);
9381     if (__pyx_t_6) {
9382       __Pyx_XDECREF(__pyx_r);
9383       __Pyx_INCREF(Py_False);
9384       __pyx_r = Py_False;
9385       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9386       goto __pyx_L0;
9387     }
9388   }
9389   /*else*/ {
9390     __Pyx_XDECREF(__pyx_r);
9391     __Pyx_INCREF(Py_True);
9392     __pyx_r = Py_True;
9393     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9394     goto __pyx_L0;
9395   }
9396   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9397   CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
9398 
9399   /* function exit code */
9400   goto __pyx_L0;
9401   __pyx_L1_error:;
9402   __Pyx_XDECREF(__pyx_t_1);
9403   __Pyx_XDECREF(__pyx_t_2);
9404   __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
9405   __pyx_L0:;
9406   __Pyx_XGIVEREF(__pyx_r);
9407   #if !CYTHON_USE_EXC_INFO_STACK
9408   __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
9409   #endif
9410   __pyx_generator->resume_label = -1;
9411   __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
9412   __Pyx_RefNannyFinishContext();
9413   return __pyx_r;
9414 }
9415 
9416 /* "yt/geometry/particle_deposit.pyx":357
9417  *     cdef np.float64_t[:,:,:,:] field
9418  *     cdef public object ofield
9419  *     def initialize(self):             # <<<<<<<<<<<<<<
9420  *         if not all(_ > 1 for _ in self.nvals[:-1]):
9421  *             from yt.utilities.exceptions import YTBoundsDefinitionError
9422  */
9423 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self)9424 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self) {
9425   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *__pyx_cur_scope;
9426   PyObject *__pyx_v_YTBoundsDefinitionError = NULL;
9427   PyObject *__pyx_r = NULL;
9428   __Pyx_RefNannyDeclarations
9429   PyObject *__pyx_t_1 = NULL;
9430   PyObject *__pyx_t_2 = NULL;
9431   int __pyx_t_3;
9432   int __pyx_t_4;
9433   PyObject *__pyx_t_5 = NULL;
9434   PyObject *__pyx_t_6 = NULL;
9435   int __pyx_t_7;
9436   PyObject *__pyx_t_8 = NULL;
9437   __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
9438   __Pyx_RefNannySetupContext("initialize", 0);
9439   __pyx_cur_scope = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *)__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(__pyx_ptype_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize, __pyx_empty_tuple, NULL);
9440   if (unlikely(!__pyx_cur_scope)) {
9441     __pyx_cur_scope = ((struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *)Py_None);
9442     __Pyx_INCREF(Py_None);
9443     __PYX_ERR(1, 357, __pyx_L1_error)
9444   } else {
9445     __Pyx_GOTREF(__pyx_cur_scope);
9446   }
9447   __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
9448   __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
9449   __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
9450 
9451   /* "yt/geometry/particle_deposit.pyx":358
9452  *     cdef public object ofield
9453  *     def initialize(self):
9454  *         if not all(_ > 1 for _ in self.nvals[:-1]):             # <<<<<<<<<<<<<<
9455  *             from yt.utilities.exceptions import YTBoundsDefinitionError
9456  *             raise YTBoundsDefinitionError(
9457  */
9458   __pyx_t_1 = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_10initialize_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
9459   __Pyx_GOTREF(__pyx_t_1);
9460   __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 358, __pyx_L1_error)
9461   __Pyx_GOTREF(__pyx_t_2);
9462   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9463   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 358, __pyx_L1_error)
9464   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9465   __pyx_t_4 = ((!__pyx_t_3) != 0);
9466   if (__pyx_t_4) {
9467 
9468     /* "yt/geometry/particle_deposit.pyx":359
9469  *     def initialize(self):
9470  *         if not all(_ > 1 for _ in self.nvals[:-1]):
9471  *             from yt.utilities.exceptions import YTBoundsDefinitionError             # <<<<<<<<<<<<<<
9472  *             raise YTBoundsDefinitionError(
9473  *                 "CIC requires minimum of 2 zones in all spatial dimensions.",
9474  */
9475     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error)
9476     __Pyx_GOTREF(__pyx_t_2);
9477     __Pyx_INCREF(__pyx_n_s_YTBoundsDefinitionError);
9478     __Pyx_GIVEREF(__pyx_n_s_YTBoundsDefinitionError);
9479     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_YTBoundsDefinitionError);
9480     __pyx_t_1 = __Pyx_Import(__pyx_n_s_yt_utilities_exceptions, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 359, __pyx_L1_error)
9481     __Pyx_GOTREF(__pyx_t_1);
9482     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9483     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_YTBoundsDefinitionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error)
9484     __Pyx_GOTREF(__pyx_t_2);
9485     __Pyx_INCREF(__pyx_t_2);
9486     __pyx_v_YTBoundsDefinitionError = __pyx_t_2;
9487     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9488     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9489 
9490     /* "yt/geometry/particle_deposit.pyx":362
9491  *             raise YTBoundsDefinitionError(
9492  *                 "CIC requires minimum of 2 zones in all spatial dimensions.",
9493  *                 self.nvals[:-1])             # <<<<<<<<<<<<<<
9494  *         self.field = append_axes(
9495  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
9496  */
9497     __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_self->__pyx_base.nvals, 0, -1L, NULL, NULL, &__pyx_slice__12, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 362, __pyx_L1_error)
9498     __Pyx_GOTREF(__pyx_t_2);
9499     __Pyx_INCREF(__pyx_v_YTBoundsDefinitionError);
9500     __pyx_t_5 = __pyx_v_YTBoundsDefinitionError; __pyx_t_6 = NULL;
9501     __pyx_t_7 = 0;
9502     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
9503       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
9504       if (likely(__pyx_t_6)) {
9505         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9506         __Pyx_INCREF(__pyx_t_6);
9507         __Pyx_INCREF(function);
9508         __Pyx_DECREF_SET(__pyx_t_5, function);
9509         __pyx_t_7 = 1;
9510       }
9511     }
9512     #if CYTHON_FAST_PYCALL
9513     if (PyFunction_Check(__pyx_t_5)) {
9514       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_CIC_requires_minimum_of_2_zones, __pyx_t_2};
9515       __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
9516       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9517       __Pyx_GOTREF(__pyx_t_1);
9518       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9519     } else
9520     #endif
9521     #if CYTHON_FAST_PYCCALL
9522     if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
9523       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_s_CIC_requires_minimum_of_2_zones, __pyx_t_2};
9524       __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
9525       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9526       __Pyx_GOTREF(__pyx_t_1);
9527       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9528     } else
9529     #endif
9530     {
9531       __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 360, __pyx_L1_error)
9532       __Pyx_GOTREF(__pyx_t_8);
9533       if (__pyx_t_6) {
9534         __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
9535       }
9536       __Pyx_INCREF(__pyx_kp_s_CIC_requires_minimum_of_2_zones);
9537       __Pyx_GIVEREF(__pyx_kp_s_CIC_requires_minimum_of_2_zones);
9538       PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_CIC_requires_minimum_of_2_zones);
9539       __Pyx_GIVEREF(__pyx_t_2);
9540       PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2);
9541       __pyx_t_2 = 0;
9542       __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
9543       __Pyx_GOTREF(__pyx_t_1);
9544       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9545     }
9546     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9547     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9548     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9549     __PYX_ERR(1, 360, __pyx_L1_error)
9550 
9551     /* "yt/geometry/particle_deposit.pyx":358
9552  *     cdef public object ofield
9553  *     def initialize(self):
9554  *         if not all(_ > 1 for _ in self.nvals[:-1]):             # <<<<<<<<<<<<<<
9555  *             from yt.utilities.exceptions import YTBoundsDefinitionError
9556  *             raise YTBoundsDefinitionError(
9557  */
9558   }
9559 
9560   /* "yt/geometry/particle_deposit.pyx":364
9561  *                 self.nvals[:-1])
9562  *         self.field = append_axes(
9563  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
9564  *
9565  *     @cython.cdivision(True)
9566  */
9567   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
9568   __Pyx_GOTREF(__pyx_t_1);
9569   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 364, __pyx_L1_error)
9570   __Pyx_GOTREF(__pyx_t_5);
9571   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9572   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
9573   __Pyx_GOTREF(__pyx_t_1);
9574   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.nvals);
9575   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx_base.nvals);
9576   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_self->__pyx_base.nvals);
9577   __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 364, __pyx_L1_error)
9578   __Pyx_GOTREF(__pyx_t_8);
9579   if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 364, __pyx_L1_error)
9580   if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 364, __pyx_L1_error)
9581   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 364, __pyx_L1_error)
9582   __Pyx_GOTREF(__pyx_t_2);
9583   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9584   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9585   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9586   if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 364, __pyx_L1_error)
9587 
9588   /* "yt/geometry/particle_deposit.pyx":363
9589  *                 "CIC requires minimum of 2 zones in all spatial dimensions.",
9590  *                 self.nvals[:-1])
9591  *         self.field = append_axes(             # <<<<<<<<<<<<<<
9592  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
9593  *
9594  */
9595   __pyx_t_8 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_2), 4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 363, __pyx_L1_error)
9596   __Pyx_GOTREF(__pyx_t_8);
9597   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9598   __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(1, 363, __pyx_L1_error)
9599   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9600   __PYX_XDEC_MEMVIEW(&__pyx_cur_scope->__pyx_v_self->field, 0);
9601   __pyx_cur_scope->__pyx_v_self->field = __pyx_t_9;
9602   __pyx_t_9.memview = NULL;
9603   __pyx_t_9.data = NULL;
9604 
9605   /* "yt/geometry/particle_deposit.pyx":357
9606  *     cdef np.float64_t[:,:,:,:] field
9607  *     cdef public object ofield
9608  *     def initialize(self):             # <<<<<<<<<<<<<<
9609  *         if not all(_ > 1 for _ in self.nvals[:-1]):
9610  *             from yt.utilities.exceptions import YTBoundsDefinitionError
9611  */
9612 
9613   /* function exit code */
9614   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9615   goto __pyx_L0;
9616   __pyx_L1_error:;
9617   __Pyx_XDECREF(__pyx_t_1);
9618   __Pyx_XDECREF(__pyx_t_2);
9619   __Pyx_XDECREF(__pyx_t_5);
9620   __Pyx_XDECREF(__pyx_t_6);
9621   __Pyx_XDECREF(__pyx_t_8);
9622   __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
9623   __Pyx_AddTraceback("yt.geometry.particle_deposit.CICDeposit.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
9624   __pyx_r = NULL;
9625   __pyx_L0:;
9626   __Pyx_XDECREF(__pyx_v_YTBoundsDefinitionError);
9627   __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
9628   __Pyx_XGIVEREF(__pyx_r);
9629   __Pyx_RefNannyFinishContext();
9630   return __pyx_r;
9631 }
9632 
9633 /* "yt/geometry/particle_deposit.pyx":368
9634  *     @cython.cdivision(True)
9635  *     @cython.boundscheck(False)
9636  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
9637  *                      np.float64_t left_edge[3],
9638  *                      np.float64_t dds[3],
9639  */
9640 
__pyx_f_2yt_8geometry_16particle_deposit_10CICDeposit_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self,int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)9641 static int __pyx_f_2yt_8geometry_16particle_deposit_10CICDeposit_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self, int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
9642   int __pyx_v_i;
9643   int __pyx_v_j;
9644   int __pyx_v_k;
9645   int __pyx_v_ind[3];
9646   __pyx_t_5numpy_float64_t __pyx_v_rpos[3];
9647   __pyx_t_5numpy_float64_t __pyx_v_rdds[3][2];
9648   int __pyx_r;
9649   int __pyx_t_1;
9650   int __pyx_t_2;
9651   int __pyx_t_3;
9652   Py_ssize_t __pyx_t_4;
9653   Py_ssize_t __pyx_t_5;
9654   Py_ssize_t __pyx_t_6;
9655   Py_ssize_t __pyx_t_7;
9656   __pyx_t_5numpy_int64_t __pyx_t_8;
9657 
9658   /* "yt/geometry/particle_deposit.pyx":387
9659  *
9660  *         # Compute the position of the central cell
9661  *         for i in range(3):             # <<<<<<<<<<<<<<
9662  *             rpos[i] = (ppos[i]-left_edge[i])/dds[i]
9663  *             rpos[i] = fclip(rpos[i], 0.5001, dim[i]-0.5001)
9664  */
9665   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
9666     __pyx_v_i = __pyx_t_1;
9667 
9668     /* "yt/geometry/particle_deposit.pyx":388
9669  *         # Compute the position of the central cell
9670  *         for i in range(3):
9671  *             rpos[i] = (ppos[i]-left_edge[i])/dds[i]             # <<<<<<<<<<<<<<
9672  *             rpos[i] = fclip(rpos[i], 0.5001, dim[i]-0.5001)
9673  *             ind[i] = <int> (rpos[i] + 0.5)
9674  */
9675     (__pyx_v_rpos[__pyx_v_i]) = (((__pyx_v_ppos[__pyx_v_i]) - (__pyx_v_left_edge[__pyx_v_i])) / (__pyx_v_dds[__pyx_v_i]));
9676 
9677     /* "yt/geometry/particle_deposit.pyx":389
9678  *         for i in range(3):
9679  *             rpos[i] = (ppos[i]-left_edge[i])/dds[i]
9680  *             rpos[i] = fclip(rpos[i], 0.5001, dim[i]-0.5001)             # <<<<<<<<<<<<<<
9681  *             ind[i] = <int> (rpos[i] + 0.5)
9682  *             # Note these are 1, then 0
9683  */
9684     (__pyx_v_rpos[__pyx_v_i]) = __pyx_f_2yt_9utilities_3lib_8fp_utils_fclip((__pyx_v_rpos[__pyx_v_i]), 0.5001, ((__pyx_v_dim[__pyx_v_i]) - 0.5001));
9685 
9686     /* "yt/geometry/particle_deposit.pyx":390
9687  *             rpos[i] = (ppos[i]-left_edge[i])/dds[i]
9688  *             rpos[i] = fclip(rpos[i], 0.5001, dim[i]-0.5001)
9689  *             ind[i] = <int> (rpos[i] + 0.5)             # <<<<<<<<<<<<<<
9690  *             # Note these are 1, then 0
9691  *             rdds[i][1] = (<np.float64_t> ind[i]) + 0.5 - rpos[i]
9692  */
9693     (__pyx_v_ind[__pyx_v_i]) = ((int)((__pyx_v_rpos[__pyx_v_i]) + 0.5));
9694 
9695     /* "yt/geometry/particle_deposit.pyx":392
9696  *             ind[i] = <int> (rpos[i] + 0.5)
9697  *             # Note these are 1, then 0
9698  *             rdds[i][1] = (<np.float64_t> ind[i]) + 0.5 - rpos[i]             # <<<<<<<<<<<<<<
9699  *             rdds[i][0] = 1.0 - rdds[i][1]
9700  *
9701  */
9702     ((__pyx_v_rdds[__pyx_v_i])[1]) = ((((__pyx_t_5numpy_float64_t)(__pyx_v_ind[__pyx_v_i])) + 0.5) - (__pyx_v_rpos[__pyx_v_i]));
9703 
9704     /* "yt/geometry/particle_deposit.pyx":393
9705  *             # Note these are 1, then 0
9706  *             rdds[i][1] = (<np.float64_t> ind[i]) + 0.5 - rpos[i]
9707  *             rdds[i][0] = 1.0 - rdds[i][1]             # <<<<<<<<<<<<<<
9708  *
9709  *         for i in range(2):
9710  */
9711     ((__pyx_v_rdds[__pyx_v_i])[0]) = (1.0 - ((__pyx_v_rdds[__pyx_v_i])[1]));
9712   }
9713 
9714   /* "yt/geometry/particle_deposit.pyx":395
9715  *             rdds[i][0] = 1.0 - rdds[i][1]
9716  *
9717  *         for i in range(2):             # <<<<<<<<<<<<<<
9718  *             for j in range(2):
9719  *                 for k in range(2):
9720  */
9721   for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
9722     __pyx_v_i = __pyx_t_1;
9723 
9724     /* "yt/geometry/particle_deposit.pyx":396
9725  *
9726  *         for i in range(2):
9727  *             for j in range(2):             # <<<<<<<<<<<<<<
9728  *                 for k in range(2):
9729  *                     self.field[ind[2] - k, ind[1] - j, ind[0] - i, offset] += \
9730  */
9731     for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
9732       __pyx_v_j = __pyx_t_2;
9733 
9734       /* "yt/geometry/particle_deposit.pyx":397
9735  *         for i in range(2):
9736  *             for j in range(2):
9737  *                 for k in range(2):             # <<<<<<<<<<<<<<
9738  *                     self.field[ind[2] - k, ind[1] - j, ind[0] - i, offset] += \
9739  *                         fields[0]*rdds[0][i]*rdds[1][j]*rdds[2][k]
9740  */
9741       for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
9742         __pyx_v_k = __pyx_t_3;
9743 
9744         /* "yt/geometry/particle_deposit.pyx":399
9745  *                 for k in range(2):
9746  *                     self.field[ind[2] - k, ind[1] - j, ind[0] - i, offset] += \
9747  *                         fields[0]*rdds[0][i]*rdds[1][j]*rdds[2][k]             # <<<<<<<<<<<<<<
9748  *
9749  *         return 0
9750  */
9751         __pyx_t_4 = 0;
9752         if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_fields.shape[0];
9753 
9754         /* "yt/geometry/particle_deposit.pyx":398
9755  *             for j in range(2):
9756  *                 for k in range(2):
9757  *                     self.field[ind[2] - k, ind[1] - j, ind[0] - i, offset] += \             # <<<<<<<<<<<<<<
9758  *                         fields[0]*rdds[0][i]*rdds[1][j]*rdds[2][k]
9759  *
9760  */
9761         if (unlikely(!__pyx_v_self->field.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 398, __pyx_L1_error)}
9762         __pyx_t_5 = ((__pyx_v_ind[2]) - __pyx_v_k);
9763         __pyx_t_6 = ((__pyx_v_ind[1]) - __pyx_v_j);
9764         __pyx_t_7 = ((__pyx_v_ind[0]) - __pyx_v_i);
9765         __pyx_t_8 = __pyx_v_offset;
9766         if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_self->field.shape[0];
9767         if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_v_self->field.shape[1];
9768         if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_v_self->field.shape[2];
9769         if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_self->field.shape[3];
9770         *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->field.data + __pyx_t_5 * __pyx_v_self->field.strides[0]) ) + __pyx_t_6 * __pyx_v_self->field.strides[1]) ) + __pyx_t_7 * __pyx_v_self->field.strides[2]) ) + __pyx_t_8 * __pyx_v_self->field.strides[3]) )) += ((((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_4 * __pyx_v_fields.strides[0]) ))) * ((__pyx_v_rdds[0])[__pyx_v_i])) * ((__pyx_v_rdds[1])[__pyx_v_j])) * ((__pyx_v_rdds[2])[__pyx_v_k]));
9771       }
9772     }
9773   }
9774 
9775   /* "yt/geometry/particle_deposit.pyx":401
9776  *                         fields[0]*rdds[0][i]*rdds[1][j]*rdds[2][k]
9777  *
9778  *         return 0             # <<<<<<<<<<<<<<
9779  *
9780  *     def finalize(self):
9781  */
9782   __pyx_r = 0;
9783   goto __pyx_L0;
9784 
9785   /* "yt/geometry/particle_deposit.pyx":368
9786  *     @cython.cdivision(True)
9787  *     @cython.boundscheck(False)
9788  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
9789  *                      np.float64_t left_edge[3],
9790  *                      np.float64_t dds[3],
9791  */
9792 
9793   /* function exit code */
9794   __pyx_L1_error:;
9795   {
9796     #ifdef WITH_THREAD
9797     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
9798     #endif
9799     __Pyx_AddTraceback("yt.geometry.particle_deposit.CICDeposit.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
9800     #ifdef WITH_THREAD
9801     __Pyx_PyGILState_Release(__pyx_gilstate_save);
9802     #endif
9803   }
9804   __pyx_r = -1;
9805   __pyx_L0:;
9806   return __pyx_r;
9807 }
9808 
9809 /* "yt/geometry/particle_deposit.pyx":403
9810  *         return 0
9811  *
9812  *     def finalize(self):             # <<<<<<<<<<<<<<
9813  *         rv = np.asarray(self.field)
9814  *         rv.shape = self.nvals
9815  */
9816 
9817 /* Python wrapper */
9818 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)9819 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9820   PyObject *__pyx_r = 0;
9821   __Pyx_RefNannyDeclarations
9822   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
9823   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self));
9824 
9825   /* function exit code */
9826   __Pyx_RefNannyFinishContext();
9827   return __pyx_r;
9828 }
9829 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self)9830 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self) {
9831   PyObject *__pyx_v_rv = NULL;
9832   PyObject *__pyx_r = NULL;
9833   __Pyx_RefNannyDeclarations
9834   PyObject *__pyx_t_1 = NULL;
9835   PyObject *__pyx_t_2 = NULL;
9836   PyObject *__pyx_t_3 = NULL;
9837   PyObject *__pyx_t_4 = NULL;
9838   __Pyx_RefNannySetupContext("finalize", 0);
9839 
9840   /* "yt/geometry/particle_deposit.pyx":404
9841  *
9842  *     def finalize(self):
9843  *         rv = np.asarray(self.field)             # <<<<<<<<<<<<<<
9844  *         rv.shape = self.nvals
9845  *         return rv
9846  */
9847   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 404, __pyx_L1_error)
9848   __Pyx_GOTREF(__pyx_t_2);
9849   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 404, __pyx_L1_error)
9850   __Pyx_GOTREF(__pyx_t_3);
9851   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9852   if (unlikely(!__pyx_v_self->field.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 404, __pyx_L1_error)}
9853   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->field, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 404, __pyx_L1_error)
9854   __Pyx_GOTREF(__pyx_t_2);
9855   __pyx_t_4 = NULL;
9856   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9857     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
9858     if (likely(__pyx_t_4)) {
9859       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9860       __Pyx_INCREF(__pyx_t_4);
9861       __Pyx_INCREF(function);
9862       __Pyx_DECREF_SET(__pyx_t_3, function);
9863     }
9864   }
9865   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
9866   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9867   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9868   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 404, __pyx_L1_error)
9869   __Pyx_GOTREF(__pyx_t_1);
9870   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9871   __pyx_v_rv = __pyx_t_1;
9872   __pyx_t_1 = 0;
9873 
9874   /* "yt/geometry/particle_deposit.pyx":405
9875  *     def finalize(self):
9876  *         rv = np.asarray(self.field)
9877  *         rv.shape = self.nvals             # <<<<<<<<<<<<<<
9878  *         return rv
9879  *
9880  */
9881   __pyx_t_1 = __pyx_v_self->__pyx_base.nvals;
9882   __Pyx_INCREF(__pyx_t_1);
9883   if (__Pyx_PyObject_SetAttrStr(__pyx_v_rv, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(1, 405, __pyx_L1_error)
9884   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9885 
9886   /* "yt/geometry/particle_deposit.pyx":406
9887  *         rv = np.asarray(self.field)
9888  *         rv.shape = self.nvals
9889  *         return rv             # <<<<<<<<<<<<<<
9890  *
9891  * deposit_cic = CICDeposit
9892  */
9893   __Pyx_XDECREF(__pyx_r);
9894   __Pyx_INCREF(__pyx_v_rv);
9895   __pyx_r = __pyx_v_rv;
9896   goto __pyx_L0;
9897 
9898   /* "yt/geometry/particle_deposit.pyx":403
9899  *         return 0
9900  *
9901  *     def finalize(self):             # <<<<<<<<<<<<<<
9902  *         rv = np.asarray(self.field)
9903  *         rv.shape = self.nvals
9904  */
9905 
9906   /* function exit code */
9907   __pyx_L1_error:;
9908   __Pyx_XDECREF(__pyx_t_1);
9909   __Pyx_XDECREF(__pyx_t_2);
9910   __Pyx_XDECREF(__pyx_t_3);
9911   __Pyx_XDECREF(__pyx_t_4);
9912   __Pyx_AddTraceback("yt.geometry.particle_deposit.CICDeposit.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
9913   __pyx_r = NULL;
9914   __pyx_L0:;
9915   __Pyx_XDECREF(__pyx_v_rv);
9916   __Pyx_XGIVEREF(__pyx_r);
9917   __Pyx_RefNannyFinishContext();
9918   return __pyx_r;
9919 }
9920 
9921 /* "yt/geometry/particle_deposit.pyx":356
9922  * cdef class CICDeposit(ParticleDepositOperation):
9923  *     cdef np.float64_t[:,:,:,:] field
9924  *     cdef public object ofield             # <<<<<<<<<<<<<<
9925  *     def initialize(self):
9926  *         if not all(_ > 1 for _ in self.nvals[:-1]):
9927  */
9928 
9929 /* Python wrapper */
9930 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_1__get__(PyObject * __pyx_v_self)9931 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_1__get__(PyObject *__pyx_v_self) {
9932   PyObject *__pyx_r = 0;
9933   __Pyx_RefNannyDeclarations
9934   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9935   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield___get__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self));
9936 
9937   /* function exit code */
9938   __Pyx_RefNannyFinishContext();
9939   return __pyx_r;
9940 }
9941 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self)9942 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield___get__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self) {
9943   PyObject *__pyx_r = NULL;
9944   __Pyx_RefNannyDeclarations
9945   __Pyx_RefNannySetupContext("__get__", 0);
9946   __Pyx_XDECREF(__pyx_r);
9947   __Pyx_INCREF(__pyx_v_self->ofield);
9948   __pyx_r = __pyx_v_self->ofield;
9949   goto __pyx_L0;
9950 
9951   /* function exit code */
9952   __pyx_L0:;
9953   __Pyx_XGIVEREF(__pyx_r);
9954   __Pyx_RefNannyFinishContext();
9955   return __pyx_r;
9956 }
9957 
9958 /* Python wrapper */
9959 static int __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)9960 static int __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9961   int __pyx_r;
9962   __Pyx_RefNannyDeclarations
9963   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9964   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_2__set__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9965 
9966   /* function exit code */
9967   __Pyx_RefNannyFinishContext();
9968   return __pyx_r;
9969 }
9970 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self,PyObject * __pyx_v_value)9971 static int __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_2__set__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self, PyObject *__pyx_v_value) {
9972   int __pyx_r;
9973   __Pyx_RefNannyDeclarations
9974   __Pyx_RefNannySetupContext("__set__", 0);
9975   __Pyx_INCREF(__pyx_v_value);
9976   __Pyx_GIVEREF(__pyx_v_value);
9977   __Pyx_GOTREF(__pyx_v_self->ofield);
9978   __Pyx_DECREF(__pyx_v_self->ofield);
9979   __pyx_v_self->ofield = __pyx_v_value;
9980 
9981   /* function exit code */
9982   __pyx_r = 0;
9983   __Pyx_RefNannyFinishContext();
9984   return __pyx_r;
9985 }
9986 
9987 /* Python wrapper */
9988 static int __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_5__del__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_5__del__(PyObject * __pyx_v_self)9989 static int __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_5__del__(PyObject *__pyx_v_self) {
9990   int __pyx_r;
9991   __Pyx_RefNannyDeclarations
9992   __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9993   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_4__del__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self));
9994 
9995   /* function exit code */
9996   __Pyx_RefNannyFinishContext();
9997   return __pyx_r;
9998 }
9999 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_4__del__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self)10000 static int __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_4__del__(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self) {
10001   int __pyx_r;
10002   __Pyx_RefNannyDeclarations
10003   __Pyx_RefNannySetupContext("__del__", 0);
10004   __Pyx_INCREF(Py_None);
10005   __Pyx_GIVEREF(Py_None);
10006   __Pyx_GOTREF(__pyx_v_self->ofield);
10007   __Pyx_DECREF(__pyx_v_self->ofield);
10008   __pyx_v_self->ofield = Py_None;
10009 
10010   /* function exit code */
10011   __pyx_r = 0;
10012   __Pyx_RefNannyFinishContext();
10013   return __pyx_r;
10014 }
10015 
10016 /* "(tree fragment)":1
10017  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10018  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10019  * def __setstate_cython__(self, __pyx_state):
10020  */
10021 
10022 /* Python wrapper */
10023 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10024 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10025   PyObject *__pyx_r = 0;
10026   __Pyx_RefNannyDeclarations
10027   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10028   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self));
10029 
10030   /* function exit code */
10031   __Pyx_RefNannyFinishContext();
10032   return __pyx_r;
10033 }
10034 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self)10035 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self) {
10036   PyObject *__pyx_r = NULL;
10037   __Pyx_RefNannyDeclarations
10038   PyObject *__pyx_t_1 = NULL;
10039   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10040 
10041   /* "(tree fragment)":2
10042  * def __reduce_cython__(self):
10043  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
10044  * def __setstate_cython__(self, __pyx_state):
10045  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10046  */
10047   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
10048   __Pyx_GOTREF(__pyx_t_1);
10049   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10050   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10051   __PYX_ERR(2, 2, __pyx_L1_error)
10052 
10053   /* "(tree fragment)":1
10054  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10055  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10056  * def __setstate_cython__(self, __pyx_state):
10057  */
10058 
10059   /* function exit code */
10060   __pyx_L1_error:;
10061   __Pyx_XDECREF(__pyx_t_1);
10062   __Pyx_AddTraceback("yt.geometry.particle_deposit.CICDeposit.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10063   __pyx_r = NULL;
10064   __Pyx_XGIVEREF(__pyx_r);
10065   __Pyx_RefNannyFinishContext();
10066   return __pyx_r;
10067 }
10068 
10069 /* "(tree fragment)":3
10070  * def __reduce_cython__(self):
10071  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10072  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
10073  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10074  */
10075 
10076 /* Python wrapper */
10077 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)10078 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10079   PyObject *__pyx_r = 0;
10080   __Pyx_RefNannyDeclarations
10081   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10082   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10083 
10084   /* function exit code */
10085   __Pyx_RefNannyFinishContext();
10086   return __pyx_r;
10087 }
10088 
__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)10089 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_10CICDeposit_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
10090   PyObject *__pyx_r = NULL;
10091   __Pyx_RefNannyDeclarations
10092   PyObject *__pyx_t_1 = NULL;
10093   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10094 
10095   /* "(tree fragment)":4
10096  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10097  * def __setstate_cython__(self, __pyx_state):
10098  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
10099  */
10100   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
10101   __Pyx_GOTREF(__pyx_t_1);
10102   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10103   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10104   __PYX_ERR(2, 4, __pyx_L1_error)
10105 
10106   /* "(tree fragment)":3
10107  * def __reduce_cython__(self):
10108  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10109  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
10110  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10111  */
10112 
10113   /* function exit code */
10114   __pyx_L1_error:;
10115   __Pyx_XDECREF(__pyx_t_1);
10116   __Pyx_AddTraceback("yt.geometry.particle_deposit.CICDeposit.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10117   __pyx_r = NULL;
10118   __Pyx_XGIVEREF(__pyx_r);
10119   __Pyx_RefNannyFinishContext();
10120   return __pyx_r;
10121 }
10122 
10123 /* "yt/geometry/particle_deposit.pyx":415
10124  *     cdef np.float64_t[:,:,:,:] wf
10125  *     cdef np.float64_t[:,:,:,:] w
10126  *     def initialize(self):             # <<<<<<<<<<<<<<
10127  *         self.wf = append_axes(
10128  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10129  */
10130 
10131 /* Python wrapper */
10132 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10133 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10134   PyObject *__pyx_r = 0;
10135   __Pyx_RefNannyDeclarations
10136   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
10137   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *)__pyx_v_self));
10138 
10139   /* function exit code */
10140   __Pyx_RefNannyFinishContext();
10141   return __pyx_r;
10142 }
10143 
__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField * __pyx_v_self)10144 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self) {
10145   PyObject *__pyx_r = NULL;
10146   __Pyx_RefNannyDeclarations
10147   PyObject *__pyx_t_1 = NULL;
10148   PyObject *__pyx_t_2 = NULL;
10149   PyObject *__pyx_t_3 = NULL;
10150   PyObject *__pyx_t_4 = NULL;
10151   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
10152   __Pyx_RefNannySetupContext("initialize", 0);
10153 
10154   /* "yt/geometry/particle_deposit.pyx":417
10155  *     def initialize(self):
10156  *         self.wf = append_axes(
10157  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)             # <<<<<<<<<<<<<<
10158  *         self.w = append_axes(
10159  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10160  */
10161   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 417, __pyx_L1_error)
10162   __Pyx_GOTREF(__pyx_t_1);
10163   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 417, __pyx_L1_error)
10164   __Pyx_GOTREF(__pyx_t_2);
10165   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10166   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 417, __pyx_L1_error)
10167   __Pyx_GOTREF(__pyx_t_1);
10168   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
10169   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
10170   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
10171   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 417, __pyx_L1_error)
10172   __Pyx_GOTREF(__pyx_t_3);
10173   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 417, __pyx_L1_error)
10174   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 417, __pyx_L1_error)
10175   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 417, __pyx_L1_error)
10176   __Pyx_GOTREF(__pyx_t_4);
10177   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10178   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10179   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10180   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 417, __pyx_L1_error)
10181 
10182   /* "yt/geometry/particle_deposit.pyx":416
10183  *     cdef np.float64_t[:,:,:,:] w
10184  *     def initialize(self):
10185  *         self.wf = append_axes(             # <<<<<<<<<<<<<<
10186  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10187  *         self.w = append_axes(
10188  */
10189   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
10190   __Pyx_GOTREF(__pyx_t_3);
10191   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10192   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 416, __pyx_L1_error)
10193   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10194   __PYX_XDEC_MEMVIEW(&__pyx_v_self->wf, 0);
10195   __pyx_v_self->wf = __pyx_t_5;
10196   __pyx_t_5.memview = NULL;
10197   __pyx_t_5.data = NULL;
10198 
10199   /* "yt/geometry/particle_deposit.pyx":419
10200  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10201  *         self.w = append_axes(
10202  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)             # <<<<<<<<<<<<<<
10203  *
10204  *     @cython.cdivision(True)
10205  */
10206   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 419, __pyx_L1_error)
10207   __Pyx_GOTREF(__pyx_t_3);
10208   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 419, __pyx_L1_error)
10209   __Pyx_GOTREF(__pyx_t_4);
10210   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10211   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 419, __pyx_L1_error)
10212   __Pyx_GOTREF(__pyx_t_3);
10213   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
10214   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
10215   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.nvals);
10216   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error)
10217   __Pyx_GOTREF(__pyx_t_1);
10218   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 419, __pyx_L1_error)
10219   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 419, __pyx_L1_error)
10220   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error)
10221   __Pyx_GOTREF(__pyx_t_2);
10222   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10223   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10224   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10225   if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 419, __pyx_L1_error)
10226 
10227   /* "yt/geometry/particle_deposit.pyx":418
10228  *         self.wf = append_axes(
10229  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10230  *         self.w = append_axes(             # <<<<<<<<<<<<<<
10231  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10232  *
10233  */
10234   __pyx_t_1 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_2), 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 418, __pyx_L1_error)
10235   __Pyx_GOTREF(__pyx_t_1);
10236   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10237   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 418, __pyx_L1_error)
10238   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10239   __PYX_XDEC_MEMVIEW(&__pyx_v_self->w, 0);
10240   __pyx_v_self->w = __pyx_t_5;
10241   __pyx_t_5.memview = NULL;
10242   __pyx_t_5.data = NULL;
10243 
10244   /* "yt/geometry/particle_deposit.pyx":415
10245  *     cdef np.float64_t[:,:,:,:] wf
10246  *     cdef np.float64_t[:,:,:,:] w
10247  *     def initialize(self):             # <<<<<<<<<<<<<<
10248  *         self.wf = append_axes(
10249  *             np.zeros(self.nvals, dtype='float64', order='F'), 4)
10250  */
10251 
10252   /* function exit code */
10253   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10254   goto __pyx_L0;
10255   __pyx_L1_error:;
10256   __Pyx_XDECREF(__pyx_t_1);
10257   __Pyx_XDECREF(__pyx_t_2);
10258   __Pyx_XDECREF(__pyx_t_3);
10259   __Pyx_XDECREF(__pyx_t_4);
10260   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
10261   __Pyx_AddTraceback("yt.geometry.particle_deposit.WeightedMeanParticleField.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
10262   __pyx_r = NULL;
10263   __pyx_L0:;
10264   __Pyx_XGIVEREF(__pyx_r);
10265   __Pyx_RefNannyFinishContext();
10266   return __pyx_r;
10267 }
10268 
10269 /* "yt/geometry/particle_deposit.pyx":423
10270  *     @cython.cdivision(True)
10271  *     @cython.boundscheck(False)
10272  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
10273  *                      np.float64_t left_edge[3],
10274  *                      np.float64_t dds[3],
10275  */
10276 
__pyx_f_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)10277 static int __pyx_f_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
10278   int __pyx_v_ii[3];
10279   int __pyx_v_i;
10280   int __pyx_r;
10281   int __pyx_t_1;
10282   Py_ssize_t __pyx_t_2;
10283   Py_ssize_t __pyx_t_3;
10284   Py_ssize_t __pyx_t_4;
10285   Py_ssize_t __pyx_t_5;
10286   __pyx_t_5numpy_int64_t __pyx_t_6;
10287   Py_ssize_t __pyx_t_7;
10288   Py_ssize_t __pyx_t_8;
10289   Py_ssize_t __pyx_t_9;
10290   Py_ssize_t __pyx_t_10;
10291   Py_ssize_t __pyx_t_11;
10292   __pyx_t_5numpy_int64_t __pyx_t_12;
10293 
10294   /* "yt/geometry/particle_deposit.pyx":433
10295  *         cdef int ii[3]
10296  *         cdef int i
10297  *         for i in range(3):             # <<<<<<<<<<<<<<
10298  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])
10299  *         self.w[ii[2], ii[1], ii[0], offset] += fields[1]
10300  */
10301   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
10302     __pyx_v_i = __pyx_t_1;
10303 
10304     /* "yt/geometry/particle_deposit.pyx":434
10305  *         cdef int i
10306  *         for i in range(3):
10307  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])             # <<<<<<<<<<<<<<
10308  *         self.w[ii[2], ii[1], ii[0], offset] += fields[1]
10309  *         self.wf[ii[2], ii[1], ii[0], offset] += fields[0] * fields[1]
10310  */
10311     (__pyx_v_ii[__pyx_v_i]) = ((int)(((__pyx_v_ppos[__pyx_v_i]) - (__pyx_v_left_edge[__pyx_v_i])) / (__pyx_v_dds[__pyx_v_i])));
10312   }
10313 
10314   /* "yt/geometry/particle_deposit.pyx":435
10315  *         for i in range(3):
10316  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])
10317  *         self.w[ii[2], ii[1], ii[0], offset] += fields[1]             # <<<<<<<<<<<<<<
10318  *         self.wf[ii[2], ii[1], ii[0], offset] += fields[0] * fields[1]
10319  *         return 0
10320  */
10321   __pyx_t_2 = 1;
10322   if (__pyx_t_2 < 0) __pyx_t_2 += __pyx_v_fields.shape[0];
10323   if (unlikely(!__pyx_v_self->w.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 435, __pyx_L1_error)}
10324   __pyx_t_3 = (__pyx_v_ii[2]);
10325   __pyx_t_4 = (__pyx_v_ii[1]);
10326   __pyx_t_5 = (__pyx_v_ii[0]);
10327   __pyx_t_6 = __pyx_v_offset;
10328   if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_v_self->w.shape[0];
10329   if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_self->w.shape[1];
10330   if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_self->w.shape[2];
10331   if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_v_self->w.shape[3];
10332   *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->w.data + __pyx_t_3 * __pyx_v_self->w.strides[0]) ) + __pyx_t_4 * __pyx_v_self->w.strides[1]) ) + __pyx_t_5 * __pyx_v_self->w.strides[2]) ) + __pyx_t_6 * __pyx_v_self->w.strides[3]) )) += (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_2 * __pyx_v_fields.strides[0]) )));
10333 
10334   /* "yt/geometry/particle_deposit.pyx":436
10335  *             ii[i] = <int>((ppos[i] - left_edge[i]) / dds[i])
10336  *         self.w[ii[2], ii[1], ii[0], offset] += fields[1]
10337  *         self.wf[ii[2], ii[1], ii[0], offset] += fields[0] * fields[1]             # <<<<<<<<<<<<<<
10338  *         return 0
10339  *
10340  */
10341   __pyx_t_7 = 0;
10342   if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_v_fields.shape[0];
10343   __pyx_t_8 = 1;
10344   if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_fields.shape[0];
10345   if (unlikely(!__pyx_v_self->wf.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 436, __pyx_L1_error)}
10346   __pyx_t_9 = (__pyx_v_ii[2]);
10347   __pyx_t_10 = (__pyx_v_ii[1]);
10348   __pyx_t_11 = (__pyx_v_ii[0]);
10349   __pyx_t_12 = __pyx_v_offset;
10350   if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_self->wf.shape[0];
10351   if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_self->wf.shape[1];
10352   if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_v_self->wf.shape[2];
10353   if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_self->wf.shape[3];
10354   *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->wf.data + __pyx_t_9 * __pyx_v_self->wf.strides[0]) ) + __pyx_t_10 * __pyx_v_self->wf.strides[1]) ) + __pyx_t_11 * __pyx_v_self->wf.strides[2]) ) + __pyx_t_12 * __pyx_v_self->wf.strides[3]) )) += ((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_7 * __pyx_v_fields.strides[0]) ))) * (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_8 * __pyx_v_fields.strides[0]) ))));
10355 
10356   /* "yt/geometry/particle_deposit.pyx":437
10357  *         self.w[ii[2], ii[1], ii[0], offset] += fields[1]
10358  *         self.wf[ii[2], ii[1], ii[0], offset] += fields[0] * fields[1]
10359  *         return 0             # <<<<<<<<<<<<<<
10360  *
10361  *     def finalize(self):
10362  */
10363   __pyx_r = 0;
10364   goto __pyx_L0;
10365 
10366   /* "yt/geometry/particle_deposit.pyx":423
10367  *     @cython.cdivision(True)
10368  *     @cython.boundscheck(False)
10369  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
10370  *                      np.float64_t left_edge[3],
10371  *                      np.float64_t dds[3],
10372  */
10373 
10374   /* function exit code */
10375   __pyx_L1_error:;
10376   {
10377     #ifdef WITH_THREAD
10378     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
10379     #endif
10380     __Pyx_AddTraceback("yt.geometry.particle_deposit.WeightedMeanParticleField.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
10381     #ifdef WITH_THREAD
10382     __Pyx_PyGILState_Release(__pyx_gilstate_save);
10383     #endif
10384   }
10385   __pyx_r = -1;
10386   __pyx_L0:;
10387   return __pyx_r;
10388 }
10389 
10390 /* "yt/geometry/particle_deposit.pyx":439
10391  *         return 0
10392  *
10393  *     def finalize(self):             # <<<<<<<<<<<<<<
10394  *         wf = np.asarray(self.wf)
10395  *         w = np.asarray(self.w)
10396  */
10397 
10398 /* Python wrapper */
10399 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10400 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10401   PyObject *__pyx_r = 0;
10402   __Pyx_RefNannyDeclarations
10403   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
10404   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *)__pyx_v_self));
10405 
10406   /* function exit code */
10407   __Pyx_RefNannyFinishContext();
10408   return __pyx_r;
10409 }
10410 
__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField * __pyx_v_self)10411 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self) {
10412   PyObject *__pyx_v_wf = NULL;
10413   PyObject *__pyx_v_w = NULL;
10414   PyObject *__pyx_v_rv = NULL;
10415   PyObject *__pyx_r = NULL;
10416   __Pyx_RefNannyDeclarations
10417   PyObject *__pyx_t_1 = NULL;
10418   PyObject *__pyx_t_2 = NULL;
10419   PyObject *__pyx_t_3 = NULL;
10420   PyObject *__pyx_t_4 = NULL;
10421   PyObject *__pyx_t_5 = NULL;
10422   PyObject *__pyx_t_6 = NULL;
10423   PyObject *__pyx_t_7 = NULL;
10424   PyObject *__pyx_t_8 = NULL;
10425   PyObject *__pyx_t_9 = NULL;
10426   int __pyx_t_10;
10427   int __pyx_t_11;
10428   __Pyx_RefNannySetupContext("finalize", 0);
10429 
10430   /* "yt/geometry/particle_deposit.pyx":440
10431  *
10432  *     def finalize(self):
10433  *         wf = np.asarray(self.wf)             # <<<<<<<<<<<<<<
10434  *         w = np.asarray(self.w)
10435  *         with np.errstate(divide='ignore', invalid='ignore'):
10436  */
10437   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 440, __pyx_L1_error)
10438   __Pyx_GOTREF(__pyx_t_2);
10439   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 440, __pyx_L1_error)
10440   __Pyx_GOTREF(__pyx_t_3);
10441   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10442   if (unlikely(!__pyx_v_self->wf.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 440, __pyx_L1_error)}
10443   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->wf, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 440, __pyx_L1_error)
10444   __Pyx_GOTREF(__pyx_t_2);
10445   __pyx_t_4 = NULL;
10446   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
10447     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
10448     if (likely(__pyx_t_4)) {
10449       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
10450       __Pyx_INCREF(__pyx_t_4);
10451       __Pyx_INCREF(function);
10452       __Pyx_DECREF_SET(__pyx_t_3, function);
10453     }
10454   }
10455   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
10456   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10457   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10458   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 440, __pyx_L1_error)
10459   __Pyx_GOTREF(__pyx_t_1);
10460   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10461   __pyx_v_wf = __pyx_t_1;
10462   __pyx_t_1 = 0;
10463 
10464   /* "yt/geometry/particle_deposit.pyx":441
10465  *     def finalize(self):
10466  *         wf = np.asarray(self.wf)
10467  *         w = np.asarray(self.w)             # <<<<<<<<<<<<<<
10468  *         with np.errstate(divide='ignore', invalid='ignore'):
10469  *             rv = wf / w
10470  */
10471   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 441, __pyx_L1_error)
10472   __Pyx_GOTREF(__pyx_t_3);
10473   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 441, __pyx_L1_error)
10474   __Pyx_GOTREF(__pyx_t_2);
10475   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10476   if (unlikely(!__pyx_v_self->w.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 441, __pyx_L1_error)}
10477   __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_self->w, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 441, __pyx_L1_error)
10478   __Pyx_GOTREF(__pyx_t_3);
10479   __pyx_t_4 = NULL;
10480   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
10481     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
10482     if (likely(__pyx_t_4)) {
10483       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10484       __Pyx_INCREF(__pyx_t_4);
10485       __Pyx_INCREF(function);
10486       __Pyx_DECREF_SET(__pyx_t_2, function);
10487     }
10488   }
10489   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
10490   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10491   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10492   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
10493   __Pyx_GOTREF(__pyx_t_1);
10494   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10495   __pyx_v_w = __pyx_t_1;
10496   __pyx_t_1 = 0;
10497 
10498   /* "yt/geometry/particle_deposit.pyx":442
10499  *         wf = np.asarray(self.wf)
10500  *         w = np.asarray(self.w)
10501  *         with np.errstate(divide='ignore', invalid='ignore'):             # <<<<<<<<<<<<<<
10502  *             rv = wf / w
10503  *         rv.shape = self.nvals
10504  */
10505   /*with:*/ {
10506     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L1_error)
10507     __Pyx_GOTREF(__pyx_t_1);
10508     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_errstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 442, __pyx_L1_error)
10509     __Pyx_GOTREF(__pyx_t_2);
10510     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10511     __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L1_error)
10512     __Pyx_GOTREF(__pyx_t_1);
10513     if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_divide, __pyx_n_s_ignore) < 0) __PYX_ERR(1, 442, __pyx_L1_error)
10514     if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_invalid, __pyx_n_s_ignore) < 0) __PYX_ERR(1, 442, __pyx_L1_error)
10515     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 442, __pyx_L1_error)
10516     __Pyx_GOTREF(__pyx_t_3);
10517     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10518     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10519     __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 442, __pyx_L1_error)
10520     __Pyx_GOTREF(__pyx_t_5);
10521     __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 442, __pyx_L3_error)
10522     __Pyx_GOTREF(__pyx_t_2);
10523     __pyx_t_4 = NULL;
10524     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10525       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
10526       if (likely(__pyx_t_4)) {
10527         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10528         __Pyx_INCREF(__pyx_t_4);
10529         __Pyx_INCREF(function);
10530         __Pyx_DECREF_SET(__pyx_t_2, function);
10531       }
10532     }
10533     __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
10534     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10535     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L3_error)
10536     __Pyx_GOTREF(__pyx_t_1);
10537     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10538     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10539     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10540     /*try:*/ {
10541       {
10542         __Pyx_PyThreadState_declare
10543         __Pyx_PyThreadState_assign
10544         __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
10545         __Pyx_XGOTREF(__pyx_t_6);
10546         __Pyx_XGOTREF(__pyx_t_7);
10547         __Pyx_XGOTREF(__pyx_t_8);
10548         /*try:*/ {
10549 
10550           /* "yt/geometry/particle_deposit.pyx":443
10551  *         w = np.asarray(self.w)
10552  *         with np.errstate(divide='ignore', invalid='ignore'):
10553  *             rv = wf / w             # <<<<<<<<<<<<<<
10554  *         rv.shape = self.nvals
10555  *         return rv
10556  */
10557           __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_wf, __pyx_v_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 443, __pyx_L7_error)
10558           __Pyx_GOTREF(__pyx_t_3);
10559           __pyx_v_rv = __pyx_t_3;
10560           __pyx_t_3 = 0;
10561 
10562           /* "yt/geometry/particle_deposit.pyx":442
10563  *         wf = np.asarray(self.wf)
10564  *         w = np.asarray(self.w)
10565  *         with np.errstate(divide='ignore', invalid='ignore'):             # <<<<<<<<<<<<<<
10566  *             rv = wf / w
10567  *         rv.shape = self.nvals
10568  */
10569         }
10570         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10571         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10572         __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10573         goto __pyx_L12_try_end;
10574         __pyx_L7_error:;
10575         __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10576         __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10577         __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10578         __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10579         /*except:*/ {
10580           __Pyx_AddTraceback("yt.geometry.particle_deposit.WeightedMeanParticleField.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
10581           if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(1, 442, __pyx_L9_except_error)
10582           __Pyx_GOTREF(__pyx_t_3);
10583           __Pyx_GOTREF(__pyx_t_1);
10584           __Pyx_GOTREF(__pyx_t_2);
10585           __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 442, __pyx_L9_except_error)
10586           __Pyx_GOTREF(__pyx_t_4);
10587           __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);
10588           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10589           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10590           if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 442, __pyx_L9_except_error)
10591           __Pyx_GOTREF(__pyx_t_9);
10592           __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
10593           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10594           if (__pyx_t_10 < 0) __PYX_ERR(1, 442, __pyx_L9_except_error)
10595           __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
10596           if (__pyx_t_11) {
10597             __Pyx_GIVEREF(__pyx_t_3);
10598             __Pyx_GIVEREF(__pyx_t_1);
10599             __Pyx_XGIVEREF(__pyx_t_2);
10600             __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_2);
10601             __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0;
10602             __PYX_ERR(1, 442, __pyx_L9_except_error)
10603           }
10604           __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10605           __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10606           __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10607           goto __pyx_L8_exception_handled;
10608         }
10609         __pyx_L9_except_error:;
10610         __Pyx_XGIVEREF(__pyx_t_6);
10611         __Pyx_XGIVEREF(__pyx_t_7);
10612         __Pyx_XGIVEREF(__pyx_t_8);
10613         __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
10614         goto __pyx_L1_error;
10615         __pyx_L8_exception_handled:;
10616         __Pyx_XGIVEREF(__pyx_t_6);
10617         __Pyx_XGIVEREF(__pyx_t_7);
10618         __Pyx_XGIVEREF(__pyx_t_8);
10619         __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
10620         __pyx_L12_try_end:;
10621       }
10622     }
10623     /*finally:*/ {
10624       /*normal exit:*/{
10625         if (__pyx_t_5) {
10626           __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, NULL);
10627           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10628           if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 442, __pyx_L1_error)
10629           __Pyx_GOTREF(__pyx_t_8);
10630           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10631         }
10632         goto __pyx_L6;
10633       }
10634       __pyx_L6:;
10635     }
10636     goto __pyx_L16;
10637     __pyx_L3_error:;
10638     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10639     goto __pyx_L1_error;
10640     __pyx_L16:;
10641   }
10642 
10643   /* "yt/geometry/particle_deposit.pyx":444
10644  *         with np.errstate(divide='ignore', invalid='ignore'):
10645  *             rv = wf / w
10646  *         rv.shape = self.nvals             # <<<<<<<<<<<<<<
10647  *         return rv
10648  *
10649  */
10650   __pyx_t_2 = __pyx_v_self->__pyx_base.nvals;
10651   __Pyx_INCREF(__pyx_t_2);
10652   if (unlikely(!__pyx_v_rv)) { __Pyx_RaiseUnboundLocalError("rv"); __PYX_ERR(1, 444, __pyx_L1_error) }
10653   if (__Pyx_PyObject_SetAttrStr(__pyx_v_rv, __pyx_n_s_shape, __pyx_t_2) < 0) __PYX_ERR(1, 444, __pyx_L1_error)
10654   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10655 
10656   /* "yt/geometry/particle_deposit.pyx":445
10657  *             rv = wf / w
10658  *         rv.shape = self.nvals
10659  *         return rv             # <<<<<<<<<<<<<<
10660  *
10661  * deposit_weighted_mean = WeightedMeanParticleField
10662  */
10663   __Pyx_XDECREF(__pyx_r);
10664   if (unlikely(!__pyx_v_rv)) { __Pyx_RaiseUnboundLocalError("rv"); __PYX_ERR(1, 445, __pyx_L1_error) }
10665   __Pyx_INCREF(__pyx_v_rv);
10666   __pyx_r = __pyx_v_rv;
10667   goto __pyx_L0;
10668 
10669   /* "yt/geometry/particle_deposit.pyx":439
10670  *         return 0
10671  *
10672  *     def finalize(self):             # <<<<<<<<<<<<<<
10673  *         wf = np.asarray(self.wf)
10674  *         w = np.asarray(self.w)
10675  */
10676 
10677   /* function exit code */
10678   __pyx_L1_error:;
10679   __Pyx_XDECREF(__pyx_t_1);
10680   __Pyx_XDECREF(__pyx_t_2);
10681   __Pyx_XDECREF(__pyx_t_3);
10682   __Pyx_XDECREF(__pyx_t_4);
10683   __Pyx_AddTraceback("yt.geometry.particle_deposit.WeightedMeanParticleField.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
10684   __pyx_r = NULL;
10685   __pyx_L0:;
10686   __Pyx_XDECREF(__pyx_v_wf);
10687   __Pyx_XDECREF(__pyx_v_w);
10688   __Pyx_XDECREF(__pyx_v_rv);
10689   __Pyx_XGIVEREF(__pyx_r);
10690   __Pyx_RefNannyFinishContext();
10691   return __pyx_r;
10692 }
10693 
10694 /* "(tree fragment)":1
10695  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10696  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10697  * def __setstate_cython__(self, __pyx_state):
10698  */
10699 
10700 /* Python wrapper */
10701 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10702 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10703   PyObject *__pyx_r = 0;
10704   __Pyx_RefNannyDeclarations
10705   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10706   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *)__pyx_v_self));
10707 
10708   /* function exit code */
10709   __Pyx_RefNannyFinishContext();
10710   return __pyx_r;
10711 }
10712 
__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField * __pyx_v_self)10713 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self) {
10714   PyObject *__pyx_r = NULL;
10715   __Pyx_RefNannyDeclarations
10716   PyObject *__pyx_t_1 = NULL;
10717   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10718 
10719   /* "(tree fragment)":2
10720  * def __reduce_cython__(self):
10721  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
10722  * def __setstate_cython__(self, __pyx_state):
10723  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10724  */
10725   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
10726   __Pyx_GOTREF(__pyx_t_1);
10727   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10728   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10729   __PYX_ERR(2, 2, __pyx_L1_error)
10730 
10731   /* "(tree fragment)":1
10732  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10733  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10734  * def __setstate_cython__(self, __pyx_state):
10735  */
10736 
10737   /* function exit code */
10738   __pyx_L1_error:;
10739   __Pyx_XDECREF(__pyx_t_1);
10740   __Pyx_AddTraceback("yt.geometry.particle_deposit.WeightedMeanParticleField.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10741   __pyx_r = NULL;
10742   __Pyx_XGIVEREF(__pyx_r);
10743   __Pyx_RefNannyFinishContext();
10744   return __pyx_r;
10745 }
10746 
10747 /* "(tree fragment)":3
10748  * def __reduce_cython__(self):
10749  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10750  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
10751  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10752  */
10753 
10754 /* Python wrapper */
10755 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)10756 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10757   PyObject *__pyx_r = 0;
10758   __Pyx_RefNannyDeclarations
10759   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10760   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10761 
10762   /* function exit code */
10763   __Pyx_RefNannyFinishContext();
10764   return __pyx_r;
10765 }
10766 
__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)10767 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
10768   PyObject *__pyx_r = NULL;
10769   __Pyx_RefNannyDeclarations
10770   PyObject *__pyx_t_1 = NULL;
10771   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10772 
10773   /* "(tree fragment)":4
10774  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10775  * def __setstate_cython__(self, __pyx_state):
10776  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
10777  */
10778   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
10779   __Pyx_GOTREF(__pyx_t_1);
10780   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10781   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10782   __PYX_ERR(2, 4, __pyx_L1_error)
10783 
10784   /* "(tree fragment)":3
10785  * def __reduce_cython__(self):
10786  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10787  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
10788  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10789  */
10790 
10791   /* function exit code */
10792   __pyx_L1_error:;
10793   __Pyx_XDECREF(__pyx_t_1);
10794   __Pyx_AddTraceback("yt.geometry.particle_deposit.WeightedMeanParticleField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10795   __pyx_r = NULL;
10796   __Pyx_XGIVEREF(__pyx_r);
10797   __Pyx_RefNannyFinishContext();
10798   return __pyx_r;
10799 }
10800 
10801 /* "yt/geometry/particle_deposit.pyx":453
10802  *     # value of the oct or block (grids will always be zero) identifier that a
10803  *     # given particle resides in
10804  *     def initialize(self):             # <<<<<<<<<<<<<<
10805  *         self.update_values = 1
10806  *
10807  */
10808 
10809 /* Python wrapper */
10810 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10811 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10812   PyObject *__pyx_r = 0;
10813   __Pyx_RefNannyDeclarations
10814   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
10815   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *)__pyx_v_self));
10816 
10817   /* function exit code */
10818   __Pyx_RefNannyFinishContext();
10819   return __pyx_r;
10820 }
10821 
__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier * __pyx_v_self)10822 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self) {
10823   PyObject *__pyx_r = NULL;
10824   __Pyx_RefNannyDeclarations
10825   __Pyx_RefNannySetupContext("initialize", 0);
10826 
10827   /* "yt/geometry/particle_deposit.pyx":454
10828  *     # given particle resides in
10829  *     def initialize(self):
10830  *         self.update_values = 1             # <<<<<<<<<<<<<<
10831  *
10832  *     @cython.cdivision(True)
10833  */
10834   __pyx_v_self->__pyx_base.update_values = 1;
10835 
10836   /* "yt/geometry/particle_deposit.pyx":453
10837  *     # value of the oct or block (grids will always be zero) identifier that a
10838  *     # given particle resides in
10839  *     def initialize(self):             # <<<<<<<<<<<<<<
10840  *         self.update_values = 1
10841  *
10842  */
10843 
10844   /* function exit code */
10845   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10846   __Pyx_XGIVEREF(__pyx_r);
10847   __Pyx_RefNannyFinishContext();
10848   return __pyx_r;
10849 }
10850 
10851 /* "yt/geometry/particle_deposit.pyx":458
10852  *     @cython.cdivision(True)
10853  *     @cython.boundscheck(False)
10854  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
10855  *                       np.float64_t left_edge[3],
10856  *                       np.float64_t dds[3],
10857  */
10858 
__pyx_f_2yt_8geometry_16particle_deposit_14MeshIdentifier_process(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,CYTHON_UNUSED __pyx_t_5numpy_float64_t * __pyx_v_left_edge,CYTHON_UNUSED __pyx_t_5numpy_float64_t * __pyx_v_dds,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_offset,CYTHON_UNUSED __pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,__pyx_t_5numpy_int64_t __pyx_v_domain_ind)10859 static int __pyx_f_2yt_8geometry_16particle_deposit_14MeshIdentifier_process(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_left_edge, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_dds, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_offset, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
10860   int __pyx_r;
10861   Py_ssize_t __pyx_t_1;
10862 
10863   /* "yt/geometry/particle_deposit.pyx":466
10864  *                       np.int64_t domain_ind
10865  *                       ) nogil except -1:
10866  *         fields[0] = domain_ind             # <<<<<<<<<<<<<<
10867  *         return 0
10868  *
10869  */
10870   __pyx_t_1 = 0;
10871   if (__pyx_t_1 < 0) __pyx_t_1 += __pyx_v_fields.shape[0];
10872   *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_1 * __pyx_v_fields.strides[0]) )) = __pyx_v_domain_ind;
10873 
10874   /* "yt/geometry/particle_deposit.pyx":467
10875  *                       ) nogil except -1:
10876  *         fields[0] = domain_ind
10877  *         return 0             # <<<<<<<<<<<<<<
10878  *
10879  *     def finalize(self):
10880  */
10881   __pyx_r = 0;
10882   goto __pyx_L0;
10883 
10884   /* "yt/geometry/particle_deposit.pyx":458
10885  *     @cython.cdivision(True)
10886  *     @cython.boundscheck(False)
10887  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
10888  *                       np.float64_t left_edge[3],
10889  *                       np.float64_t dds[3],
10890  */
10891 
10892   /* function exit code */
10893   __pyx_L0:;
10894   return __pyx_r;
10895 }
10896 
10897 /* "yt/geometry/particle_deposit.pyx":469
10898  *         return 0
10899  *
10900  *     def finalize(self):             # <<<<<<<<<<<<<<
10901  *         return
10902  *
10903  */
10904 
10905 /* Python wrapper */
10906 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10907 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10908   PyObject *__pyx_r = 0;
10909   __Pyx_RefNannyDeclarations
10910   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
10911   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *)__pyx_v_self));
10912 
10913   /* function exit code */
10914   __Pyx_RefNannyFinishContext();
10915   return __pyx_r;
10916 }
10917 
__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_2finalize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier * __pyx_v_self)10918 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_2finalize(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self) {
10919   PyObject *__pyx_r = NULL;
10920   __Pyx_RefNannyDeclarations
10921   __Pyx_RefNannySetupContext("finalize", 0);
10922 
10923   /* "yt/geometry/particle_deposit.pyx":470
10924  *
10925  *     def finalize(self):
10926  *         return             # <<<<<<<<<<<<<<
10927  *
10928  * deposit_mesh_id = MeshIdentifier
10929  */
10930   __Pyx_XDECREF(__pyx_r);
10931   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10932   goto __pyx_L0;
10933 
10934   /* "yt/geometry/particle_deposit.pyx":469
10935  *         return 0
10936  *
10937  *     def finalize(self):             # <<<<<<<<<<<<<<
10938  *         return
10939  *
10940  */
10941 
10942   /* function exit code */
10943   __pyx_L0:;
10944   __Pyx_XGIVEREF(__pyx_r);
10945   __Pyx_RefNannyFinishContext();
10946   return __pyx_r;
10947 }
10948 
10949 /* "(tree fragment)":1
10950  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10951  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10952  * def __setstate_cython__(self, __pyx_state):
10953  */
10954 
10955 /* Python wrapper */
10956 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10957 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10958   PyObject *__pyx_r = 0;
10959   __Pyx_RefNannyDeclarations
10960   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10961   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *)__pyx_v_self));
10962 
10963   /* function exit code */
10964   __Pyx_RefNannyFinishContext();
10965   return __pyx_r;
10966 }
10967 
__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier * __pyx_v_self)10968 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self) {
10969   PyObject *__pyx_r = NULL;
10970   __Pyx_RefNannyDeclarations
10971   PyObject *__pyx_t_1 = NULL;
10972   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10973 
10974   /* "(tree fragment)":2
10975  * def __reduce_cython__(self):
10976  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
10977  * def __setstate_cython__(self, __pyx_state):
10978  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10979  */
10980   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
10981   __Pyx_GOTREF(__pyx_t_1);
10982   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10983   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10984   __PYX_ERR(2, 2, __pyx_L1_error)
10985 
10986   /* "(tree fragment)":1
10987  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10988  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
10989  * def __setstate_cython__(self, __pyx_state):
10990  */
10991 
10992   /* function exit code */
10993   __pyx_L1_error:;
10994   __Pyx_XDECREF(__pyx_t_1);
10995   __Pyx_AddTraceback("yt.geometry.particle_deposit.MeshIdentifier.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10996   __pyx_r = NULL;
10997   __Pyx_XGIVEREF(__pyx_r);
10998   __Pyx_RefNannyFinishContext();
10999   return __pyx_r;
11000 }
11001 
11002 /* "(tree fragment)":3
11003  * def __reduce_cython__(self):
11004  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11005  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
11006  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11007  */
11008 
11009 /* Python wrapper */
11010 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)11011 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11012   PyObject *__pyx_r = 0;
11013   __Pyx_RefNannyDeclarations
11014   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11015   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11016 
11017   /* function exit code */
11018   __Pyx_RefNannyFinishContext();
11019   return __pyx_r;
11020 }
11021 
__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)11022 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14MeshIdentifier_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
11023   PyObject *__pyx_r = NULL;
11024   __Pyx_RefNannyDeclarations
11025   PyObject *__pyx_t_1 = NULL;
11026   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11027 
11028   /* "(tree fragment)":4
11029  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11030  * def __setstate_cython__(self, __pyx_state):
11031  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
11032  */
11033   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
11034   __Pyx_GOTREF(__pyx_t_1);
11035   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11036   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11037   __PYX_ERR(2, 4, __pyx_L1_error)
11038 
11039   /* "(tree fragment)":3
11040  * def __reduce_cython__(self):
11041  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11042  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
11043  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11044  */
11045 
11046   /* function exit code */
11047   __pyx_L1_error:;
11048   __Pyx_XDECREF(__pyx_t_1);
11049   __Pyx_AddTraceback("yt.geometry.particle_deposit.MeshIdentifier.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11050   __pyx_r = NULL;
11051   __Pyx_XGIVEREF(__pyx_r);
11052   __Pyx_RefNannyFinishContext();
11053   return __pyx_r;
11054 }
11055 
11056 /* "yt/geometry/particle_deposit.pyx":478
11057  *     # This method stores the offset of the grid containing each particle
11058  *     # and compute the index of the cell in the oct.
11059  *     def initialize(self, int npart):             # <<<<<<<<<<<<<<
11060  *         self.indexes = np.zeros(npart, dtype=np.int64, order='F') - 1
11061  *         self.cell_index = np.zeros(npart, dtype=np.int64, order='F') - 1
11062  */
11063 
11064 /* Python wrapper */
11065 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_1initialize(PyObject *__pyx_v_self, PyObject *__pyx_arg_npart); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_1initialize(PyObject * __pyx_v_self,PyObject * __pyx_arg_npart)11066 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_1initialize(PyObject *__pyx_v_self, PyObject *__pyx_arg_npart) {
11067   int __pyx_v_npart;
11068   PyObject *__pyx_r = 0;
11069   __Pyx_RefNannyDeclarations
11070   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
11071   assert(__pyx_arg_npart); {
11072     __pyx_v_npart = __Pyx_PyInt_As_int(__pyx_arg_npart); if (unlikely((__pyx_v_npart == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 478, __pyx_L3_error)
11073   }
11074   goto __pyx_L4_argument_unpacking_done;
11075   __pyx_L3_error:;
11076   __Pyx_AddTraceback("yt.geometry.particle_deposit.CellIdentifier.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
11077   __Pyx_RefNannyFinishContext();
11078   return NULL;
11079   __pyx_L4_argument_unpacking_done:;
11080   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *)__pyx_v_self), ((int)__pyx_v_npart));
11081 
11082   /* function exit code */
11083   __Pyx_RefNannyFinishContext();
11084   return __pyx_r;
11085 }
11086 
__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier * __pyx_v_self,int __pyx_v_npart)11087 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self, int __pyx_v_npart) {
11088   PyObject *__pyx_r = NULL;
11089   __Pyx_RefNannyDeclarations
11090   PyObject *__pyx_t_1 = NULL;
11091   PyObject *__pyx_t_2 = NULL;
11092   PyObject *__pyx_t_3 = NULL;
11093   PyObject *__pyx_t_4 = NULL;
11094   PyObject *__pyx_t_5 = NULL;
11095   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
11096   __Pyx_RefNannySetupContext("initialize", 0);
11097 
11098   /* "yt/geometry/particle_deposit.pyx":479
11099  *     # and compute the index of the cell in the oct.
11100  *     def initialize(self, int npart):
11101  *         self.indexes = np.zeros(npart, dtype=np.int64, order='F') - 1             # <<<<<<<<<<<<<<
11102  *         self.cell_index = np.zeros(npart, dtype=np.int64, order='F') - 1
11103  *
11104  */
11105   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error)
11106   __Pyx_GOTREF(__pyx_t_1);
11107   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 479, __pyx_L1_error)
11108   __Pyx_GOTREF(__pyx_t_2);
11109   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11110   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npart); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error)
11111   __Pyx_GOTREF(__pyx_t_1);
11112   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __pyx_L1_error)
11113   __Pyx_GOTREF(__pyx_t_3);
11114   __Pyx_GIVEREF(__pyx_t_1);
11115   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
11116   __pyx_t_1 = 0;
11117   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error)
11118   __Pyx_GOTREF(__pyx_t_1);
11119   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 479, __pyx_L1_error)
11120   __Pyx_GOTREF(__pyx_t_4);
11121   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 479, __pyx_L1_error)
11122   __Pyx_GOTREF(__pyx_t_5);
11123   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11124   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(1, 479, __pyx_L1_error)
11125   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11126   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 479, __pyx_L1_error)
11127   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 479, __pyx_L1_error)
11128   __Pyx_GOTREF(__pyx_t_5);
11129   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11130   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11131   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11132   __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error)
11133   __Pyx_GOTREF(__pyx_t_1);
11134   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11135   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(1, 479, __pyx_L1_error)
11136   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11137   __PYX_XDEC_MEMVIEW(&__pyx_v_self->indexes, 0);
11138   __pyx_v_self->indexes = __pyx_t_6;
11139   __pyx_t_6.memview = NULL;
11140   __pyx_t_6.data = NULL;
11141 
11142   /* "yt/geometry/particle_deposit.pyx":480
11143  *     def initialize(self, int npart):
11144  *         self.indexes = np.zeros(npart, dtype=np.int64, order='F') - 1
11145  *         self.cell_index = np.zeros(npart, dtype=np.int64, order='F') - 1             # <<<<<<<<<<<<<<
11146  *
11147  *     @cython.cdivision(True)
11148  */
11149   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error)
11150   __Pyx_GOTREF(__pyx_t_1);
11151   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 480, __pyx_L1_error)
11152   __Pyx_GOTREF(__pyx_t_5);
11153   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11154   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npart); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error)
11155   __Pyx_GOTREF(__pyx_t_1);
11156   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 480, __pyx_L1_error)
11157   __Pyx_GOTREF(__pyx_t_3);
11158   __Pyx_GIVEREF(__pyx_t_1);
11159   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
11160   __pyx_t_1 = 0;
11161   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error)
11162   __Pyx_GOTREF(__pyx_t_1);
11163   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 480, __pyx_L1_error)
11164   __Pyx_GOTREF(__pyx_t_2);
11165   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 480, __pyx_L1_error)
11166   __Pyx_GOTREF(__pyx_t_4);
11167   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11168   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(1, 480, __pyx_L1_error)
11169   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11170   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 480, __pyx_L1_error)
11171   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 480, __pyx_L1_error)
11172   __Pyx_GOTREF(__pyx_t_4);
11173   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11174   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11175   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11176   __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error)
11177   __Pyx_GOTREF(__pyx_t_1);
11178   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11179   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(1, 480, __pyx_L1_error)
11180   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11181   __PYX_XDEC_MEMVIEW(&__pyx_v_self->cell_index, 0);
11182   __pyx_v_self->cell_index = __pyx_t_6;
11183   __pyx_t_6.memview = NULL;
11184   __pyx_t_6.data = NULL;
11185 
11186   /* "yt/geometry/particle_deposit.pyx":478
11187  *     # This method stores the offset of the grid containing each particle
11188  *     # and compute the index of the cell in the oct.
11189  *     def initialize(self, int npart):             # <<<<<<<<<<<<<<
11190  *         self.indexes = np.zeros(npart, dtype=np.int64, order='F') - 1
11191  *         self.cell_index = np.zeros(npart, dtype=np.int64, order='F') - 1
11192  */
11193 
11194   /* function exit code */
11195   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11196   goto __pyx_L0;
11197   __pyx_L1_error:;
11198   __Pyx_XDECREF(__pyx_t_1);
11199   __Pyx_XDECREF(__pyx_t_2);
11200   __Pyx_XDECREF(__pyx_t_3);
11201   __Pyx_XDECREF(__pyx_t_4);
11202   __Pyx_XDECREF(__pyx_t_5);
11203   __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
11204   __Pyx_AddTraceback("yt.geometry.particle_deposit.CellIdentifier.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
11205   __pyx_r = NULL;
11206   __pyx_L0:;
11207   __Pyx_XGIVEREF(__pyx_r);
11208   __Pyx_RefNannyFinishContext();
11209   return __pyx_r;
11210 }
11211 
11212 /* "yt/geometry/particle_deposit.pyx":484
11213  *     @cython.cdivision(True)
11214  *     @cython.boundscheck(False)
11215  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
11216  *                       np.float64_t left_edge[3],
11217  *                       np.float64_t dds[3],
11218  */
11219 
__pyx_f_2yt_8geometry_16particle_deposit_14CellIdentifier_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier * __pyx_v_self,CYTHON_UNUSED int * __pyx_v_dim,int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)11220 static int __pyx_f_2yt_8geometry_16particle_deposit_14CellIdentifier_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self, CYTHON_UNUSED int *__pyx_v_dim, int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, CYTHON_UNUSED __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
11221   int __pyx_v_i;
11222   int __pyx_v_icell;
11223   int __pyx_r;
11224   Py_ssize_t __pyx_t_1;
11225   int __pyx_t_2;
11226   int __pyx_t_3;
11227   Py_ssize_t __pyx_t_4;
11228 
11229   /* "yt/geometry/particle_deposit.pyx":493
11230  *                       ) nogil except -1:
11231  *         cdef int i, icell
11232  *         self.indexes[ipart] = offset             # <<<<<<<<<<<<<<
11233  *
11234  *         icell = 0
11235  */
11236   if (unlikely(!__pyx_v_self->indexes.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 493, __pyx_L1_error)}
11237   __pyx_t_1 = __pyx_v_ipart;
11238   if (__pyx_t_1 < 0) __pyx_t_1 += __pyx_v_self->indexes.shape[0];
11239   *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_self->indexes.data + __pyx_t_1 * __pyx_v_self->indexes.strides[0]) )) = __pyx_v_offset;
11240 
11241   /* "yt/geometry/particle_deposit.pyx":495
11242  *         self.indexes[ipart] = offset
11243  *
11244  *         icell = 0             # <<<<<<<<<<<<<<
11245  *         for i in range(3):
11246  *             if ppos[i] > left_edge[i] + dds[i]:
11247  */
11248   __pyx_v_icell = 0;
11249 
11250   /* "yt/geometry/particle_deposit.pyx":496
11251  *
11252  *         icell = 0
11253  *         for i in range(3):             # <<<<<<<<<<<<<<
11254  *             if ppos[i] > left_edge[i] + dds[i]:
11255  *                 icell |= 4 >> i
11256  */
11257   for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
11258     __pyx_v_i = __pyx_t_2;
11259 
11260     /* "yt/geometry/particle_deposit.pyx":497
11261  *         icell = 0
11262  *         for i in range(3):
11263  *             if ppos[i] > left_edge[i] + dds[i]:             # <<<<<<<<<<<<<<
11264  *                 icell |= 4 >> i
11265  *
11266  */
11267     __pyx_t_3 = (((__pyx_v_ppos[__pyx_v_i]) > ((__pyx_v_left_edge[__pyx_v_i]) + (__pyx_v_dds[__pyx_v_i]))) != 0);
11268     if (__pyx_t_3) {
11269 
11270       /* "yt/geometry/particle_deposit.pyx":498
11271  *         for i in range(3):
11272  *             if ppos[i] > left_edge[i] + dds[i]:
11273  *                 icell |= 4 >> i             # <<<<<<<<<<<<<<
11274  *
11275  *         # Compute cell index
11276  */
11277       __pyx_v_icell = (__pyx_v_icell | (4 >> __pyx_v_i));
11278 
11279       /* "yt/geometry/particle_deposit.pyx":497
11280  *         icell = 0
11281  *         for i in range(3):
11282  *             if ppos[i] > left_edge[i] + dds[i]:             # <<<<<<<<<<<<<<
11283  *                 icell |= 4 >> i
11284  *
11285  */
11286     }
11287   }
11288 
11289   /* "yt/geometry/particle_deposit.pyx":501
11290  *
11291  *         # Compute cell index
11292  *         self.cell_index[ipart] = icell             # <<<<<<<<<<<<<<
11293  *
11294  *         return 0
11295  */
11296   if (unlikely(!__pyx_v_self->cell_index.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 501, __pyx_L1_error)}
11297   __pyx_t_4 = __pyx_v_ipart;
11298   if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_self->cell_index.shape[0];
11299   *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_self->cell_index.data + __pyx_t_4 * __pyx_v_self->cell_index.strides[0]) )) = __pyx_v_icell;
11300 
11301   /* "yt/geometry/particle_deposit.pyx":503
11302  *         self.cell_index[ipart] = icell
11303  *
11304  *         return 0             # <<<<<<<<<<<<<<
11305  *
11306  *     def finalize(self):
11307  */
11308   __pyx_r = 0;
11309   goto __pyx_L0;
11310 
11311   /* "yt/geometry/particle_deposit.pyx":484
11312  *     @cython.cdivision(True)
11313  *     @cython.boundscheck(False)
11314  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
11315  *                       np.float64_t left_edge[3],
11316  *                       np.float64_t dds[3],
11317  */
11318 
11319   /* function exit code */
11320   __pyx_L1_error:;
11321   {
11322     #ifdef WITH_THREAD
11323     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
11324     #endif
11325     __Pyx_AddTraceback("yt.geometry.particle_deposit.CellIdentifier.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
11326     #ifdef WITH_THREAD
11327     __Pyx_PyGILState_Release(__pyx_gilstate_save);
11328     #endif
11329   }
11330   __pyx_r = -1;
11331   __pyx_L0:;
11332   return __pyx_r;
11333 }
11334 
11335 /* "yt/geometry/particle_deposit.pyx":505
11336  *         return 0
11337  *
11338  *     def finalize(self):             # <<<<<<<<<<<<<<
11339  *         return np.asarray(self.indexes), np.asarray(self.cell_index)
11340  *
11341  */
11342 
11343 /* Python wrapper */
11344 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)11345 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11346   PyObject *__pyx_r = 0;
11347   __Pyx_RefNannyDeclarations
11348   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
11349   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *)__pyx_v_self));
11350 
11351   /* function exit code */
11352   __Pyx_RefNannyFinishContext();
11353   return __pyx_r;
11354 }
11355 
__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier * __pyx_v_self)11356 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self) {
11357   PyObject *__pyx_r = NULL;
11358   __Pyx_RefNannyDeclarations
11359   PyObject *__pyx_t_1 = NULL;
11360   PyObject *__pyx_t_2 = NULL;
11361   PyObject *__pyx_t_3 = NULL;
11362   PyObject *__pyx_t_4 = NULL;
11363   PyObject *__pyx_t_5 = NULL;
11364   __Pyx_RefNannySetupContext("finalize", 0);
11365 
11366   /* "yt/geometry/particle_deposit.pyx":506
11367  *
11368  *     def finalize(self):
11369  *         return np.asarray(self.indexes), np.asarray(self.cell_index)             # <<<<<<<<<<<<<<
11370  *
11371  * deposit_cell_id = CellIdentifier
11372  */
11373   __Pyx_XDECREF(__pyx_r);
11374   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 506, __pyx_L1_error)
11375   __Pyx_GOTREF(__pyx_t_2);
11376   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 506, __pyx_L1_error)
11377   __Pyx_GOTREF(__pyx_t_3);
11378   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11379   if (unlikely(!__pyx_v_self->indexes.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 506, __pyx_L1_error)}
11380   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 506, __pyx_L1_error)
11381   __Pyx_GOTREF(__pyx_t_2);
11382   __pyx_t_4 = NULL;
11383   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
11384     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
11385     if (likely(__pyx_t_4)) {
11386       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11387       __Pyx_INCREF(__pyx_t_4);
11388       __Pyx_INCREF(function);
11389       __Pyx_DECREF_SET(__pyx_t_3, function);
11390     }
11391   }
11392   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
11393   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11394   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11395   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
11396   __Pyx_GOTREF(__pyx_t_1);
11397   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11398   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 506, __pyx_L1_error)
11399   __Pyx_GOTREF(__pyx_t_2);
11400   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
11401   __Pyx_GOTREF(__pyx_t_4);
11402   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11403   if (unlikely(!__pyx_v_self->cell_index.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 506, __pyx_L1_error)}
11404   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->cell_index, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 506, __pyx_L1_error)
11405   __Pyx_GOTREF(__pyx_t_2);
11406   __pyx_t_5 = NULL;
11407   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
11408     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
11409     if (likely(__pyx_t_5)) {
11410       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
11411       __Pyx_INCREF(__pyx_t_5);
11412       __Pyx_INCREF(function);
11413       __Pyx_DECREF_SET(__pyx_t_4, function);
11414     }
11415   }
11416   __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
11417   __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11418   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11419   if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 506, __pyx_L1_error)
11420   __Pyx_GOTREF(__pyx_t_3);
11421   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11422   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
11423   __Pyx_GOTREF(__pyx_t_4);
11424   __Pyx_GIVEREF(__pyx_t_1);
11425   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
11426   __Pyx_GIVEREF(__pyx_t_3);
11427   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
11428   __pyx_t_1 = 0;
11429   __pyx_t_3 = 0;
11430   __pyx_r = __pyx_t_4;
11431   __pyx_t_4 = 0;
11432   goto __pyx_L0;
11433 
11434   /* "yt/geometry/particle_deposit.pyx":505
11435  *         return 0
11436  *
11437  *     def finalize(self):             # <<<<<<<<<<<<<<
11438  *         return np.asarray(self.indexes), np.asarray(self.cell_index)
11439  *
11440  */
11441 
11442   /* function exit code */
11443   __pyx_L1_error:;
11444   __Pyx_XDECREF(__pyx_t_1);
11445   __Pyx_XDECREF(__pyx_t_2);
11446   __Pyx_XDECREF(__pyx_t_3);
11447   __Pyx_XDECREF(__pyx_t_4);
11448   __Pyx_XDECREF(__pyx_t_5);
11449   __Pyx_AddTraceback("yt.geometry.particle_deposit.CellIdentifier.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
11450   __pyx_r = NULL;
11451   __pyx_L0:;
11452   __Pyx_XGIVEREF(__pyx_r);
11453   __Pyx_RefNannyFinishContext();
11454   return __pyx_r;
11455 }
11456 
11457 /* "(tree fragment)":1
11458  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
11459  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11460  * def __setstate_cython__(self, __pyx_state):
11461  */
11462 
11463 /* Python wrapper */
11464 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)11465 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11466   PyObject *__pyx_r = 0;
11467   __Pyx_RefNannyDeclarations
11468   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11469   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *)__pyx_v_self));
11470 
11471   /* function exit code */
11472   __Pyx_RefNannyFinishContext();
11473   return __pyx_r;
11474 }
11475 
__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier * __pyx_v_self)11476 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self) {
11477   PyObject *__pyx_r = NULL;
11478   __Pyx_RefNannyDeclarations
11479   PyObject *__pyx_t_1 = NULL;
11480   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11481 
11482   /* "(tree fragment)":2
11483  * def __reduce_cython__(self):
11484  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
11485  * def __setstate_cython__(self, __pyx_state):
11486  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11487  */
11488   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
11489   __Pyx_GOTREF(__pyx_t_1);
11490   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11491   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11492   __PYX_ERR(2, 2, __pyx_L1_error)
11493 
11494   /* "(tree fragment)":1
11495  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
11496  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11497  * def __setstate_cython__(self, __pyx_state):
11498  */
11499 
11500   /* function exit code */
11501   __pyx_L1_error:;
11502   __Pyx_XDECREF(__pyx_t_1);
11503   __Pyx_AddTraceback("yt.geometry.particle_deposit.CellIdentifier.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11504   __pyx_r = NULL;
11505   __Pyx_XGIVEREF(__pyx_r);
11506   __Pyx_RefNannyFinishContext();
11507   return __pyx_r;
11508 }
11509 
11510 /* "(tree fragment)":3
11511  * def __reduce_cython__(self):
11512  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11513  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
11514  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11515  */
11516 
11517 /* Python wrapper */
11518 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)11519 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11520   PyObject *__pyx_r = 0;
11521   __Pyx_RefNannyDeclarations
11522   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11523   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11524 
11525   /* function exit code */
11526   __Pyx_RefNannyFinishContext();
11527   return __pyx_r;
11528 }
11529 
__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)11530 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_14CellIdentifier_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
11531   PyObject *__pyx_r = NULL;
11532   __Pyx_RefNannyDeclarations
11533   PyObject *__pyx_t_1 = NULL;
11534   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11535 
11536   /* "(tree fragment)":4
11537  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11538  * def __setstate_cython__(self, __pyx_state):
11539  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
11540  */
11541   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
11542   __Pyx_GOTREF(__pyx_t_1);
11543   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11544   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11545   __PYX_ERR(2, 4, __pyx_L1_error)
11546 
11547   /* "(tree fragment)":3
11548  * def __reduce_cython__(self):
11549  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11550  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
11551  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
11552  */
11553 
11554   /* function exit code */
11555   __pyx_L1_error:;
11556   __Pyx_XDECREF(__pyx_t_1);
11557   __Pyx_AddTraceback("yt.geometry.particle_deposit.CellIdentifier.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11558   __pyx_r = NULL;
11559   __Pyx_XGIVEREF(__pyx_r);
11560   __Pyx_RefNannyFinishContext();
11561   return __pyx_r;
11562 }
11563 
11564 /* "yt/geometry/particle_deposit.pyx":513
11565  *     cdef np.float64_t[:,:,:,:] nnfield
11566  *     cdef np.float64_t[:,:,:,:] distfield
11567  *     def initialize(self):             # <<<<<<<<<<<<<<
11568  *         self.nnfield = append_axes(
11569  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11570  */
11571 
11572 /* Python wrapper */
11573 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_1initialize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)11574 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_1initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11575   PyObject *__pyx_r = 0;
11576   __Pyx_RefNannyDeclarations
11577   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
11578   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_initialize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *)__pyx_v_self));
11579 
11580   /* function exit code */
11581   __Pyx_RefNannyFinishContext();
11582   return __pyx_r;
11583 }
11584 
__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField * __pyx_v_self)11585 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_initialize(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self) {
11586   PyObject *__pyx_r = NULL;
11587   __Pyx_RefNannyDeclarations
11588   PyObject *__pyx_t_1 = NULL;
11589   PyObject *__pyx_t_2 = NULL;
11590   PyObject *__pyx_t_3 = NULL;
11591   PyObject *__pyx_t_4 = NULL;
11592   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
11593   __pyx_t_5numpy_float64_t __pyx_t_6;
11594   __Pyx_RefNannySetupContext("initialize", 0);
11595 
11596   /* "yt/geometry/particle_deposit.pyx":515
11597  *     def initialize(self):
11598  *         self.nnfield = append_axes(
11599  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
11600  *         self.distfield = append_axes(
11601  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11602  */
11603   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error)
11604   __Pyx_GOTREF(__pyx_t_1);
11605   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 515, __pyx_L1_error)
11606   __Pyx_GOTREF(__pyx_t_2);
11607   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11608   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error)
11609   __Pyx_GOTREF(__pyx_t_1);
11610   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
11611   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
11612   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.nvals);
11613   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 515, __pyx_L1_error)
11614   __Pyx_GOTREF(__pyx_t_3);
11615   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 515, __pyx_L1_error)
11616   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 515, __pyx_L1_error)
11617   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error)
11618   __Pyx_GOTREF(__pyx_t_4);
11619   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11620   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11621   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11622   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 515, __pyx_L1_error)
11623 
11624   /* "yt/geometry/particle_deposit.pyx":514
11625  *     cdef np.float64_t[:,:,:,:] distfield
11626  *     def initialize(self):
11627  *         self.nnfield = append_axes(             # <<<<<<<<<<<<<<
11628  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11629  *         self.distfield = append_axes(
11630  */
11631   __pyx_t_3 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_4), 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
11632   __Pyx_GOTREF(__pyx_t_3);
11633   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11634   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 514, __pyx_L1_error)
11635   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11636   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nnfield, 0);
11637   __pyx_v_self->nnfield = __pyx_t_5;
11638   __pyx_t_5.memview = NULL;
11639   __pyx_t_5.data = NULL;
11640 
11641   /* "yt/geometry/particle_deposit.pyx":517
11642  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11643  *         self.distfield = append_axes(
11644  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)             # <<<<<<<<<<<<<<
11645  *         self.distfield[:] = np.inf
11646  *
11647  */
11648   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 517, __pyx_L1_error)
11649   __Pyx_GOTREF(__pyx_t_3);
11650   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 517, __pyx_L1_error)
11651   __Pyx_GOTREF(__pyx_t_4);
11652   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11653   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 517, __pyx_L1_error)
11654   __Pyx_GOTREF(__pyx_t_3);
11655   __Pyx_INCREF(__pyx_v_self->__pyx_base.nvals);
11656   __Pyx_GIVEREF(__pyx_v_self->__pyx_base.nvals);
11657   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.nvals);
11658   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error)
11659   __Pyx_GOTREF(__pyx_t_1);
11660   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_float64) < 0) __PYX_ERR(1, 517, __pyx_L1_error)
11661   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(1, 517, __pyx_L1_error)
11662   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 517, __pyx_L1_error)
11663   __Pyx_GOTREF(__pyx_t_2);
11664   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11665   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11666   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11667   if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 517, __pyx_L1_error)
11668 
11669   /* "yt/geometry/particle_deposit.pyx":516
11670  *         self.nnfield = append_axes(
11671  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11672  *         self.distfield = append_axes(             # <<<<<<<<<<<<<<
11673  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11674  *         self.distfield[:] = np.inf
11675  */
11676   __pyx_t_1 = __pyx_f_2yt_8geometry_16particle_deposit_append_axes(((PyArrayObject *)__pyx_t_2), 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
11677   __Pyx_GOTREF(__pyx_t_1);
11678   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11679   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(1, 516, __pyx_L1_error)
11680   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11681   __PYX_XDEC_MEMVIEW(&__pyx_v_self->distfield, 0);
11682   __pyx_v_self->distfield = __pyx_t_5;
11683   __pyx_t_5.memview = NULL;
11684   __pyx_t_5.data = NULL;
11685 
11686   /* "yt/geometry/particle_deposit.pyx":518
11687  *         self.distfield = append_axes(
11688  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11689  *         self.distfield[:] = np.inf             # <<<<<<<<<<<<<<
11690  *
11691  *     @cython.cdivision(True)
11692  */
11693   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 518, __pyx_L1_error)
11694   __Pyx_GOTREF(__pyx_t_1);
11695   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inf); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 518, __pyx_L1_error)
11696   __Pyx_GOTREF(__pyx_t_2);
11697   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11698   __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 518, __pyx_L1_error)
11699   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11700   if (unlikely(!__pyx_v_self->distfield.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 518, __pyx_L1_error)}
11701   {
11702       __pyx_t_5numpy_float64_t __pyx_temp_scalar = __pyx_t_6;
11703       {
11704           Py_ssize_t __pyx_temp_extent_0 = __pyx_v_self->distfield.shape[0];
11705           Py_ssize_t __pyx_temp_stride_0 = __pyx_v_self->distfield.strides[0];
11706           char *__pyx_temp_pointer_0;
11707           Py_ssize_t __pyx_temp_idx_0;
11708           Py_ssize_t __pyx_temp_extent_1 = __pyx_v_self->distfield.shape[1];
11709           Py_ssize_t __pyx_temp_stride_1 = __pyx_v_self->distfield.strides[1];
11710           char *__pyx_temp_pointer_1;
11711           Py_ssize_t __pyx_temp_idx_1;
11712           Py_ssize_t __pyx_temp_extent_2 = __pyx_v_self->distfield.shape[2];
11713           Py_ssize_t __pyx_temp_stride_2 = __pyx_v_self->distfield.strides[2];
11714           char *__pyx_temp_pointer_2;
11715           Py_ssize_t __pyx_temp_idx_2;
11716           Py_ssize_t __pyx_temp_extent_3 = __pyx_v_self->distfield.shape[3];
11717           Py_ssize_t __pyx_temp_stride_3 = __pyx_v_self->distfield.strides[3];
11718           char *__pyx_temp_pointer_3;
11719           Py_ssize_t __pyx_temp_idx_3;
11720           __pyx_temp_pointer_0 = __pyx_v_self->distfield.data;
11721           for (__pyx_temp_idx_0 = 0; __pyx_temp_idx_0 < __pyx_temp_extent_0; __pyx_temp_idx_0++) {
11722             __pyx_temp_pointer_1 = __pyx_temp_pointer_0;
11723             for (__pyx_temp_idx_1 = 0; __pyx_temp_idx_1 < __pyx_temp_extent_1; __pyx_temp_idx_1++) {
11724               __pyx_temp_pointer_2 = __pyx_temp_pointer_1;
11725               for (__pyx_temp_idx_2 = 0; __pyx_temp_idx_2 < __pyx_temp_extent_2; __pyx_temp_idx_2++) {
11726                 __pyx_temp_pointer_3 = __pyx_temp_pointer_2;
11727                 for (__pyx_temp_idx_3 = 0; __pyx_temp_idx_3 < __pyx_temp_extent_3; __pyx_temp_idx_3++) {
11728                   *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer_3) = __pyx_temp_scalar;
11729                   __pyx_temp_pointer_3 += __pyx_temp_stride_3;
11730                 }
11731                 __pyx_temp_pointer_2 += __pyx_temp_stride_2;
11732               }
11733               __pyx_temp_pointer_1 += __pyx_temp_stride_1;
11734             }
11735             __pyx_temp_pointer_0 += __pyx_temp_stride_0;
11736           }
11737       }
11738   }
11739 
11740   /* "yt/geometry/particle_deposit.pyx":513
11741  *     cdef np.float64_t[:,:,:,:] nnfield
11742  *     cdef np.float64_t[:,:,:,:] distfield
11743  *     def initialize(self):             # <<<<<<<<<<<<<<
11744  *         self.nnfield = append_axes(
11745  *             np.zeros(self.nvals, dtype="float64", order='F'), 4)
11746  */
11747 
11748   /* function exit code */
11749   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11750   goto __pyx_L0;
11751   __pyx_L1_error:;
11752   __Pyx_XDECREF(__pyx_t_1);
11753   __Pyx_XDECREF(__pyx_t_2);
11754   __Pyx_XDECREF(__pyx_t_3);
11755   __Pyx_XDECREF(__pyx_t_4);
11756   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
11757   __Pyx_AddTraceback("yt.geometry.particle_deposit.NNParticleField.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
11758   __pyx_r = NULL;
11759   __pyx_L0:;
11760   __Pyx_XGIVEREF(__pyx_r);
11761   __Pyx_RefNannyFinishContext();
11762   return __pyx_r;
11763 }
11764 
11765 /* "yt/geometry/particle_deposit.pyx":522
11766  *     @cython.cdivision(True)
11767  *     @cython.boundscheck(False)
11768  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
11769  *                      np.float64_t left_edge[3],
11770  *                      np.float64_t dds[3],
11771  */
11772 
__pyx_f_2yt_8geometry_16particle_deposit_15NNParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField * __pyx_v_self,int * __pyx_v_dim,CYTHON_UNUSED int __pyx_v_ipart,__pyx_t_5numpy_float64_t * __pyx_v_left_edge,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_int64_t __pyx_v_offset,__pyx_t_5numpy_float64_t * __pyx_v_ppos,__Pyx_memviewslice __pyx_v_fields,CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind)11773 static int __pyx_f_2yt_8geometry_16particle_deposit_15NNParticleField_process(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self, int *__pyx_v_dim, CYTHON_UNUSED int __pyx_v_ipart, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_int64_t __pyx_v_offset, __pyx_t_5numpy_float64_t *__pyx_v_ppos, __Pyx_memviewslice __pyx_v_fields, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_domain_ind) {
11774   int __pyx_v_i;
11775   int __pyx_v_j;
11776   int __pyx_v_k;
11777   __pyx_t_5numpy_float64_t __pyx_v_r2;
11778   __pyx_t_5numpy_float64_t __pyx_v_gpos[3];
11779   int __pyx_r;
11780   int __pyx_t_1;
11781   int __pyx_t_2;
11782   int __pyx_t_3;
11783   int __pyx_t_4;
11784   int __pyx_t_5;
11785   int __pyx_t_6;
11786   int __pyx_t_7;
11787   int __pyx_t_8;
11788   int __pyx_t_9;
11789   Py_ssize_t __pyx_t_10;
11790   Py_ssize_t __pyx_t_11;
11791   Py_ssize_t __pyx_t_12;
11792   __pyx_t_5numpy_int64_t __pyx_t_13;
11793   int __pyx_t_14;
11794   Py_ssize_t __pyx_t_15;
11795   Py_ssize_t __pyx_t_16;
11796   Py_ssize_t __pyx_t_17;
11797   __pyx_t_5numpy_int64_t __pyx_t_18;
11798   Py_ssize_t __pyx_t_19;
11799   Py_ssize_t __pyx_t_20;
11800   Py_ssize_t __pyx_t_21;
11801   Py_ssize_t __pyx_t_22;
11802   __pyx_t_5numpy_int64_t __pyx_t_23;
11803   long __pyx_t_24;
11804 
11805   /* "yt/geometry/particle_deposit.pyx":536
11806  *         cdef np.float64_t r2
11807  *         cdef np.float64_t gpos[3]
11808  *         gpos[0] = left_edge[0] + 0.5 * dds[0]             # <<<<<<<<<<<<<<
11809  *         for i in range(dim[0]):
11810  *             gpos[1] = left_edge[1] + 0.5 * dds[1]
11811  */
11812   (__pyx_v_gpos[0]) = ((__pyx_v_left_edge[0]) + (0.5 * (__pyx_v_dds[0])));
11813 
11814   /* "yt/geometry/particle_deposit.pyx":537
11815  *         cdef np.float64_t gpos[3]
11816  *         gpos[0] = left_edge[0] + 0.5 * dds[0]
11817  *         for i in range(dim[0]):             # <<<<<<<<<<<<<<
11818  *             gpos[1] = left_edge[1] + 0.5 * dds[1]
11819  *             for j in range(dim[1]):
11820  */
11821   __pyx_t_1 = (__pyx_v_dim[0]);
11822   __pyx_t_2 = __pyx_t_1;
11823   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
11824     __pyx_v_i = __pyx_t_3;
11825 
11826     /* "yt/geometry/particle_deposit.pyx":538
11827  *         gpos[0] = left_edge[0] + 0.5 * dds[0]
11828  *         for i in range(dim[0]):
11829  *             gpos[1] = left_edge[1] + 0.5 * dds[1]             # <<<<<<<<<<<<<<
11830  *             for j in range(dim[1]):
11831  *                 gpos[2] = left_edge[2] + 0.5 * dds[2]
11832  */
11833     (__pyx_v_gpos[1]) = ((__pyx_v_left_edge[1]) + (0.5 * (__pyx_v_dds[1])));
11834 
11835     /* "yt/geometry/particle_deposit.pyx":539
11836  *         for i in range(dim[0]):
11837  *             gpos[1] = left_edge[1] + 0.5 * dds[1]
11838  *             for j in range(dim[1]):             # <<<<<<<<<<<<<<
11839  *                 gpos[2] = left_edge[2] + 0.5 * dds[2]
11840  *                 for k in range(dim[2]):
11841  */
11842     __pyx_t_4 = (__pyx_v_dim[1]);
11843     __pyx_t_5 = __pyx_t_4;
11844     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
11845       __pyx_v_j = __pyx_t_6;
11846 
11847       /* "yt/geometry/particle_deposit.pyx":540
11848  *             gpos[1] = left_edge[1] + 0.5 * dds[1]
11849  *             for j in range(dim[1]):
11850  *                 gpos[2] = left_edge[2] + 0.5 * dds[2]             # <<<<<<<<<<<<<<
11851  *                 for k in range(dim[2]):
11852  *                     r2 = ((ppos[0] - gpos[0])*(ppos[0] - gpos[0]) +
11853  */
11854       (__pyx_v_gpos[2]) = ((__pyx_v_left_edge[2]) + (0.5 * (__pyx_v_dds[2])));
11855 
11856       /* "yt/geometry/particle_deposit.pyx":541
11857  *             for j in range(dim[1]):
11858  *                 gpos[2] = left_edge[2] + 0.5 * dds[2]
11859  *                 for k in range(dim[2]):             # <<<<<<<<<<<<<<
11860  *                     r2 = ((ppos[0] - gpos[0])*(ppos[0] - gpos[0]) +
11861  *                           (ppos[1] - gpos[1])*(ppos[1] - gpos[1]) +
11862  */
11863       __pyx_t_7 = (__pyx_v_dim[2]);
11864       __pyx_t_8 = __pyx_t_7;
11865       for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
11866         __pyx_v_k = __pyx_t_9;
11867 
11868         /* "yt/geometry/particle_deposit.pyx":543
11869  *                 for k in range(dim[2]):
11870  *                     r2 = ((ppos[0] - gpos[0])*(ppos[0] - gpos[0]) +
11871  *                           (ppos[1] - gpos[1])*(ppos[1] - gpos[1]) +             # <<<<<<<<<<<<<<
11872  *                           (ppos[2] - gpos[2])*(ppos[2] - gpos[2]))
11873  *                     if r2 < self.distfield[k,j,i,offset]:
11874  */
11875         __pyx_v_r2 = (((((__pyx_v_ppos[0]) - (__pyx_v_gpos[0])) * ((__pyx_v_ppos[0]) - (__pyx_v_gpos[0]))) + (((__pyx_v_ppos[1]) - (__pyx_v_gpos[1])) * ((__pyx_v_ppos[1]) - (__pyx_v_gpos[1])))) + (((__pyx_v_ppos[2]) - (__pyx_v_gpos[2])) * ((__pyx_v_ppos[2]) - (__pyx_v_gpos[2]))));
11876 
11877         /* "yt/geometry/particle_deposit.pyx":545
11878  *                           (ppos[1] - gpos[1])*(ppos[1] - gpos[1]) +
11879  *                           (ppos[2] - gpos[2])*(ppos[2] - gpos[2]))
11880  *                     if r2 < self.distfield[k,j,i,offset]:             # <<<<<<<<<<<<<<
11881  *                         self.distfield[k,j,i,offset] = r2
11882  *                         self.nnfield[k,j,i,offset] = fields[0]
11883  */
11884         if (unlikely(!__pyx_v_self->distfield.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 545, __pyx_L1_error)}
11885         __pyx_t_10 = __pyx_v_k;
11886         __pyx_t_11 = __pyx_v_j;
11887         __pyx_t_12 = __pyx_v_i;
11888         __pyx_t_13 = __pyx_v_offset;
11889         if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_self->distfield.shape[0];
11890         if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_v_self->distfield.shape[1];
11891         if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_self->distfield.shape[2];
11892         if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_self->distfield.shape[3];
11893         __pyx_t_14 = ((__pyx_v_r2 < (*((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->distfield.data + __pyx_t_10 * __pyx_v_self->distfield.strides[0]) ) + __pyx_t_11 * __pyx_v_self->distfield.strides[1]) ) + __pyx_t_12 * __pyx_v_self->distfield.strides[2]) ) + __pyx_t_13 * __pyx_v_self->distfield.strides[3]) )))) != 0);
11894         if (__pyx_t_14) {
11895 
11896           /* "yt/geometry/particle_deposit.pyx":546
11897  *                           (ppos[2] - gpos[2])*(ppos[2] - gpos[2]))
11898  *                     if r2 < self.distfield[k,j,i,offset]:
11899  *                         self.distfield[k,j,i,offset] = r2             # <<<<<<<<<<<<<<
11900  *                         self.nnfield[k,j,i,offset] = fields[0]
11901  *                     gpos[2] += dds[2]
11902  */
11903           if (unlikely(!__pyx_v_self->distfield.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 546, __pyx_L1_error)}
11904           __pyx_t_15 = __pyx_v_k;
11905           __pyx_t_16 = __pyx_v_j;
11906           __pyx_t_17 = __pyx_v_i;
11907           __pyx_t_18 = __pyx_v_offset;
11908           if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_self->distfield.shape[0];
11909           if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_self->distfield.shape[1];
11910           if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_self->distfield.shape[2];
11911           if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_v_self->distfield.shape[3];
11912           *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->distfield.data + __pyx_t_15 * __pyx_v_self->distfield.strides[0]) ) + __pyx_t_16 * __pyx_v_self->distfield.strides[1]) ) + __pyx_t_17 * __pyx_v_self->distfield.strides[2]) ) + __pyx_t_18 * __pyx_v_self->distfield.strides[3]) )) = __pyx_v_r2;
11913 
11914           /* "yt/geometry/particle_deposit.pyx":547
11915  *                     if r2 < self.distfield[k,j,i,offset]:
11916  *                         self.distfield[k,j,i,offset] = r2
11917  *                         self.nnfield[k,j,i,offset] = fields[0]             # <<<<<<<<<<<<<<
11918  *                     gpos[2] += dds[2]
11919  *                 gpos[1] += dds[1]
11920  */
11921           __pyx_t_19 = 0;
11922           if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_v_fields.shape[0];
11923           if (unlikely(!__pyx_v_self->nnfield.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 547, __pyx_L1_error)}
11924           __pyx_t_20 = __pyx_v_k;
11925           __pyx_t_21 = __pyx_v_j;
11926           __pyx_t_22 = __pyx_v_i;
11927           __pyx_t_23 = __pyx_v_offset;
11928           if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_v_self->nnfield.shape[0];
11929           if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_v_self->nnfield.shape[1];
11930           if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_v_self->nnfield.shape[2];
11931           if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_v_self->nnfield.shape[3];
11932           *((__pyx_t_5numpy_float64_t *) ( /* dim=3 */ (( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->nnfield.data + __pyx_t_20 * __pyx_v_self->nnfield.strides[0]) ) + __pyx_t_21 * __pyx_v_self->nnfield.strides[1]) ) + __pyx_t_22 * __pyx_v_self->nnfield.strides[2]) ) + __pyx_t_23 * __pyx_v_self->nnfield.strides[3]) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_fields.data + __pyx_t_19 * __pyx_v_fields.strides[0]) )));
11933 
11934           /* "yt/geometry/particle_deposit.pyx":545
11935  *                           (ppos[1] - gpos[1])*(ppos[1] - gpos[1]) +
11936  *                           (ppos[2] - gpos[2])*(ppos[2] - gpos[2]))
11937  *                     if r2 < self.distfield[k,j,i,offset]:             # <<<<<<<<<<<<<<
11938  *                         self.distfield[k,j,i,offset] = r2
11939  *                         self.nnfield[k,j,i,offset] = fields[0]
11940  */
11941         }
11942 
11943         /* "yt/geometry/particle_deposit.pyx":548
11944  *                         self.distfield[k,j,i,offset] = r2
11945  *                         self.nnfield[k,j,i,offset] = fields[0]
11946  *                     gpos[2] += dds[2]             # <<<<<<<<<<<<<<
11947  *                 gpos[1] += dds[1]
11948  *             gpos[0] += dds[0]
11949  */
11950         __pyx_t_24 = 2;
11951         (__pyx_v_gpos[__pyx_t_24]) = ((__pyx_v_gpos[__pyx_t_24]) + (__pyx_v_dds[2]));
11952       }
11953 
11954       /* "yt/geometry/particle_deposit.pyx":549
11955  *                         self.nnfield[k,j,i,offset] = fields[0]
11956  *                     gpos[2] += dds[2]
11957  *                 gpos[1] += dds[1]             # <<<<<<<<<<<<<<
11958  *             gpos[0] += dds[0]
11959  *         return 0
11960  */
11961       __pyx_t_24 = 1;
11962       (__pyx_v_gpos[__pyx_t_24]) = ((__pyx_v_gpos[__pyx_t_24]) + (__pyx_v_dds[1]));
11963     }
11964 
11965     /* "yt/geometry/particle_deposit.pyx":550
11966  *                     gpos[2] += dds[2]
11967  *                 gpos[1] += dds[1]
11968  *             gpos[0] += dds[0]             # <<<<<<<<<<<<<<
11969  *         return 0
11970  *
11971  */
11972     __pyx_t_24 = 0;
11973     (__pyx_v_gpos[__pyx_t_24]) = ((__pyx_v_gpos[__pyx_t_24]) + (__pyx_v_dds[0]));
11974   }
11975 
11976   /* "yt/geometry/particle_deposit.pyx":551
11977  *                 gpos[1] += dds[1]
11978  *             gpos[0] += dds[0]
11979  *         return 0             # <<<<<<<<<<<<<<
11980  *
11981  *     def finalize(self):
11982  */
11983   __pyx_r = 0;
11984   goto __pyx_L0;
11985 
11986   /* "yt/geometry/particle_deposit.pyx":522
11987  *     @cython.cdivision(True)
11988  *     @cython.boundscheck(False)
11989  *     cdef int process(self, int dim[3], int ipart,             # <<<<<<<<<<<<<<
11990  *                      np.float64_t left_edge[3],
11991  *                      np.float64_t dds[3],
11992  */
11993 
11994   /* function exit code */
11995   __pyx_L1_error:;
11996   {
11997     #ifdef WITH_THREAD
11998     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
11999     #endif
12000     __Pyx_AddTraceback("yt.geometry.particle_deposit.NNParticleField.process", __pyx_clineno, __pyx_lineno, __pyx_filename);
12001     #ifdef WITH_THREAD
12002     __Pyx_PyGILState_Release(__pyx_gilstate_save);
12003     #endif
12004   }
12005   __pyx_r = -1;
12006   __pyx_L0:;
12007   return __pyx_r;
12008 }
12009 
12010 /* "yt/geometry/particle_deposit.pyx":553
12011  *         return 0
12012  *
12013  *     def finalize(self):             # <<<<<<<<<<<<<<
12014  *         nn = np.asarray(self.nnfield)
12015  *         nn.shape = self.nvals
12016  */
12017 
12018 /* Python wrapper */
12019 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_3finalize(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)12020 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_3finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12021   PyObject *__pyx_r = 0;
12022   __Pyx_RefNannyDeclarations
12023   __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
12024   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_2finalize(((struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *)__pyx_v_self));
12025 
12026   /* function exit code */
12027   __Pyx_RefNannyFinishContext();
12028   return __pyx_r;
12029 }
12030 
__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField * __pyx_v_self)12031 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_2finalize(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self) {
12032   PyObject *__pyx_v_nn = NULL;
12033   PyObject *__pyx_r = NULL;
12034   __Pyx_RefNannyDeclarations
12035   PyObject *__pyx_t_1 = NULL;
12036   PyObject *__pyx_t_2 = NULL;
12037   PyObject *__pyx_t_3 = NULL;
12038   PyObject *__pyx_t_4 = NULL;
12039   __Pyx_RefNannySetupContext("finalize", 0);
12040 
12041   /* "yt/geometry/particle_deposit.pyx":554
12042  *
12043  *     def finalize(self):
12044  *         nn = np.asarray(self.nnfield)             # <<<<<<<<<<<<<<
12045  *         nn.shape = self.nvals
12046  *         return nn
12047  */
12048   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 554, __pyx_L1_error)
12049   __Pyx_GOTREF(__pyx_t_2);
12050   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 554, __pyx_L1_error)
12051   __Pyx_GOTREF(__pyx_t_3);
12052   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12053   if (unlikely(!__pyx_v_self->nnfield.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 554, __pyx_L1_error)}
12054   __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->nnfield, 4, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 554, __pyx_L1_error)
12055   __Pyx_GOTREF(__pyx_t_2);
12056   __pyx_t_4 = NULL;
12057   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
12058     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
12059     if (likely(__pyx_t_4)) {
12060       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12061       __Pyx_INCREF(__pyx_t_4);
12062       __Pyx_INCREF(function);
12063       __Pyx_DECREF_SET(__pyx_t_3, function);
12064     }
12065   }
12066   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
12067   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12068   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12069   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 554, __pyx_L1_error)
12070   __Pyx_GOTREF(__pyx_t_1);
12071   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12072   __pyx_v_nn = __pyx_t_1;
12073   __pyx_t_1 = 0;
12074 
12075   /* "yt/geometry/particle_deposit.pyx":555
12076  *     def finalize(self):
12077  *         nn = np.asarray(self.nnfield)
12078  *         nn.shape = self.nvals             # <<<<<<<<<<<<<<
12079  *         return nn
12080  *
12081  */
12082   __pyx_t_1 = __pyx_v_self->__pyx_base.nvals;
12083   __Pyx_INCREF(__pyx_t_1);
12084   if (__Pyx_PyObject_SetAttrStr(__pyx_v_nn, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(1, 555, __pyx_L1_error)
12085   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12086 
12087   /* "yt/geometry/particle_deposit.pyx":556
12088  *         nn = np.asarray(self.nnfield)
12089  *         nn.shape = self.nvals
12090  *         return nn             # <<<<<<<<<<<<<<
12091  *
12092  * deposit_nearest = NNParticleField
12093  */
12094   __Pyx_XDECREF(__pyx_r);
12095   __Pyx_INCREF(__pyx_v_nn);
12096   __pyx_r = __pyx_v_nn;
12097   goto __pyx_L0;
12098 
12099   /* "yt/geometry/particle_deposit.pyx":553
12100  *         return 0
12101  *
12102  *     def finalize(self):             # <<<<<<<<<<<<<<
12103  *         nn = np.asarray(self.nnfield)
12104  *         nn.shape = self.nvals
12105  */
12106 
12107   /* function exit code */
12108   __pyx_L1_error:;
12109   __Pyx_XDECREF(__pyx_t_1);
12110   __Pyx_XDECREF(__pyx_t_2);
12111   __Pyx_XDECREF(__pyx_t_3);
12112   __Pyx_XDECREF(__pyx_t_4);
12113   __Pyx_AddTraceback("yt.geometry.particle_deposit.NNParticleField.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
12114   __pyx_r = NULL;
12115   __pyx_L0:;
12116   __Pyx_XDECREF(__pyx_v_nn);
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("self.sph_kernel cannot be converted to a Python object for pickling")
12125  * def __setstate_cython__(self, __pyx_state):
12126  */
12127 
12128 /* Python wrapper */
12129 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)12130 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_5__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_2yt_8geometry_16particle_deposit_15NNParticleField_4__reduce_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *)__pyx_v_self));
12135 
12136   /* function exit code */
12137   __Pyx_RefNannyFinishContext();
12138   return __pyx_r;
12139 }
12140 
__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField * __pyx_v_self)12141 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self) {
12142   PyObject *__pyx_r = NULL;
12143   __Pyx_RefNannyDeclarations
12144   PyObject *__pyx_t_1 = NULL;
12145   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
12146 
12147   /* "(tree fragment)":2
12148  * def __reduce_cython__(self):
12149  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
12150  * def __setstate_cython__(self, __pyx_state):
12151  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12152  */
12153   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
12154   __Pyx_GOTREF(__pyx_t_1);
12155   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12156   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12157   __PYX_ERR(2, 2, __pyx_L1_error)
12158 
12159   /* "(tree fragment)":1
12160  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
12161  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12162  * def __setstate_cython__(self, __pyx_state):
12163  */
12164 
12165   /* function exit code */
12166   __pyx_L1_error:;
12167   __Pyx_XDECREF(__pyx_t_1);
12168   __Pyx_AddTraceback("yt.geometry.particle_deposit.NNParticleField.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12169   __pyx_r = NULL;
12170   __Pyx_XGIVEREF(__pyx_r);
12171   __Pyx_RefNannyFinishContext();
12172   return __pyx_r;
12173 }
12174 
12175 /* "(tree fragment)":3
12176  * def __reduce_cython__(self):
12177  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12178  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
12179  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12180  */
12181 
12182 /* Python wrapper */
12183 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)12184 static PyObject *__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
12185   PyObject *__pyx_r = 0;
12186   __Pyx_RefNannyDeclarations
12187   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
12188   __pyx_r = __pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_6__setstate_cython__(((struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
12189 
12190   /* function exit code */
12191   __Pyx_RefNannyFinishContext();
12192   return __pyx_r;
12193 }
12194 
__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)12195 static PyObject *__pyx_pf_2yt_8geometry_16particle_deposit_15NNParticleField_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
12196   PyObject *__pyx_r = NULL;
12197   __Pyx_RefNannyDeclarations
12198   PyObject *__pyx_t_1 = NULL;
12199   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
12200 
12201   /* "(tree fragment)":4
12202  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12203  * def __setstate_cython__(self, __pyx_state):
12204  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
12205  */
12206   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
12207   __Pyx_GOTREF(__pyx_t_1);
12208   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
12209   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12210   __PYX_ERR(2, 4, __pyx_L1_error)
12211 
12212   /* "(tree fragment)":3
12213  * def __reduce_cython__(self):
12214  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12215  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
12216  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
12217  */
12218 
12219   /* function exit code */
12220   __pyx_L1_error:;
12221   __Pyx_XDECREF(__pyx_t_1);
12222   __Pyx_AddTraceback("yt.geometry.particle_deposit.NNParticleField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12223   __pyx_r = NULL;
12224   __Pyx_XGIVEREF(__pyx_r);
12225   __Pyx_RefNannyFinishContext();
12226   return __pyx_r;
12227 }
12228 
12229 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
12230  *         # experimental exception made for __getbuffer__ and __releasebuffer__
12231  *         # -- the details of this may change.
12232  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
12233  *             # This implementation of getbuffer is geared towards Cython
12234  *             # requirements, and does not yet fulfill the PEP.
12235  */
12236 
12237 /* Python wrapper */
12238 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)12239 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
12240   int __pyx_r;
12241   __Pyx_RefNannyDeclarations
12242   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
12243   __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
12244 
12245   /* function exit code */
12246   __Pyx_RefNannyFinishContext();
12247   return __pyx_r;
12248 }
12249 
__pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)12250 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
12251   int __pyx_v_i;
12252   int __pyx_v_ndim;
12253   int __pyx_v_endian_detector;
12254   int __pyx_v_little_endian;
12255   int __pyx_v_t;
12256   char *__pyx_v_f;
12257   PyArray_Descr *__pyx_v_descr = 0;
12258   int __pyx_v_offset;
12259   int __pyx_r;
12260   __Pyx_RefNannyDeclarations
12261   int __pyx_t_1;
12262   int __pyx_t_2;
12263   PyObject *__pyx_t_3 = NULL;
12264   int __pyx_t_4;
12265   int __pyx_t_5;
12266   int __pyx_t_6;
12267   PyArray_Descr *__pyx_t_7;
12268   PyObject *__pyx_t_8 = NULL;
12269   char *__pyx_t_9;
12270   if (__pyx_v_info == NULL) {
12271     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
12272     return -1;
12273   }
12274   __Pyx_RefNannySetupContext("__getbuffer__", 0);
12275   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
12276   __Pyx_GIVEREF(__pyx_v_info->obj);
12277 
12278   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
12279  *
12280  *             cdef int i, ndim
12281  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
12282  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
12283  *
12284  */
12285   __pyx_v_endian_detector = 1;
12286 
12287   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
12288  *             cdef int i, ndim
12289  *             cdef int endian_detector = 1
12290  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
12291  *
12292  *             ndim = PyArray_NDIM(self)
12293  */
12294   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
12295 
12296   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
12297  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
12298  *
12299  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
12300  *
12301  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
12302  */
12303   __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
12304 
12305   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
12306  *             ndim = PyArray_NDIM(self)
12307  *
12308  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
12309  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
12310  *                 raise ValueError(u"ndarray is not C contiguous")
12311  */
12312   __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
12313   if (__pyx_t_2) {
12314   } else {
12315     __pyx_t_1 = __pyx_t_2;
12316     goto __pyx_L4_bool_binop_done;
12317   }
12318 
12319   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
12320  *
12321  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
12322  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
12323  *                 raise ValueError(u"ndarray is not C contiguous")
12324  *
12325  */
12326   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
12327   __pyx_t_1 = __pyx_t_2;
12328   __pyx_L4_bool_binop_done:;
12329 
12330   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
12331  *             ndim = PyArray_NDIM(self)
12332  *
12333  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
12334  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
12335  *                 raise ValueError(u"ndarray is not C contiguous")
12336  */
12337   if (unlikely(__pyx_t_1)) {
12338 
12339     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
12340  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
12341  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
12342  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
12343  *
12344  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
12345  */
12346     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 272, __pyx_L1_error)
12347     __Pyx_GOTREF(__pyx_t_3);
12348     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
12349     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12350     __PYX_ERR(3, 272, __pyx_L1_error)
12351 
12352     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
12353  *             ndim = PyArray_NDIM(self)
12354  *
12355  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
12356  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
12357  *                 raise ValueError(u"ndarray is not C contiguous")
12358  */
12359   }
12360 
12361   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
12362  *                 raise ValueError(u"ndarray is not C contiguous")
12363  *
12364  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
12365  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
12366  *                 raise ValueError(u"ndarray is not Fortran contiguous")
12367  */
12368   __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
12369   if (__pyx_t_2) {
12370   } else {
12371     __pyx_t_1 = __pyx_t_2;
12372     goto __pyx_L7_bool_binop_done;
12373   }
12374 
12375   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
12376  *
12377  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
12378  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
12379  *                 raise ValueError(u"ndarray is not Fortran contiguous")
12380  *
12381  */
12382   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
12383   __pyx_t_1 = __pyx_t_2;
12384   __pyx_L7_bool_binop_done:;
12385 
12386   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
12387  *                 raise ValueError(u"ndarray is not C contiguous")
12388  *
12389  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
12390  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
12391  *                 raise ValueError(u"ndarray is not Fortran contiguous")
12392  */
12393   if (unlikely(__pyx_t_1)) {
12394 
12395     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
12396  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
12397  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
12398  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
12399  *
12400  *             info.buf = PyArray_DATA(self)
12401  */
12402     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 276, __pyx_L1_error)
12403     __Pyx_GOTREF(__pyx_t_3);
12404     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
12405     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12406     __PYX_ERR(3, 276, __pyx_L1_error)
12407 
12408     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
12409  *                 raise ValueError(u"ndarray is not C contiguous")
12410  *
12411  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
12412  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
12413  *                 raise ValueError(u"ndarray is not Fortran contiguous")
12414  */
12415   }
12416 
12417   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
12418  *                 raise ValueError(u"ndarray is not Fortran contiguous")
12419  *
12420  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
12421  *             info.ndim = ndim
12422  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
12423  */
12424   __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
12425 
12426   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
12427  *
12428  *             info.buf = PyArray_DATA(self)
12429  *             info.ndim = ndim             # <<<<<<<<<<<<<<
12430  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
12431  *                 # Allocate new buffer for strides and shape info.
12432  */
12433   __pyx_v_info->ndim = __pyx_v_ndim;
12434 
12435   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
12436  *             info.buf = PyArray_DATA(self)
12437  *             info.ndim = ndim
12438  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
12439  *                 # Allocate new buffer for strides and shape info.
12440  *                 # This is allocated as one block, strides first.
12441  */
12442   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
12443   if (__pyx_t_1) {
12444 
12445     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
12446  *                 # Allocate new buffer for strides and shape info.
12447  *                 # This is allocated as one block, strides first.
12448  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)             # <<<<<<<<<<<<<<
12449  *                 info.shape = info.strides + ndim
12450  *                 for i in range(ndim):
12451  */
12452     __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
12453 
12454     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
12455  *                 # This is allocated as one block, strides first.
12456  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
12457  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
12458  *                 for i in range(ndim):
12459  *                     info.strides[i] = PyArray_STRIDES(self)[i]
12460  */
12461     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
12462 
12463     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
12464  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
12465  *                 info.shape = info.strides + ndim
12466  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
12467  *                     info.strides[i] = PyArray_STRIDES(self)[i]
12468  *                     info.shape[i] = PyArray_DIMS(self)[i]
12469  */
12470     __pyx_t_4 = __pyx_v_ndim;
12471     __pyx_t_5 = __pyx_t_4;
12472     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
12473       __pyx_v_i = __pyx_t_6;
12474 
12475       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
12476  *                 info.shape = info.strides + ndim
12477  *                 for i in range(ndim):
12478  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
12479  *                     info.shape[i] = PyArray_DIMS(self)[i]
12480  *             else:
12481  */
12482       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
12483 
12484       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
12485  *                 for i in range(ndim):
12486  *                     info.strides[i] = PyArray_STRIDES(self)[i]
12487  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
12488  *             else:
12489  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
12490  */
12491       (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
12492     }
12493 
12494     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
12495  *             info.buf = PyArray_DATA(self)
12496  *             info.ndim = ndim
12497  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
12498  *                 # Allocate new buffer for strides and shape info.
12499  *                 # This is allocated as one block, strides first.
12500  */
12501     goto __pyx_L9;
12502   }
12503 
12504   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
12505  *                     info.shape[i] = PyArray_DIMS(self)[i]
12506  *             else:
12507  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
12508  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
12509  *             info.suboffsets = NULL
12510  */
12511   /*else*/ {
12512     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
12513 
12514     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
12515  *             else:
12516  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
12517  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
12518  *             info.suboffsets = NULL
12519  *             info.itemsize = PyArray_ITEMSIZE(self)
12520  */
12521     __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
12522   }
12523   __pyx_L9:;
12524 
12525   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
12526  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
12527  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
12528  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
12529  *             info.itemsize = PyArray_ITEMSIZE(self)
12530  *             info.readonly = not PyArray_ISWRITEABLE(self)
12531  */
12532   __pyx_v_info->suboffsets = NULL;
12533 
12534   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
12535  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
12536  *             info.suboffsets = NULL
12537  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
12538  *             info.readonly = not PyArray_ISWRITEABLE(self)
12539  *
12540  */
12541   __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
12542 
12543   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
12544  *             info.suboffsets = NULL
12545  *             info.itemsize = PyArray_ITEMSIZE(self)
12546  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
12547  *
12548  *             cdef int t
12549  */
12550   __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
12551 
12552   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
12553  *
12554  *             cdef int t
12555  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
12556  *             cdef dtype descr = <dtype>PyArray_DESCR(self)
12557  *             cdef int offset
12558  */
12559   __pyx_v_f = NULL;
12560 
12561   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
12562  *             cdef int t
12563  *             cdef char* f = NULL
12564  *             cdef dtype descr = <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
12565  *             cdef int offset
12566  *
12567  */
12568   __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
12569   __pyx_t_3 = ((PyObject *)__pyx_t_7);
12570   __Pyx_INCREF(__pyx_t_3);
12571   __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
12572   __pyx_t_3 = 0;
12573 
12574   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
12575  *             cdef int offset
12576  *
12577  *             info.obj = self             # <<<<<<<<<<<<<<
12578  *
12579  *             if not PyDataType_HASFIELDS(descr):
12580  */
12581   __Pyx_INCREF(((PyObject *)__pyx_v_self));
12582   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
12583   __Pyx_GOTREF(__pyx_v_info->obj);
12584   __Pyx_DECREF(__pyx_v_info->obj);
12585   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
12586 
12587   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
12588  *             info.obj = self
12589  *
12590  *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
12591  *                 t = descr.type_num
12592  *                 if ((descr.byteorder == c'>' and little_endian) or
12593  */
12594   __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
12595   if (__pyx_t_1) {
12596 
12597     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
12598  *
12599  *             if not PyDataType_HASFIELDS(descr):
12600  *                 t = descr.type_num             # <<<<<<<<<<<<<<
12601  *                 if ((descr.byteorder == c'>' and little_endian) or
12602  *                     (descr.byteorder == c'<' and not little_endian)):
12603  */
12604     __pyx_t_4 = __pyx_v_descr->type_num;
12605     __pyx_v_t = __pyx_t_4;
12606 
12607     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
12608  *             if not PyDataType_HASFIELDS(descr):
12609  *                 t = descr.type_num
12610  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
12611  *                     (descr.byteorder == c'<' and not little_endian)):
12612  *                     raise ValueError(u"Non-native byte order not supported")
12613  */
12614     __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
12615     if (!__pyx_t_2) {
12616       goto __pyx_L15_next_or;
12617     } else {
12618     }
12619     __pyx_t_2 = (__pyx_v_little_endian != 0);
12620     if (!__pyx_t_2) {
12621     } else {
12622       __pyx_t_1 = __pyx_t_2;
12623       goto __pyx_L14_bool_binop_done;
12624     }
12625     __pyx_L15_next_or:;
12626 
12627     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
12628  *                 t = descr.type_num
12629  *                 if ((descr.byteorder == c'>' and little_endian) or
12630  *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
12631  *                     raise ValueError(u"Non-native byte order not supported")
12632  *                 if   t == NPY_BYTE:        f = "b"
12633  */
12634     __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
12635     if (__pyx_t_2) {
12636     } else {
12637       __pyx_t_1 = __pyx_t_2;
12638       goto __pyx_L14_bool_binop_done;
12639     }
12640     __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
12641     __pyx_t_1 = __pyx_t_2;
12642     __pyx_L14_bool_binop_done:;
12643 
12644     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
12645  *             if not PyDataType_HASFIELDS(descr):
12646  *                 t = descr.type_num
12647  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
12648  *                     (descr.byteorder == c'<' and not little_endian)):
12649  *                     raise ValueError(u"Non-native byte order not supported")
12650  */
12651     if (unlikely(__pyx_t_1)) {
12652 
12653       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
12654  *                 if ((descr.byteorder == c'>' and little_endian) or
12655  *                     (descr.byteorder == c'<' and not little_endian)):
12656  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
12657  *                 if   t == NPY_BYTE:        f = "b"
12658  *                 elif t == NPY_UBYTE:       f = "B"
12659  */
12660       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 306, __pyx_L1_error)
12661       __Pyx_GOTREF(__pyx_t_3);
12662       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
12663       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12664       __PYX_ERR(3, 306, __pyx_L1_error)
12665 
12666       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
12667  *             if not PyDataType_HASFIELDS(descr):
12668  *                 t = descr.type_num
12669  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
12670  *                     (descr.byteorder == c'<' and not little_endian)):
12671  *                     raise ValueError(u"Non-native byte order not supported")
12672  */
12673     }
12674 
12675     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
12676  *                     (descr.byteorder == c'<' and not little_endian)):
12677  *                     raise ValueError(u"Non-native byte order not supported")
12678  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
12679  *                 elif t == NPY_UBYTE:       f = "B"
12680  *                 elif t == NPY_SHORT:       f = "h"
12681  */
12682     switch (__pyx_v_t) {
12683       case NPY_BYTE:
12684       __pyx_v_f = ((char *)"b");
12685       break;
12686       case NPY_UBYTE:
12687 
12688       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
12689  *                     raise ValueError(u"Non-native byte order not supported")
12690  *                 if   t == NPY_BYTE:        f = "b"
12691  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
12692  *                 elif t == NPY_SHORT:       f = "h"
12693  *                 elif t == NPY_USHORT:      f = "H"
12694  */
12695       __pyx_v_f = ((char *)"B");
12696       break;
12697       case NPY_SHORT:
12698 
12699       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
12700  *                 if   t == NPY_BYTE:        f = "b"
12701  *                 elif t == NPY_UBYTE:       f = "B"
12702  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
12703  *                 elif t == NPY_USHORT:      f = "H"
12704  *                 elif t == NPY_INT:         f = "i"
12705  */
12706       __pyx_v_f = ((char *)"h");
12707       break;
12708       case NPY_USHORT:
12709 
12710       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
12711  *                 elif t == NPY_UBYTE:       f = "B"
12712  *                 elif t == NPY_SHORT:       f = "h"
12713  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
12714  *                 elif t == NPY_INT:         f = "i"
12715  *                 elif t == NPY_UINT:        f = "I"
12716  */
12717       __pyx_v_f = ((char *)"H");
12718       break;
12719       case NPY_INT:
12720 
12721       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
12722  *                 elif t == NPY_SHORT:       f = "h"
12723  *                 elif t == NPY_USHORT:      f = "H"
12724  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
12725  *                 elif t == NPY_UINT:        f = "I"
12726  *                 elif t == NPY_LONG:        f = "l"
12727  */
12728       __pyx_v_f = ((char *)"i");
12729       break;
12730       case NPY_UINT:
12731 
12732       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
12733  *                 elif t == NPY_USHORT:      f = "H"
12734  *                 elif t == NPY_INT:         f = "i"
12735  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
12736  *                 elif t == NPY_LONG:        f = "l"
12737  *                 elif t == NPY_ULONG:       f = "L"
12738  */
12739       __pyx_v_f = ((char *)"I");
12740       break;
12741       case NPY_LONG:
12742 
12743       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
12744  *                 elif t == NPY_INT:         f = "i"
12745  *                 elif t == NPY_UINT:        f = "I"
12746  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
12747  *                 elif t == NPY_ULONG:       f = "L"
12748  *                 elif t == NPY_LONGLONG:    f = "q"
12749  */
12750       __pyx_v_f = ((char *)"l");
12751       break;
12752       case NPY_ULONG:
12753 
12754       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
12755  *                 elif t == NPY_UINT:        f = "I"
12756  *                 elif t == NPY_LONG:        f = "l"
12757  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
12758  *                 elif t == NPY_LONGLONG:    f = "q"
12759  *                 elif t == NPY_ULONGLONG:   f = "Q"
12760  */
12761       __pyx_v_f = ((char *)"L");
12762       break;
12763       case NPY_LONGLONG:
12764 
12765       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
12766  *                 elif t == NPY_LONG:        f = "l"
12767  *                 elif t == NPY_ULONG:       f = "L"
12768  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
12769  *                 elif t == NPY_ULONGLONG:   f = "Q"
12770  *                 elif t == NPY_FLOAT:       f = "f"
12771  */
12772       __pyx_v_f = ((char *)"q");
12773       break;
12774       case NPY_ULONGLONG:
12775 
12776       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
12777  *                 elif t == NPY_ULONG:       f = "L"
12778  *                 elif t == NPY_LONGLONG:    f = "q"
12779  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
12780  *                 elif t == NPY_FLOAT:       f = "f"
12781  *                 elif t == NPY_DOUBLE:      f = "d"
12782  */
12783       __pyx_v_f = ((char *)"Q");
12784       break;
12785       case NPY_FLOAT:
12786 
12787       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
12788  *                 elif t == NPY_LONGLONG:    f = "q"
12789  *                 elif t == NPY_ULONGLONG:   f = "Q"
12790  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
12791  *                 elif t == NPY_DOUBLE:      f = "d"
12792  *                 elif t == NPY_LONGDOUBLE:  f = "g"
12793  */
12794       __pyx_v_f = ((char *)"f");
12795       break;
12796       case NPY_DOUBLE:
12797 
12798       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
12799  *                 elif t == NPY_ULONGLONG:   f = "Q"
12800  *                 elif t == NPY_FLOAT:       f = "f"
12801  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
12802  *                 elif t == NPY_LONGDOUBLE:  f = "g"
12803  *                 elif t == NPY_CFLOAT:      f = "Zf"
12804  */
12805       __pyx_v_f = ((char *)"d");
12806       break;
12807       case NPY_LONGDOUBLE:
12808 
12809       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
12810  *                 elif t == NPY_FLOAT:       f = "f"
12811  *                 elif t == NPY_DOUBLE:      f = "d"
12812  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
12813  *                 elif t == NPY_CFLOAT:      f = "Zf"
12814  *                 elif t == NPY_CDOUBLE:     f = "Zd"
12815  */
12816       __pyx_v_f = ((char *)"g");
12817       break;
12818       case NPY_CFLOAT:
12819 
12820       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
12821  *                 elif t == NPY_DOUBLE:      f = "d"
12822  *                 elif t == NPY_LONGDOUBLE:  f = "g"
12823  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
12824  *                 elif t == NPY_CDOUBLE:     f = "Zd"
12825  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
12826  */
12827       __pyx_v_f = ((char *)"Zf");
12828       break;
12829       case NPY_CDOUBLE:
12830 
12831       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
12832  *                 elif t == NPY_LONGDOUBLE:  f = "g"
12833  *                 elif t == NPY_CFLOAT:      f = "Zf"
12834  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
12835  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
12836  *                 elif t == NPY_OBJECT:      f = "O"
12837  */
12838       __pyx_v_f = ((char *)"Zd");
12839       break;
12840       case NPY_CLONGDOUBLE:
12841 
12842       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
12843  *                 elif t == NPY_CFLOAT:      f = "Zf"
12844  *                 elif t == NPY_CDOUBLE:     f = "Zd"
12845  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
12846  *                 elif t == NPY_OBJECT:      f = "O"
12847  *                 else:
12848  */
12849       __pyx_v_f = ((char *)"Zg");
12850       break;
12851       case NPY_OBJECT:
12852 
12853       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
12854  *                 elif t == NPY_CDOUBLE:     f = "Zd"
12855  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
12856  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
12857  *                 else:
12858  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
12859  */
12860       __pyx_v_f = ((char *)"O");
12861       break;
12862       default:
12863 
12864       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
12865  *                 elif t == NPY_OBJECT:      f = "O"
12866  *                 else:
12867  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
12868  *                 info.format = f
12869  *                 return
12870  */
12871       __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
12872       __Pyx_GOTREF(__pyx_t_3);
12873       __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 325, __pyx_L1_error)
12874       __Pyx_GOTREF(__pyx_t_8);
12875       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12876       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
12877       __Pyx_GOTREF(__pyx_t_3);
12878       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12879       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
12880       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12881       __PYX_ERR(3, 325, __pyx_L1_error)
12882       break;
12883     }
12884 
12885     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
12886  *                 else:
12887  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
12888  *                 info.format = f             # <<<<<<<<<<<<<<
12889  *                 return
12890  *             else:
12891  */
12892     __pyx_v_info->format = __pyx_v_f;
12893 
12894     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
12895  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
12896  *                 info.format = f
12897  *                 return             # <<<<<<<<<<<<<<
12898  *             else:
12899  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
12900  */
12901     __pyx_r = 0;
12902     goto __pyx_L0;
12903 
12904     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
12905  *             info.obj = self
12906  *
12907  *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
12908  *                 t = descr.type_num
12909  *                 if ((descr.byteorder == c'>' and little_endian) or
12910  */
12911   }
12912 
12913   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
12914  *                 return
12915  *             else:
12916  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
12917  *                 info.format[0] = c'^' # Native data types, manual alignment
12918  *                 offset = 0
12919  */
12920   /*else*/ {
12921     __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
12922 
12923     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
12924  *             else:
12925  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
12926  *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
12927  *                 offset = 0
12928  *                 f = _util_dtypestring(descr, info.format + 1,
12929  */
12930     (__pyx_v_info->format[0]) = '^';
12931 
12932     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
12933  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
12934  *                 info.format[0] = c'^' # Native data types, manual alignment
12935  *                 offset = 0             # <<<<<<<<<<<<<<
12936  *                 f = _util_dtypestring(descr, info.format + 1,
12937  *                                       info.format + _buffer_format_string_len,
12938  */
12939     __pyx_v_offset = 0;
12940 
12941     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
12942  *                 info.format[0] = c'^' # Native data types, manual alignment
12943  *                 offset = 0
12944  *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
12945  *                                       info.format + _buffer_format_string_len,
12946  *                                       &offset)
12947  */
12948     __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 332, __pyx_L1_error)
12949     __pyx_v_f = __pyx_t_9;
12950 
12951     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
12952  *                                       info.format + _buffer_format_string_len,
12953  *                                       &offset)
12954  *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
12955  *
12956  *         def __releasebuffer__(ndarray self, Py_buffer* info):
12957  */
12958     (__pyx_v_f[0]) = '\x00';
12959   }
12960 
12961   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
12962  *         # experimental exception made for __getbuffer__ and __releasebuffer__
12963  *         # -- the details of this may change.
12964  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
12965  *             # This implementation of getbuffer is geared towards Cython
12966  *             # requirements, and does not yet fulfill the PEP.
12967  */
12968 
12969   /* function exit code */
12970   __pyx_r = 0;
12971   goto __pyx_L0;
12972   __pyx_L1_error:;
12973   __Pyx_XDECREF(__pyx_t_3);
12974   __Pyx_XDECREF(__pyx_t_8);
12975   __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12976   __pyx_r = -1;
12977   if (__pyx_v_info->obj != NULL) {
12978     __Pyx_GOTREF(__pyx_v_info->obj);
12979     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
12980   }
12981   goto __pyx_L2;
12982   __pyx_L0:;
12983   if (__pyx_v_info->obj == Py_None) {
12984     __Pyx_GOTREF(__pyx_v_info->obj);
12985     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
12986   }
12987   __pyx_L2:;
12988   __Pyx_XDECREF((PyObject *)__pyx_v_descr);
12989   __Pyx_RefNannyFinishContext();
12990   return __pyx_r;
12991 }
12992 
12993 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
12994  *                 f[0] = c'\0' # Terminate format string
12995  *
12996  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
12997  *             if PyArray_HASFIELDS(self):
12998  *                 PyObject_Free(info.format)
12999  */
13000 
13001 /* Python wrapper */
13002 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
__pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info)13003 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
13004   __Pyx_RefNannyDeclarations
13005   __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
13006   __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
13007 
13008   /* function exit code */
13009   __Pyx_RefNannyFinishContext();
13010 }
13011 
__pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info)13012 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
13013   __Pyx_RefNannyDeclarations
13014   int __pyx_t_1;
13015   __Pyx_RefNannySetupContext("__releasebuffer__", 0);
13016 
13017   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
13018  *
13019  *         def __releasebuffer__(ndarray self, Py_buffer* info):
13020  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
13021  *                 PyObject_Free(info.format)
13022  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
13023  */
13024   __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
13025   if (__pyx_t_1) {
13026 
13027     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
13028  *         def __releasebuffer__(ndarray self, Py_buffer* info):
13029  *             if PyArray_HASFIELDS(self):
13030  *                 PyObject_Free(info.format)             # <<<<<<<<<<<<<<
13031  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
13032  *                 PyObject_Free(info.strides)
13033  */
13034     PyObject_Free(__pyx_v_info->format);
13035 
13036     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
13037  *
13038  *         def __releasebuffer__(ndarray self, Py_buffer* info):
13039  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
13040  *                 PyObject_Free(info.format)
13041  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
13042  */
13043   }
13044 
13045   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
13046  *             if PyArray_HASFIELDS(self):
13047  *                 PyObject_Free(info.format)
13048  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
13049  *                 PyObject_Free(info.strides)
13050  *                 # info.shape was stored after info.strides in the same block
13051  */
13052   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
13053   if (__pyx_t_1) {
13054 
13055     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
13056  *                 PyObject_Free(info.format)
13057  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
13058  *                 PyObject_Free(info.strides)             # <<<<<<<<<<<<<<
13059  *                 # info.shape was stored after info.strides in the same block
13060  *
13061  */
13062     PyObject_Free(__pyx_v_info->strides);
13063 
13064     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
13065  *             if PyArray_HASFIELDS(self):
13066  *                 PyObject_Free(info.format)
13067  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
13068  *                 PyObject_Free(info.strides)
13069  *                 # info.shape was stored after info.strides in the same block
13070  */
13071   }
13072 
13073   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
13074  *                 f[0] = c'\0' # Terminate format string
13075  *
13076  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
13077  *             if PyArray_HASFIELDS(self):
13078  *                 PyObject_Free(info.format)
13079  */
13080 
13081   /* function exit code */
13082   __Pyx_RefNannyFinishContext();
13083 }
13084 
13085 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
13086  * ctypedef npy_cdouble     complex_t
13087  *
13088  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
13089  *     return PyArray_MultiIterNew(1, <void*>a)
13090  *
13091  */
13092 
__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject * __pyx_v_a)13093 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
13094   PyObject *__pyx_r = NULL;
13095   __Pyx_RefNannyDeclarations
13096   PyObject *__pyx_t_1 = NULL;
13097   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
13098 
13099   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
13100  *
13101  * cdef inline object PyArray_MultiIterNew1(a):
13102  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
13103  *
13104  * cdef inline object PyArray_MultiIterNew2(a, b):
13105  */
13106   __Pyx_XDECREF(__pyx_r);
13107   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 822, __pyx_L1_error)
13108   __Pyx_GOTREF(__pyx_t_1);
13109   __pyx_r = __pyx_t_1;
13110   __pyx_t_1 = 0;
13111   goto __pyx_L0;
13112 
13113   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
13114  * ctypedef npy_cdouble     complex_t
13115  *
13116  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
13117  *     return PyArray_MultiIterNew(1, <void*>a)
13118  *
13119  */
13120 
13121   /* function exit code */
13122   __pyx_L1_error:;
13123   __Pyx_XDECREF(__pyx_t_1);
13124   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
13125   __pyx_r = 0;
13126   __pyx_L0:;
13127   __Pyx_XGIVEREF(__pyx_r);
13128   __Pyx_RefNannyFinishContext();
13129   return __pyx_r;
13130 }
13131 
13132 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
13133  *     return PyArray_MultiIterNew(1, <void*>a)
13134  *
13135  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
13136  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
13137  *
13138  */
13139 
__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject * __pyx_v_a,PyObject * __pyx_v_b)13140 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
13141   PyObject *__pyx_r = NULL;
13142   __Pyx_RefNannyDeclarations
13143   PyObject *__pyx_t_1 = NULL;
13144   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
13145 
13146   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
13147  *
13148  * cdef inline object PyArray_MultiIterNew2(a, b):
13149  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
13150  *
13151  * cdef inline object PyArray_MultiIterNew3(a, b, c):
13152  */
13153   __Pyx_XDECREF(__pyx_r);
13154   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 825, __pyx_L1_error)
13155   __Pyx_GOTREF(__pyx_t_1);
13156   __pyx_r = __pyx_t_1;
13157   __pyx_t_1 = 0;
13158   goto __pyx_L0;
13159 
13160   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
13161  *     return PyArray_MultiIterNew(1, <void*>a)
13162  *
13163  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
13164  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
13165  *
13166  */
13167 
13168   /* function exit code */
13169   __pyx_L1_error:;
13170   __Pyx_XDECREF(__pyx_t_1);
13171   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
13172   __pyx_r = 0;
13173   __pyx_L0:;
13174   __Pyx_XGIVEREF(__pyx_r);
13175   __Pyx_RefNannyFinishContext();
13176   return __pyx_r;
13177 }
13178 
13179 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
13180  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
13181  *
13182  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
13183  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
13184  *
13185  */
13186 
__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c)13187 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
13188   PyObject *__pyx_r = NULL;
13189   __Pyx_RefNannyDeclarations
13190   PyObject *__pyx_t_1 = NULL;
13191   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
13192 
13193   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
13194  *
13195  * cdef inline object PyArray_MultiIterNew3(a, b, c):
13196  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
13197  *
13198  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
13199  */
13200   __Pyx_XDECREF(__pyx_r);
13201   __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(3, 828, __pyx_L1_error)
13202   __Pyx_GOTREF(__pyx_t_1);
13203   __pyx_r = __pyx_t_1;
13204   __pyx_t_1 = 0;
13205   goto __pyx_L0;
13206 
13207   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
13208  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
13209  *
13210  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
13211  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
13212  *
13213  */
13214 
13215   /* function exit code */
13216   __pyx_L1_error:;
13217   __Pyx_XDECREF(__pyx_t_1);
13218   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
13219   __pyx_r = 0;
13220   __pyx_L0:;
13221   __Pyx_XGIVEREF(__pyx_r);
13222   __Pyx_RefNannyFinishContext();
13223   return __pyx_r;
13224 }
13225 
13226 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
13227  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
13228  *
13229  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
13230  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
13231  *
13232  */
13233 
__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d)13234 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) {
13235   PyObject *__pyx_r = NULL;
13236   __Pyx_RefNannyDeclarations
13237   PyObject *__pyx_t_1 = NULL;
13238   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
13239 
13240   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
13241  *
13242  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
13243  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
13244  *
13245  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
13246  */
13247   __Pyx_XDECREF(__pyx_r);
13248   __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(3, 831, __pyx_L1_error)
13249   __Pyx_GOTREF(__pyx_t_1);
13250   __pyx_r = __pyx_t_1;
13251   __pyx_t_1 = 0;
13252   goto __pyx_L0;
13253 
13254   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
13255  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
13256  *
13257  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
13258  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
13259  *
13260  */
13261 
13262   /* function exit code */
13263   __pyx_L1_error:;
13264   __Pyx_XDECREF(__pyx_t_1);
13265   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
13266   __pyx_r = 0;
13267   __pyx_L0:;
13268   __Pyx_XGIVEREF(__pyx_r);
13269   __Pyx_RefNannyFinishContext();
13270   return __pyx_r;
13271 }
13272 
13273 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
13274  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
13275  *
13276  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
13277  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
13278  *
13279  */
13280 
__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)13281 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) {
13282   PyObject *__pyx_r = NULL;
13283   __Pyx_RefNannyDeclarations
13284   PyObject *__pyx_t_1 = NULL;
13285   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
13286 
13287   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
13288  *
13289  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
13290  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
13291  *
13292  * cdef inline tuple PyDataType_SHAPE(dtype d):
13293  */
13294   __Pyx_XDECREF(__pyx_r);
13295   __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(3, 834, __pyx_L1_error)
13296   __Pyx_GOTREF(__pyx_t_1);
13297   __pyx_r = __pyx_t_1;
13298   __pyx_t_1 = 0;
13299   goto __pyx_L0;
13300 
13301   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
13302  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
13303  *
13304  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
13305  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
13306  *
13307  */
13308 
13309   /* function exit code */
13310   __pyx_L1_error:;
13311   __Pyx_XDECREF(__pyx_t_1);
13312   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
13313   __pyx_r = 0;
13314   __pyx_L0:;
13315   __Pyx_XGIVEREF(__pyx_r);
13316   __Pyx_RefNannyFinishContext();
13317   return __pyx_r;
13318 }
13319 
13320 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
13321  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
13322  *
13323  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
13324  *     if PyDataType_HASSUBARRAY(d):
13325  *         return <tuple>d.subarray.shape
13326  */
13327 
__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr * __pyx_v_d)13328 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
13329   PyObject *__pyx_r = NULL;
13330   __Pyx_RefNannyDeclarations
13331   int __pyx_t_1;
13332   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
13333 
13334   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
13335  *
13336  * cdef inline tuple PyDataType_SHAPE(dtype d):
13337  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
13338  *         return <tuple>d.subarray.shape
13339  *     else:
13340  */
13341   __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
13342   if (__pyx_t_1) {
13343 
13344     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
13345  * cdef inline tuple PyDataType_SHAPE(dtype d):
13346  *     if PyDataType_HASSUBARRAY(d):
13347  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
13348  *     else:
13349  *         return ()
13350  */
13351     __Pyx_XDECREF(__pyx_r);
13352     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
13353     __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
13354     goto __pyx_L0;
13355 
13356     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
13357  *
13358  * cdef inline tuple PyDataType_SHAPE(dtype d):
13359  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
13360  *         return <tuple>d.subarray.shape
13361  *     else:
13362  */
13363   }
13364 
13365   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
13366  *         return <tuple>d.subarray.shape
13367  *     else:
13368  *         return ()             # <<<<<<<<<<<<<<
13369  *
13370  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
13371  */
13372   /*else*/ {
13373     __Pyx_XDECREF(__pyx_r);
13374     __Pyx_INCREF(__pyx_empty_tuple);
13375     __pyx_r = __pyx_empty_tuple;
13376     goto __pyx_L0;
13377   }
13378 
13379   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
13380  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
13381  *
13382  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
13383  *     if PyDataType_HASSUBARRAY(d):
13384  *         return <tuple>d.subarray.shape
13385  */
13386 
13387   /* function exit code */
13388   __pyx_L0:;
13389   __Pyx_XGIVEREF(__pyx_r);
13390   __Pyx_RefNannyFinishContext();
13391   return __pyx_r;
13392 }
13393 
13394 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
13395  *         return ()
13396  *
13397  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
13398  *     # Recursive utility function used in __getbuffer__ to get format
13399  *     # string. The new location in the format string is returned.
13400  */
13401 
__pyx_f_5numpy__util_dtypestring(PyArray_Descr * __pyx_v_descr,char * __pyx_v_f,char * __pyx_v_end,int * __pyx_v_offset)13402 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
13403   PyArray_Descr *__pyx_v_child = 0;
13404   int __pyx_v_endian_detector;
13405   int __pyx_v_little_endian;
13406   PyObject *__pyx_v_fields = 0;
13407   PyObject *__pyx_v_childname = NULL;
13408   PyObject *__pyx_v_new_offset = NULL;
13409   PyObject *__pyx_v_t = NULL;
13410   char *__pyx_r;
13411   __Pyx_RefNannyDeclarations
13412   PyObject *__pyx_t_1 = NULL;
13413   Py_ssize_t __pyx_t_2;
13414   PyObject *__pyx_t_3 = NULL;
13415   PyObject *__pyx_t_4 = NULL;
13416   int __pyx_t_5;
13417   int __pyx_t_6;
13418   int __pyx_t_7;
13419   long __pyx_t_8;
13420   char *__pyx_t_9;
13421   __Pyx_RefNannySetupContext("_util_dtypestring", 0);
13422 
13423   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
13424  *
13425  *     cdef dtype child
13426  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
13427  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
13428  *     cdef tuple fields
13429  */
13430   __pyx_v_endian_detector = 1;
13431 
13432   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
13433  *     cdef dtype child
13434  *     cdef int endian_detector = 1
13435  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
13436  *     cdef tuple fields
13437  *
13438  */
13439   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
13440 
13441   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
13442  *     cdef tuple fields
13443  *
13444  *     for childname in descr.names:             # <<<<<<<<<<<<<<
13445  *         fields = descr.fields[childname]
13446  *         child, new_offset = fields
13447  */
13448   if (unlikely(__pyx_v_descr->names == Py_None)) {
13449     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
13450     __PYX_ERR(3, 851, __pyx_L1_error)
13451   }
13452   __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
13453   for (;;) {
13454     if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
13455     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13456     __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 851, __pyx_L1_error)
13457     #else
13458     __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error)
13459     __Pyx_GOTREF(__pyx_t_3);
13460     #endif
13461     __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
13462     __pyx_t_3 = 0;
13463 
13464     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
13465  *
13466  *     for childname in descr.names:
13467  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
13468  *         child, new_offset = fields
13469  *
13470  */
13471     if (unlikely(__pyx_v_descr->fields == Py_None)) {
13472       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
13473       __PYX_ERR(3, 852, __pyx_L1_error)
13474     }
13475     __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error)
13476     __Pyx_GOTREF(__pyx_t_3);
13477     if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 852, __pyx_L1_error)
13478     __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
13479     __pyx_t_3 = 0;
13480 
13481     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
13482  *     for childname in descr.names:
13483  *         fields = descr.fields[childname]
13484  *         child, new_offset = fields             # <<<<<<<<<<<<<<
13485  *
13486  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
13487  */
13488     if (likely(__pyx_v_fields != Py_None)) {
13489       PyObject* sequence = __pyx_v_fields;
13490       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
13491       if (unlikely(size != 2)) {
13492         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
13493         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
13494         __PYX_ERR(3, 853, __pyx_L1_error)
13495       }
13496       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13497       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
13498       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
13499       __Pyx_INCREF(__pyx_t_3);
13500       __Pyx_INCREF(__pyx_t_4);
13501       #else
13502       __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error)
13503       __Pyx_GOTREF(__pyx_t_3);
13504       __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error)
13505       __Pyx_GOTREF(__pyx_t_4);
13506       #endif
13507     } else {
13508       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 853, __pyx_L1_error)
13509     }
13510     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 853, __pyx_L1_error)
13511     __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
13512     __pyx_t_3 = 0;
13513     __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
13514     __pyx_t_4 = 0;
13515 
13516     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
13517  *         child, new_offset = fields
13518  *
13519  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
13520  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
13521  *
13522  */
13523     __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error)
13524     __Pyx_GOTREF(__pyx_t_4);
13525     __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error)
13526     __Pyx_GOTREF(__pyx_t_3);
13527     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13528     __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error)
13529     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13530     __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
13531     if (unlikely(__pyx_t_6)) {
13532 
13533       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
13534  *
13535  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
13536  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
13537  *
13538  *         if ((child.byteorder == c'>' and little_endian) or
13539  */
13540       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error)
13541       __Pyx_GOTREF(__pyx_t_3);
13542       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
13543       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13544       __PYX_ERR(3, 856, __pyx_L1_error)
13545 
13546       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
13547  *         child, new_offset = fields
13548  *
13549  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
13550  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
13551  *
13552  */
13553     }
13554 
13555     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
13556  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
13557  *
13558  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
13559  *             (child.byteorder == c'<' and not little_endian)):
13560  *             raise ValueError(u"Non-native byte order not supported")
13561  */
13562     __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
13563     if (!__pyx_t_7) {
13564       goto __pyx_L8_next_or;
13565     } else {
13566     }
13567     __pyx_t_7 = (__pyx_v_little_endian != 0);
13568     if (!__pyx_t_7) {
13569     } else {
13570       __pyx_t_6 = __pyx_t_7;
13571       goto __pyx_L7_bool_binop_done;
13572     }
13573     __pyx_L8_next_or:;
13574 
13575     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
13576  *
13577  *         if ((child.byteorder == c'>' and little_endian) or
13578  *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
13579  *             raise ValueError(u"Non-native byte order not supported")
13580  *             # One could encode it in the format string and have Cython
13581  */
13582     __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
13583     if (__pyx_t_7) {
13584     } else {
13585       __pyx_t_6 = __pyx_t_7;
13586       goto __pyx_L7_bool_binop_done;
13587     }
13588     __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
13589     __pyx_t_6 = __pyx_t_7;
13590     __pyx_L7_bool_binop_done:;
13591 
13592     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
13593  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
13594  *
13595  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
13596  *             (child.byteorder == c'<' and not little_endian)):
13597  *             raise ValueError(u"Non-native byte order not supported")
13598  */
13599     if (unlikely(__pyx_t_6)) {
13600 
13601       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
13602  *         if ((child.byteorder == c'>' and little_endian) or
13603  *             (child.byteorder == c'<' and not little_endian)):
13604  *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
13605  *             # One could encode it in the format string and have Cython
13606  *             # complain instead, BUT: < and > in format strings also imply
13607  */
13608       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error)
13609       __Pyx_GOTREF(__pyx_t_3);
13610       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
13611       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13612       __PYX_ERR(3, 860, __pyx_L1_error)
13613 
13614       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
13615  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
13616  *
13617  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
13618  *             (child.byteorder == c'<' and not little_endian)):
13619  *             raise ValueError(u"Non-native byte order not supported")
13620  */
13621     }
13622 
13623     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
13624  *
13625  *         # Output padding bytes
13626  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
13627  *             f[0] = 120 # "x"; pad byte
13628  *             f += 1
13629  */
13630     while (1) {
13631       __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 870, __pyx_L1_error)
13632       __Pyx_GOTREF(__pyx_t_3);
13633       __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error)
13634       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13635       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 870, __pyx_L1_error)
13636       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13637       if (!__pyx_t_6) break;
13638 
13639       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
13640  *         # Output padding bytes
13641  *         while offset[0] < new_offset:
13642  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
13643  *             f += 1
13644  *             offset[0] += 1
13645  */
13646       (__pyx_v_f[0]) = 0x78;
13647 
13648       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
13649  *         while offset[0] < new_offset:
13650  *             f[0] = 120 # "x"; pad byte
13651  *             f += 1             # <<<<<<<<<<<<<<
13652  *             offset[0] += 1
13653  *
13654  */
13655       __pyx_v_f = (__pyx_v_f + 1);
13656 
13657       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
13658  *             f[0] = 120 # "x"; pad byte
13659  *             f += 1
13660  *             offset[0] += 1             # <<<<<<<<<<<<<<
13661  *
13662  *         offset[0] += child.itemsize
13663  */
13664       __pyx_t_8 = 0;
13665       (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
13666     }
13667 
13668     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
13669  *             offset[0] += 1
13670  *
13671  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
13672  *
13673  *         if not PyDataType_HASFIELDS(child):
13674  */
13675     __pyx_t_8 = 0;
13676     (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
13677 
13678     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
13679  *         offset[0] += child.itemsize
13680  *
13681  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
13682  *             t = child.type_num
13683  *             if end - f < 5:
13684  */
13685     __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
13686     if (__pyx_t_6) {
13687 
13688       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
13689  *
13690  *         if not PyDataType_HASFIELDS(child):
13691  *             t = child.type_num             # <<<<<<<<<<<<<<
13692  *             if end - f < 5:
13693  *                 raise RuntimeError(u"Format string allocated too short.")
13694  */
13695       __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error)
13696       __Pyx_GOTREF(__pyx_t_4);
13697       __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
13698       __pyx_t_4 = 0;
13699 
13700       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
13701  *         if not PyDataType_HASFIELDS(child):
13702  *             t = child.type_num
13703  *             if end - f < 5:             # <<<<<<<<<<<<<<
13704  *                 raise RuntimeError(u"Format string allocated too short.")
13705  *
13706  */
13707       __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
13708       if (unlikely(__pyx_t_6)) {
13709 
13710         /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
13711  *             t = child.type_num
13712  *             if end - f < 5:
13713  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
13714  *
13715  *             # Until ticket #99 is fixed, use integers to avoid warnings
13716  */
13717         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error)
13718         __Pyx_GOTREF(__pyx_t_4);
13719         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
13720         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13721         __PYX_ERR(3, 880, __pyx_L1_error)
13722 
13723         /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
13724  *         if not PyDataType_HASFIELDS(child):
13725  *             t = child.type_num
13726  *             if end - f < 5:             # <<<<<<<<<<<<<<
13727  *                 raise RuntimeError(u"Format string allocated too short.")
13728  *
13729  */
13730       }
13731 
13732       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
13733  *
13734  *             # Until ticket #99 is fixed, use integers to avoid warnings
13735  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
13736  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
13737  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
13738  */
13739       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 883, __pyx_L1_error)
13740       __Pyx_GOTREF(__pyx_t_4);
13741       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 883, __pyx_L1_error)
13742       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13743       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 883, __pyx_L1_error)
13744       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13745       if (__pyx_t_6) {
13746         (__pyx_v_f[0]) = 98;
13747         goto __pyx_L15;
13748       }
13749 
13750       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
13751  *             # Until ticket #99 is fixed, use integers to avoid warnings
13752  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
13753  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
13754  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
13755  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
13756  */
13757       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 884, __pyx_L1_error)
13758       __Pyx_GOTREF(__pyx_t_3);
13759       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 884, __pyx_L1_error)
13760       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13761       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 884, __pyx_L1_error)
13762       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13763       if (__pyx_t_6) {
13764         (__pyx_v_f[0]) = 66;
13765         goto __pyx_L15;
13766       }
13767 
13768       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
13769  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
13770  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
13771  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
13772  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
13773  *             elif t == NPY_INT:         f[0] = 105 #"i"
13774  */
13775       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 885, __pyx_L1_error)
13776       __Pyx_GOTREF(__pyx_t_4);
13777       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 885, __pyx_L1_error)
13778       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13779       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 885, __pyx_L1_error)
13780       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13781       if (__pyx_t_6) {
13782         (__pyx_v_f[0]) = 0x68;
13783         goto __pyx_L15;
13784       }
13785 
13786       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
13787  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
13788  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
13789  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
13790  *             elif t == NPY_INT:         f[0] = 105 #"i"
13791  *             elif t == NPY_UINT:        f[0] =  73 #"I"
13792  */
13793       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 886, __pyx_L1_error)
13794       __Pyx_GOTREF(__pyx_t_3);
13795       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 886, __pyx_L1_error)
13796       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13797       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 886, __pyx_L1_error)
13798       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13799       if (__pyx_t_6) {
13800         (__pyx_v_f[0]) = 72;
13801         goto __pyx_L15;
13802       }
13803 
13804       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
13805  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
13806  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
13807  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
13808  *             elif t == NPY_UINT:        f[0] =  73 #"I"
13809  *             elif t == NPY_LONG:        f[0] = 108 #"l"
13810  */
13811       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 887, __pyx_L1_error)
13812       __Pyx_GOTREF(__pyx_t_4);
13813       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 887, __pyx_L1_error)
13814       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13815       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 887, __pyx_L1_error)
13816       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13817       if (__pyx_t_6) {
13818         (__pyx_v_f[0]) = 0x69;
13819         goto __pyx_L15;
13820       }
13821 
13822       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
13823  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
13824  *             elif t == NPY_INT:         f[0] = 105 #"i"
13825  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
13826  *             elif t == NPY_LONG:        f[0] = 108 #"l"
13827  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
13828  */
13829       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 888, __pyx_L1_error)
13830       __Pyx_GOTREF(__pyx_t_3);
13831       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 888, __pyx_L1_error)
13832       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13833       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 888, __pyx_L1_error)
13834       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13835       if (__pyx_t_6) {
13836         (__pyx_v_f[0]) = 73;
13837         goto __pyx_L15;
13838       }
13839 
13840       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
13841  *             elif t == NPY_INT:         f[0] = 105 #"i"
13842  *             elif t == NPY_UINT:        f[0] =  73 #"I"
13843  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
13844  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
13845  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
13846  */
13847       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 889, __pyx_L1_error)
13848       __Pyx_GOTREF(__pyx_t_4);
13849       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 889, __pyx_L1_error)
13850       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13851       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 889, __pyx_L1_error)
13852       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13853       if (__pyx_t_6) {
13854         (__pyx_v_f[0]) = 0x6C;
13855         goto __pyx_L15;
13856       }
13857 
13858       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
13859  *             elif t == NPY_UINT:        f[0] =  73 #"I"
13860  *             elif t == NPY_LONG:        f[0] = 108 #"l"
13861  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
13862  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
13863  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
13864  */
13865       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 890, __pyx_L1_error)
13866       __Pyx_GOTREF(__pyx_t_3);
13867       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error)
13868       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13869       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 890, __pyx_L1_error)
13870       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13871       if (__pyx_t_6) {
13872         (__pyx_v_f[0]) = 76;
13873         goto __pyx_L15;
13874       }
13875 
13876       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
13877  *             elif t == NPY_LONG:        f[0] = 108 #"l"
13878  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
13879  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
13880  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
13881  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
13882  */
13883       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 891, __pyx_L1_error)
13884       __Pyx_GOTREF(__pyx_t_4);
13885       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 891, __pyx_L1_error)
13886       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13887       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 891, __pyx_L1_error)
13888       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13889       if (__pyx_t_6) {
13890         (__pyx_v_f[0]) = 0x71;
13891         goto __pyx_L15;
13892       }
13893 
13894       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
13895  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
13896  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
13897  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
13898  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
13899  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
13900  */
13901       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error)
13902       __Pyx_GOTREF(__pyx_t_3);
13903       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error)
13904       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13905       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 892, __pyx_L1_error)
13906       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13907       if (__pyx_t_6) {
13908         (__pyx_v_f[0]) = 81;
13909         goto __pyx_L15;
13910       }
13911 
13912       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
13913  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
13914  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
13915  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
13916  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
13917  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
13918  */
13919       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error)
13920       __Pyx_GOTREF(__pyx_t_4);
13921       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 893, __pyx_L1_error)
13922       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13923       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 893, __pyx_L1_error)
13924       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13925       if (__pyx_t_6) {
13926         (__pyx_v_f[0]) = 0x66;
13927         goto __pyx_L15;
13928       }
13929 
13930       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
13931  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
13932  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
13933  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
13934  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
13935  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
13936  */
13937       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 894, __pyx_L1_error)
13938       __Pyx_GOTREF(__pyx_t_3);
13939       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 894, __pyx_L1_error)
13940       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13941       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 894, __pyx_L1_error)
13942       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13943       if (__pyx_t_6) {
13944         (__pyx_v_f[0]) = 0x64;
13945         goto __pyx_L15;
13946       }
13947 
13948       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
13949  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
13950  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
13951  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
13952  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
13953  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
13954  */
13955       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 895, __pyx_L1_error)
13956       __Pyx_GOTREF(__pyx_t_4);
13957       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error)
13958       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13959       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 895, __pyx_L1_error)
13960       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13961       if (__pyx_t_6) {
13962         (__pyx_v_f[0]) = 0x67;
13963         goto __pyx_L15;
13964       }
13965 
13966       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
13967  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
13968  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
13969  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
13970  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
13971  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
13972  */
13973       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 896, __pyx_L1_error)
13974       __Pyx_GOTREF(__pyx_t_3);
13975       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 896, __pyx_L1_error)
13976       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13977       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 896, __pyx_L1_error)
13978       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13979       if (__pyx_t_6) {
13980         (__pyx_v_f[0]) = 90;
13981         (__pyx_v_f[1]) = 0x66;
13982         __pyx_v_f = (__pyx_v_f + 1);
13983         goto __pyx_L15;
13984       }
13985 
13986       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
13987  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
13988  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
13989  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
13990  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
13991  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
13992  */
13993       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error)
13994       __Pyx_GOTREF(__pyx_t_4);
13995       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error)
13996       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13997       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 897, __pyx_L1_error)
13998       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13999       if (__pyx_t_6) {
14000         (__pyx_v_f[0]) = 90;
14001         (__pyx_v_f[1]) = 0x64;
14002         __pyx_v_f = (__pyx_v_f + 1);
14003         goto __pyx_L15;
14004       }
14005 
14006       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
14007  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
14008  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
14009  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
14010  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
14011  *             else:
14012  */
14013       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error)
14014       __Pyx_GOTREF(__pyx_t_3);
14015       __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error)
14016       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14017       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 898, __pyx_L1_error)
14018       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14019       if (__pyx_t_6) {
14020         (__pyx_v_f[0]) = 90;
14021         (__pyx_v_f[1]) = 0x67;
14022         __pyx_v_f = (__pyx_v_f + 1);
14023         goto __pyx_L15;
14024       }
14025 
14026       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
14027  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
14028  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
14029  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
14030  *             else:
14031  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
14032  */
14033       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L1_error)
14034       __Pyx_GOTREF(__pyx_t_4);
14035       __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 899, __pyx_L1_error)
14036       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14037       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 899, __pyx_L1_error)
14038       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14039       if (likely(__pyx_t_6)) {
14040         (__pyx_v_f[0]) = 79;
14041         goto __pyx_L15;
14042       }
14043 
14044       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
14045  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
14046  *             else:
14047  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
14048  *             f += 1
14049  *         else:
14050  */
14051       /*else*/ {
14052         __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error)
14053         __Pyx_GOTREF(__pyx_t_3);
14054         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 901, __pyx_L1_error)
14055         __Pyx_GOTREF(__pyx_t_4);
14056         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14057         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
14058         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14059         __PYX_ERR(3, 901, __pyx_L1_error)
14060       }
14061       __pyx_L15:;
14062 
14063       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
14064  *             else:
14065  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
14066  *             f += 1             # <<<<<<<<<<<<<<
14067  *         else:
14068  *             # Cython ignores struct boundary information ("T{...}"),
14069  */
14070       __pyx_v_f = (__pyx_v_f + 1);
14071 
14072       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
14073  *         offset[0] += child.itemsize
14074  *
14075  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
14076  *             t = child.type_num
14077  *             if end - f < 5:
14078  */
14079       goto __pyx_L13;
14080     }
14081 
14082     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
14083  *             # Cython ignores struct boundary information ("T{...}"),
14084  *             # so don't output it
14085  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
14086  *     return f
14087  *
14088  */
14089     /*else*/ {
14090       __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 906, __pyx_L1_error)
14091       __pyx_v_f = __pyx_t_9;
14092     }
14093     __pyx_L13:;
14094 
14095     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
14096  *     cdef tuple fields
14097  *
14098  *     for childname in descr.names:             # <<<<<<<<<<<<<<
14099  *         fields = descr.fields[childname]
14100  *         child, new_offset = fields
14101  */
14102   }
14103   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14104 
14105   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
14106  *             # so don't output it
14107  *             f = _util_dtypestring(child, f, end, offset)
14108  *     return f             # <<<<<<<<<<<<<<
14109  *
14110  *
14111  */
14112   __pyx_r = __pyx_v_f;
14113   goto __pyx_L0;
14114 
14115   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
14116  *         return ()
14117  *
14118  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
14119  *     # Recursive utility function used in __getbuffer__ to get format
14120  *     # string. The new location in the format string is returned.
14121  */
14122 
14123   /* function exit code */
14124   __pyx_L1_error:;
14125   __Pyx_XDECREF(__pyx_t_1);
14126   __Pyx_XDECREF(__pyx_t_3);
14127   __Pyx_XDECREF(__pyx_t_4);
14128   __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
14129   __pyx_r = NULL;
14130   __pyx_L0:;
14131   __Pyx_XDECREF((PyObject *)__pyx_v_child);
14132   __Pyx_XDECREF(__pyx_v_fields);
14133   __Pyx_XDECREF(__pyx_v_childname);
14134   __Pyx_XDECREF(__pyx_v_new_offset);
14135   __Pyx_XDECREF(__pyx_v_t);
14136   __Pyx_RefNannyFinishContext();
14137   return __pyx_r;
14138 }
14139 
14140 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
14141  *     int _import_umath() except -1
14142  *
14143  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
14144  *     Py_INCREF(base) # important to do this before stealing the reference below!
14145  *     PyArray_SetBaseObject(arr, base)
14146  */
14147 
__pyx_f_5numpy_set_array_base(PyArrayObject * __pyx_v_arr,PyObject * __pyx_v_base)14148 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
14149   __Pyx_RefNannyDeclarations
14150   __Pyx_RefNannySetupContext("set_array_base", 0);
14151 
14152   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
14153  *
14154  * cdef inline void set_array_base(ndarray arr, object base):
14155  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
14156  *     PyArray_SetBaseObject(arr, base)
14157  *
14158  */
14159   Py_INCREF(__pyx_v_base);
14160 
14161   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
14162  * cdef inline void set_array_base(ndarray arr, object base):
14163  *     Py_INCREF(base) # important to do this before stealing the reference below!
14164  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
14165  *
14166  * cdef inline object get_array_base(ndarray arr):
14167  */
14168   (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
14169 
14170   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
14171  *     int _import_umath() except -1
14172  *
14173  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
14174  *     Py_INCREF(base) # important to do this before stealing the reference below!
14175  *     PyArray_SetBaseObject(arr, base)
14176  */
14177 
14178   /* function exit code */
14179   __Pyx_RefNannyFinishContext();
14180 }
14181 
14182 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
14183  *     PyArray_SetBaseObject(arr, base)
14184  *
14185  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
14186  *     base = PyArray_BASE(arr)
14187  *     if base is NULL:
14188  */
14189 
__pyx_f_5numpy_get_array_base(PyArrayObject * __pyx_v_arr)14190 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
14191   PyObject *__pyx_v_base;
14192   PyObject *__pyx_r = NULL;
14193   __Pyx_RefNannyDeclarations
14194   int __pyx_t_1;
14195   __Pyx_RefNannySetupContext("get_array_base", 0);
14196 
14197   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
14198  *
14199  * cdef inline object get_array_base(ndarray arr):
14200  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
14201  *     if base is NULL:
14202  *         return None
14203  */
14204   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
14205 
14206   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
14207  * cdef inline object get_array_base(ndarray arr):
14208  *     base = PyArray_BASE(arr)
14209  *     if base is NULL:             # <<<<<<<<<<<<<<
14210  *         return None
14211  *     return <object>base
14212  */
14213   __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
14214   if (__pyx_t_1) {
14215 
14216     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
14217  *     base = PyArray_BASE(arr)
14218  *     if base is NULL:
14219  *         return None             # <<<<<<<<<<<<<<
14220  *     return <object>base
14221  *
14222  */
14223     __Pyx_XDECREF(__pyx_r);
14224     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14225     goto __pyx_L0;
14226 
14227     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
14228  * cdef inline object get_array_base(ndarray arr):
14229  *     base = PyArray_BASE(arr)
14230  *     if base is NULL:             # <<<<<<<<<<<<<<
14231  *         return None
14232  *     return <object>base
14233  */
14234   }
14235 
14236   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
14237  *     if base is NULL:
14238  *         return None
14239  *     return <object>base             # <<<<<<<<<<<<<<
14240  *
14241  * # Versions of the import_* functions which are more suitable for
14242  */
14243   __Pyx_XDECREF(__pyx_r);
14244   __Pyx_INCREF(((PyObject *)__pyx_v_base));
14245   __pyx_r = ((PyObject *)__pyx_v_base);
14246   goto __pyx_L0;
14247 
14248   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
14249  *     PyArray_SetBaseObject(arr, base)
14250  *
14251  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
14252  *     base = PyArray_BASE(arr)
14253  *     if base is NULL:
14254  */
14255 
14256   /* function exit code */
14257   __pyx_L0:;
14258   __Pyx_XGIVEREF(__pyx_r);
14259   __Pyx_RefNannyFinishContext();
14260   return __pyx_r;
14261 }
14262 
14263 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
14264  * # Versions of the import_* functions which are more suitable for
14265  * # Cython code.
14266  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
14267  *     try:
14268  *         _import_array()
14269  */
14270 
__pyx_f_5numpy_import_array(void)14271 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
14272   int __pyx_r;
14273   __Pyx_RefNannyDeclarations
14274   PyObject *__pyx_t_1 = NULL;
14275   PyObject *__pyx_t_2 = NULL;
14276   PyObject *__pyx_t_3 = NULL;
14277   int __pyx_t_4;
14278   PyObject *__pyx_t_5 = NULL;
14279   PyObject *__pyx_t_6 = NULL;
14280   PyObject *__pyx_t_7 = NULL;
14281   PyObject *__pyx_t_8 = NULL;
14282   __Pyx_RefNannySetupContext("import_array", 0);
14283 
14284   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
14285  * # Cython code.
14286  * cdef inline int import_array() except -1:
14287  *     try:             # <<<<<<<<<<<<<<
14288  *         _import_array()
14289  *     except Exception:
14290  */
14291   {
14292     __Pyx_PyThreadState_declare
14293     __Pyx_PyThreadState_assign
14294     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14295     __Pyx_XGOTREF(__pyx_t_1);
14296     __Pyx_XGOTREF(__pyx_t_2);
14297     __Pyx_XGOTREF(__pyx_t_3);
14298     /*try:*/ {
14299 
14300       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
14301  * cdef inline int import_array() except -1:
14302  *     try:
14303  *         _import_array()             # <<<<<<<<<<<<<<
14304  *     except Exception:
14305  *         raise ImportError("numpy.core.multiarray failed to import")
14306  */
14307       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1036, __pyx_L3_error)
14308 
14309       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
14310  * # Cython code.
14311  * cdef inline int import_array() except -1:
14312  *     try:             # <<<<<<<<<<<<<<
14313  *         _import_array()
14314  *     except Exception:
14315  */
14316     }
14317     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14318     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14319     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14320     goto __pyx_L8_try_end;
14321     __pyx_L3_error:;
14322 
14323     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
14324  *     try:
14325  *         _import_array()
14326  *     except Exception:             # <<<<<<<<<<<<<<
14327  *         raise ImportError("numpy.core.multiarray failed to import")
14328  *
14329  */
14330     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
14331     if (__pyx_t_4) {
14332       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
14333       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1037, __pyx_L5_except_error)
14334       __Pyx_GOTREF(__pyx_t_5);
14335       __Pyx_GOTREF(__pyx_t_6);
14336       __Pyx_GOTREF(__pyx_t_7);
14337 
14338       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
14339  *         _import_array()
14340  *     except Exception:
14341  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
14342  *
14343  * cdef inline int import_umath() except -1:
14344  */
14345       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1038, __pyx_L5_except_error)
14346       __Pyx_GOTREF(__pyx_t_8);
14347       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
14348       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14349       __PYX_ERR(3, 1038, __pyx_L5_except_error)
14350     }
14351     goto __pyx_L5_except_error;
14352     __pyx_L5_except_error:;
14353 
14354     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
14355  * # Cython code.
14356  * cdef inline int import_array() except -1:
14357  *     try:             # <<<<<<<<<<<<<<
14358  *         _import_array()
14359  *     except Exception:
14360  */
14361     __Pyx_XGIVEREF(__pyx_t_1);
14362     __Pyx_XGIVEREF(__pyx_t_2);
14363     __Pyx_XGIVEREF(__pyx_t_3);
14364     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14365     goto __pyx_L1_error;
14366     __pyx_L8_try_end:;
14367   }
14368 
14369   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
14370  * # Versions of the import_* functions which are more suitable for
14371  * # Cython code.
14372  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
14373  *     try:
14374  *         _import_array()
14375  */
14376 
14377   /* function exit code */
14378   __pyx_r = 0;
14379   goto __pyx_L0;
14380   __pyx_L1_error:;
14381   __Pyx_XDECREF(__pyx_t_5);
14382   __Pyx_XDECREF(__pyx_t_6);
14383   __Pyx_XDECREF(__pyx_t_7);
14384   __Pyx_XDECREF(__pyx_t_8);
14385   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
14386   __pyx_r = -1;
14387   __pyx_L0:;
14388   __Pyx_RefNannyFinishContext();
14389   return __pyx_r;
14390 }
14391 
14392 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
14393  *         raise ImportError("numpy.core.multiarray failed to import")
14394  *
14395  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
14396  *     try:
14397  *         _import_umath()
14398  */
14399 
__pyx_f_5numpy_import_umath(void)14400 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
14401   int __pyx_r;
14402   __Pyx_RefNannyDeclarations
14403   PyObject *__pyx_t_1 = NULL;
14404   PyObject *__pyx_t_2 = NULL;
14405   PyObject *__pyx_t_3 = NULL;
14406   int __pyx_t_4;
14407   PyObject *__pyx_t_5 = NULL;
14408   PyObject *__pyx_t_6 = NULL;
14409   PyObject *__pyx_t_7 = NULL;
14410   PyObject *__pyx_t_8 = NULL;
14411   __Pyx_RefNannySetupContext("import_umath", 0);
14412 
14413   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
14414  *
14415  * cdef inline int import_umath() except -1:
14416  *     try:             # <<<<<<<<<<<<<<
14417  *         _import_umath()
14418  *     except Exception:
14419  */
14420   {
14421     __Pyx_PyThreadState_declare
14422     __Pyx_PyThreadState_assign
14423     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14424     __Pyx_XGOTREF(__pyx_t_1);
14425     __Pyx_XGOTREF(__pyx_t_2);
14426     __Pyx_XGOTREF(__pyx_t_3);
14427     /*try:*/ {
14428 
14429       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
14430  * cdef inline int import_umath() except -1:
14431  *     try:
14432  *         _import_umath()             # <<<<<<<<<<<<<<
14433  *     except Exception:
14434  *         raise ImportError("numpy.core.umath failed to import")
14435  */
14436       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1042, __pyx_L3_error)
14437 
14438       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
14439  *
14440  * cdef inline int import_umath() except -1:
14441  *     try:             # <<<<<<<<<<<<<<
14442  *         _import_umath()
14443  *     except Exception:
14444  */
14445     }
14446     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14447     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14448     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14449     goto __pyx_L8_try_end;
14450     __pyx_L3_error:;
14451 
14452     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
14453  *     try:
14454  *         _import_umath()
14455  *     except Exception:             # <<<<<<<<<<<<<<
14456  *         raise ImportError("numpy.core.umath failed to import")
14457  *
14458  */
14459     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
14460     if (__pyx_t_4) {
14461       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
14462       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1043, __pyx_L5_except_error)
14463       __Pyx_GOTREF(__pyx_t_5);
14464       __Pyx_GOTREF(__pyx_t_6);
14465       __Pyx_GOTREF(__pyx_t_7);
14466 
14467       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
14468  *         _import_umath()
14469  *     except Exception:
14470  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
14471  *
14472  * cdef inline int import_ufunc() except -1:
14473  */
14474       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1044, __pyx_L5_except_error)
14475       __Pyx_GOTREF(__pyx_t_8);
14476       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
14477       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14478       __PYX_ERR(3, 1044, __pyx_L5_except_error)
14479     }
14480     goto __pyx_L5_except_error;
14481     __pyx_L5_except_error:;
14482 
14483     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
14484  *
14485  * cdef inline int import_umath() except -1:
14486  *     try:             # <<<<<<<<<<<<<<
14487  *         _import_umath()
14488  *     except Exception:
14489  */
14490     __Pyx_XGIVEREF(__pyx_t_1);
14491     __Pyx_XGIVEREF(__pyx_t_2);
14492     __Pyx_XGIVEREF(__pyx_t_3);
14493     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14494     goto __pyx_L1_error;
14495     __pyx_L8_try_end:;
14496   }
14497 
14498   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
14499  *         raise ImportError("numpy.core.multiarray failed to import")
14500  *
14501  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
14502  *     try:
14503  *         _import_umath()
14504  */
14505 
14506   /* function exit code */
14507   __pyx_r = 0;
14508   goto __pyx_L0;
14509   __pyx_L1_error:;
14510   __Pyx_XDECREF(__pyx_t_5);
14511   __Pyx_XDECREF(__pyx_t_6);
14512   __Pyx_XDECREF(__pyx_t_7);
14513   __Pyx_XDECREF(__pyx_t_8);
14514   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
14515   __pyx_r = -1;
14516   __pyx_L0:;
14517   __Pyx_RefNannyFinishContext();
14518   return __pyx_r;
14519 }
14520 
14521 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
14522  *         raise ImportError("numpy.core.umath failed to import")
14523  *
14524  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
14525  *     try:
14526  *         _import_umath()
14527  */
14528 
__pyx_f_5numpy_import_ufunc(void)14529 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
14530   int __pyx_r;
14531   __Pyx_RefNannyDeclarations
14532   PyObject *__pyx_t_1 = NULL;
14533   PyObject *__pyx_t_2 = NULL;
14534   PyObject *__pyx_t_3 = NULL;
14535   int __pyx_t_4;
14536   PyObject *__pyx_t_5 = NULL;
14537   PyObject *__pyx_t_6 = NULL;
14538   PyObject *__pyx_t_7 = NULL;
14539   PyObject *__pyx_t_8 = NULL;
14540   __Pyx_RefNannySetupContext("import_ufunc", 0);
14541 
14542   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
14543  *
14544  * cdef inline int import_ufunc() except -1:
14545  *     try:             # <<<<<<<<<<<<<<
14546  *         _import_umath()
14547  *     except Exception:
14548  */
14549   {
14550     __Pyx_PyThreadState_declare
14551     __Pyx_PyThreadState_assign
14552     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14553     __Pyx_XGOTREF(__pyx_t_1);
14554     __Pyx_XGOTREF(__pyx_t_2);
14555     __Pyx_XGOTREF(__pyx_t_3);
14556     /*try:*/ {
14557 
14558       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
14559  * cdef inline int import_ufunc() except -1:
14560  *     try:
14561  *         _import_umath()             # <<<<<<<<<<<<<<
14562  *     except Exception:
14563  *         raise ImportError("numpy.core.umath failed to import")
14564  */
14565       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1048, __pyx_L3_error)
14566 
14567       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
14568  *
14569  * cdef inline int import_ufunc() except -1:
14570  *     try:             # <<<<<<<<<<<<<<
14571  *         _import_umath()
14572  *     except Exception:
14573  */
14574     }
14575     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14576     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14577     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14578     goto __pyx_L8_try_end;
14579     __pyx_L3_error:;
14580 
14581     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
14582  *     try:
14583  *         _import_umath()
14584  *     except Exception:             # <<<<<<<<<<<<<<
14585  *         raise ImportError("numpy.core.umath failed to import")
14586  */
14587     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
14588     if (__pyx_t_4) {
14589       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
14590       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1049, __pyx_L5_except_error)
14591       __Pyx_GOTREF(__pyx_t_5);
14592       __Pyx_GOTREF(__pyx_t_6);
14593       __Pyx_GOTREF(__pyx_t_7);
14594 
14595       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
14596  *         _import_umath()
14597  *     except Exception:
14598  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
14599  */
14600       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1050, __pyx_L5_except_error)
14601       __Pyx_GOTREF(__pyx_t_8);
14602       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
14603       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14604       __PYX_ERR(3, 1050, __pyx_L5_except_error)
14605     }
14606     goto __pyx_L5_except_error;
14607     __pyx_L5_except_error:;
14608 
14609     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
14610  *
14611  * cdef inline int import_ufunc() except -1:
14612  *     try:             # <<<<<<<<<<<<<<
14613  *         _import_umath()
14614  *     except Exception:
14615  */
14616     __Pyx_XGIVEREF(__pyx_t_1);
14617     __Pyx_XGIVEREF(__pyx_t_2);
14618     __Pyx_XGIVEREF(__pyx_t_3);
14619     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14620     goto __pyx_L1_error;
14621     __pyx_L8_try_end:;
14622   }
14623 
14624   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
14625  *         raise ImportError("numpy.core.umath failed to import")
14626  *
14627  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
14628  *     try:
14629  *         _import_umath()
14630  */
14631 
14632   /* function exit code */
14633   __pyx_r = 0;
14634   goto __pyx_L0;
14635   __pyx_L1_error:;
14636   __Pyx_XDECREF(__pyx_t_5);
14637   __Pyx_XDECREF(__pyx_t_6);
14638   __Pyx_XDECREF(__pyx_t_7);
14639   __Pyx_XDECREF(__pyx_t_8);
14640   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
14641   __pyx_r = -1;
14642   __pyx_L0:;
14643   __Pyx_RefNannyFinishContext();
14644   return __pyx_r;
14645 }
14646 
14647 /* "yt/utilities/lib/fp_utils.pxd":13
14648  *
14649  *
14650  * cdef inline np.int64_t imax(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
14651  *     if i0 > i1: return i0
14652  *     return i1
14653  */
14654 
__pyx_f_2yt_9utilities_3lib_8fp_utils_imax(__pyx_t_5numpy_int64_t __pyx_v_i0,__pyx_t_5numpy_int64_t __pyx_v_i1)14655 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_imax(__pyx_t_5numpy_int64_t __pyx_v_i0, __pyx_t_5numpy_int64_t __pyx_v_i1) {
14656   __pyx_t_5numpy_int64_t __pyx_r;
14657   int __pyx_t_1;
14658 
14659   /* "yt/utilities/lib/fp_utils.pxd":14
14660  *
14661  * cdef inline np.int64_t imax(np.int64_t i0, np.int64_t i1) nogil:
14662  *     if i0 > i1: return i0             # <<<<<<<<<<<<<<
14663  *     return i1
14664  *
14665  */
14666   __pyx_t_1 = ((__pyx_v_i0 > __pyx_v_i1) != 0);
14667   if (__pyx_t_1) {
14668     __pyx_r = __pyx_v_i0;
14669     goto __pyx_L0;
14670   }
14671 
14672   /* "yt/utilities/lib/fp_utils.pxd":15
14673  * cdef inline np.int64_t imax(np.int64_t i0, np.int64_t i1) nogil:
14674  *     if i0 > i1: return i0
14675  *     return i1             # <<<<<<<<<<<<<<
14676  *
14677  * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1) nogil:
14678  */
14679   __pyx_r = __pyx_v_i1;
14680   goto __pyx_L0;
14681 
14682   /* "yt/utilities/lib/fp_utils.pxd":13
14683  *
14684  *
14685  * cdef inline np.int64_t imax(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
14686  *     if i0 > i1: return i0
14687  *     return i1
14688  */
14689 
14690   /* function exit code */
14691   __pyx_L0:;
14692   return __pyx_r;
14693 }
14694 
14695 /* "yt/utilities/lib/fp_utils.pxd":17
14696  *     return i1
14697  *
14698  * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1) nogil:             # <<<<<<<<<<<<<<
14699  *     if f0 > f1: return f0
14700  *     return f1
14701  */
14702 
__pyx_f_2yt_9utilities_3lib_8fp_utils_fmax(__pyx_t_5numpy_float64_t __pyx_v_f0,__pyx_t_5numpy_float64_t __pyx_v_f1)14703 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fmax(__pyx_t_5numpy_float64_t __pyx_v_f0, __pyx_t_5numpy_float64_t __pyx_v_f1) {
14704   __pyx_t_5numpy_float64_t __pyx_r;
14705   int __pyx_t_1;
14706 
14707   /* "yt/utilities/lib/fp_utils.pxd":18
14708  *
14709  * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1) nogil:
14710  *     if f0 > f1: return f0             # <<<<<<<<<<<<<<
14711  *     return f1
14712  *
14713  */
14714   __pyx_t_1 = ((__pyx_v_f0 > __pyx_v_f1) != 0);
14715   if (__pyx_t_1) {
14716     __pyx_r = __pyx_v_f0;
14717     goto __pyx_L0;
14718   }
14719 
14720   /* "yt/utilities/lib/fp_utils.pxd":19
14721  * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1) nogil:
14722  *     if f0 > f1: return f0
14723  *     return f1             # <<<<<<<<<<<<<<
14724  *
14725  * cdef inline np.int64_t imin(np.int64_t i0, np.int64_t i1) nogil:
14726  */
14727   __pyx_r = __pyx_v_f1;
14728   goto __pyx_L0;
14729 
14730   /* "yt/utilities/lib/fp_utils.pxd":17
14731  *     return i1
14732  *
14733  * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1) nogil:             # <<<<<<<<<<<<<<
14734  *     if f0 > f1: return f0
14735  *     return f1
14736  */
14737 
14738   /* function exit code */
14739   __pyx_L0:;
14740   return __pyx_r;
14741 }
14742 
14743 /* "yt/utilities/lib/fp_utils.pxd":21
14744  *     return f1
14745  *
14746  * cdef inline np.int64_t imin(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
14747  *     if i0 < i1: return i0
14748  *     return i1
14749  */
14750 
__pyx_f_2yt_9utilities_3lib_8fp_utils_imin(__pyx_t_5numpy_int64_t __pyx_v_i0,__pyx_t_5numpy_int64_t __pyx_v_i1)14751 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_imin(__pyx_t_5numpy_int64_t __pyx_v_i0, __pyx_t_5numpy_int64_t __pyx_v_i1) {
14752   __pyx_t_5numpy_int64_t __pyx_r;
14753   int __pyx_t_1;
14754 
14755   /* "yt/utilities/lib/fp_utils.pxd":22
14756  *
14757  * cdef inline np.int64_t imin(np.int64_t i0, np.int64_t i1) nogil:
14758  *     if i0 < i1: return i0             # <<<<<<<<<<<<<<
14759  *     return i1
14760  *
14761  */
14762   __pyx_t_1 = ((__pyx_v_i0 < __pyx_v_i1) != 0);
14763   if (__pyx_t_1) {
14764     __pyx_r = __pyx_v_i0;
14765     goto __pyx_L0;
14766   }
14767 
14768   /* "yt/utilities/lib/fp_utils.pxd":23
14769  * cdef inline np.int64_t imin(np.int64_t i0, np.int64_t i1) nogil:
14770  *     if i0 < i1: return i0
14771  *     return i1             # <<<<<<<<<<<<<<
14772  *
14773  * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1) nogil:
14774  */
14775   __pyx_r = __pyx_v_i1;
14776   goto __pyx_L0;
14777 
14778   /* "yt/utilities/lib/fp_utils.pxd":21
14779  *     return f1
14780  *
14781  * cdef inline np.int64_t imin(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
14782  *     if i0 < i1: return i0
14783  *     return i1
14784  */
14785 
14786   /* function exit code */
14787   __pyx_L0:;
14788   return __pyx_r;
14789 }
14790 
14791 /* "yt/utilities/lib/fp_utils.pxd":25
14792  *     return i1
14793  *
14794  * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1) nogil:             # <<<<<<<<<<<<<<
14795  *     if f0 < f1: return f0
14796  *     return f1
14797  */
14798 
__pyx_f_2yt_9utilities_3lib_8fp_utils_fmin(__pyx_t_5numpy_float64_t __pyx_v_f0,__pyx_t_5numpy_float64_t __pyx_v_f1)14799 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fmin(__pyx_t_5numpy_float64_t __pyx_v_f0, __pyx_t_5numpy_float64_t __pyx_v_f1) {
14800   __pyx_t_5numpy_float64_t __pyx_r;
14801   int __pyx_t_1;
14802 
14803   /* "yt/utilities/lib/fp_utils.pxd":26
14804  *
14805  * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1) nogil:
14806  *     if f0 < f1: return f0             # <<<<<<<<<<<<<<
14807  *     return f1
14808  *
14809  */
14810   __pyx_t_1 = ((__pyx_v_f0 < __pyx_v_f1) != 0);
14811   if (__pyx_t_1) {
14812     __pyx_r = __pyx_v_f0;
14813     goto __pyx_L0;
14814   }
14815 
14816   /* "yt/utilities/lib/fp_utils.pxd":27
14817  * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1) nogil:
14818  *     if f0 < f1: return f0
14819  *     return f1             # <<<<<<<<<<<<<<
14820  *
14821  * cdef inline np.float64_t fabs(np.float64_t f0) nogil:
14822  */
14823   __pyx_r = __pyx_v_f1;
14824   goto __pyx_L0;
14825 
14826   /* "yt/utilities/lib/fp_utils.pxd":25
14827  *     return i1
14828  *
14829  * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1) nogil:             # <<<<<<<<<<<<<<
14830  *     if f0 < f1: return f0
14831  *     return f1
14832  */
14833 
14834   /* function exit code */
14835   __pyx_L0:;
14836   return __pyx_r;
14837 }
14838 
14839 /* "yt/utilities/lib/fp_utils.pxd":29
14840  *     return f1
14841  *
14842  * cdef inline np.float64_t fabs(np.float64_t f0) nogil:             # <<<<<<<<<<<<<<
14843  *     if f0 < 0.0: return -f0
14844  *     return f0
14845  */
14846 
__pyx_f_2yt_9utilities_3lib_8fp_utils_fabs(__pyx_t_5numpy_float64_t __pyx_v_f0)14847 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fabs(__pyx_t_5numpy_float64_t __pyx_v_f0) {
14848   __pyx_t_5numpy_float64_t __pyx_r;
14849   int __pyx_t_1;
14850 
14851   /* "yt/utilities/lib/fp_utils.pxd":30
14852  *
14853  * cdef inline np.float64_t fabs(np.float64_t f0) nogil:
14854  *     if f0 < 0.0: return -f0             # <<<<<<<<<<<<<<
14855  *     return f0
14856  *
14857  */
14858   __pyx_t_1 = ((__pyx_v_f0 < 0.0) != 0);
14859   if (__pyx_t_1) {
14860     __pyx_r = (-__pyx_v_f0);
14861     goto __pyx_L0;
14862   }
14863 
14864   /* "yt/utilities/lib/fp_utils.pxd":31
14865  * cdef inline np.float64_t fabs(np.float64_t f0) nogil:
14866  *     if f0 < 0.0: return -f0
14867  *     return f0             # <<<<<<<<<<<<<<
14868  *
14869  * cdef inline np.int64_t iclip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:
14870  */
14871   __pyx_r = __pyx_v_f0;
14872   goto __pyx_L0;
14873 
14874   /* "yt/utilities/lib/fp_utils.pxd":29
14875  *     return f1
14876  *
14877  * cdef inline np.float64_t fabs(np.float64_t f0) nogil:             # <<<<<<<<<<<<<<
14878  *     if f0 < 0.0: return -f0
14879  *     return f0
14880  */
14881 
14882   /* function exit code */
14883   __pyx_L0:;
14884   return __pyx_r;
14885 }
14886 
14887 /* "yt/utilities/lib/fp_utils.pxd":33
14888  *     return f0
14889  *
14890  * cdef inline np.int64_t iclip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:             # <<<<<<<<<<<<<<
14891  *     if i < a: return a
14892  *     if i > b: return b
14893  */
14894 
__pyx_f_2yt_9utilities_3lib_8fp_utils_iclip(__pyx_t_5numpy_int64_t __pyx_v_i,__pyx_t_5numpy_int64_t __pyx_v_a,__pyx_t_5numpy_int64_t __pyx_v_b)14895 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_iclip(__pyx_t_5numpy_int64_t __pyx_v_i, __pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) {
14896   __pyx_t_5numpy_int64_t __pyx_r;
14897   int __pyx_t_1;
14898 
14899   /* "yt/utilities/lib/fp_utils.pxd":34
14900  *
14901  * cdef inline np.int64_t iclip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:
14902  *     if i < a: return a             # <<<<<<<<<<<<<<
14903  *     if i > b: return b
14904  *     return i
14905  */
14906   __pyx_t_1 = ((__pyx_v_i < __pyx_v_a) != 0);
14907   if (__pyx_t_1) {
14908     __pyx_r = __pyx_v_a;
14909     goto __pyx_L0;
14910   }
14911 
14912   /* "yt/utilities/lib/fp_utils.pxd":35
14913  * cdef inline np.int64_t iclip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:
14914  *     if i < a: return a
14915  *     if i > b: return b             # <<<<<<<<<<<<<<
14916  *     return i
14917  *
14918  */
14919   __pyx_t_1 = ((__pyx_v_i > __pyx_v_b) != 0);
14920   if (__pyx_t_1) {
14921     __pyx_r = __pyx_v_b;
14922     goto __pyx_L0;
14923   }
14924 
14925   /* "yt/utilities/lib/fp_utils.pxd":36
14926  *     if i < a: return a
14927  *     if i > b: return b
14928  *     return i             # <<<<<<<<<<<<<<
14929  *
14930  * cdef inline np.int64_t i64clip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:
14931  */
14932   __pyx_r = __pyx_v_i;
14933   goto __pyx_L0;
14934 
14935   /* "yt/utilities/lib/fp_utils.pxd":33
14936  *     return f0
14937  *
14938  * cdef inline np.int64_t iclip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:             # <<<<<<<<<<<<<<
14939  *     if i < a: return a
14940  *     if i > b: return b
14941  */
14942 
14943   /* function exit code */
14944   __pyx_L0:;
14945   return __pyx_r;
14946 }
14947 
14948 /* "yt/utilities/lib/fp_utils.pxd":38
14949  *     return i
14950  *
14951  * cdef inline np.int64_t i64clip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:             # <<<<<<<<<<<<<<
14952  *     if i < a: return a
14953  *     if i > b: return b
14954  */
14955 
__pyx_f_2yt_9utilities_3lib_8fp_utils_i64clip(__pyx_t_5numpy_int64_t __pyx_v_i,__pyx_t_5numpy_int64_t __pyx_v_a,__pyx_t_5numpy_int64_t __pyx_v_b)14956 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_i64clip(__pyx_t_5numpy_int64_t __pyx_v_i, __pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) {
14957   __pyx_t_5numpy_int64_t __pyx_r;
14958   int __pyx_t_1;
14959 
14960   /* "yt/utilities/lib/fp_utils.pxd":39
14961  *
14962  * cdef inline np.int64_t i64clip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:
14963  *     if i < a: return a             # <<<<<<<<<<<<<<
14964  *     if i > b: return b
14965  *     return i
14966  */
14967   __pyx_t_1 = ((__pyx_v_i < __pyx_v_a) != 0);
14968   if (__pyx_t_1) {
14969     __pyx_r = __pyx_v_a;
14970     goto __pyx_L0;
14971   }
14972 
14973   /* "yt/utilities/lib/fp_utils.pxd":40
14974  * cdef inline np.int64_t i64clip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:
14975  *     if i < a: return a
14976  *     if i > b: return b             # <<<<<<<<<<<<<<
14977  *     return i
14978  *
14979  */
14980   __pyx_t_1 = ((__pyx_v_i > __pyx_v_b) != 0);
14981   if (__pyx_t_1) {
14982     __pyx_r = __pyx_v_b;
14983     goto __pyx_L0;
14984   }
14985 
14986   /* "yt/utilities/lib/fp_utils.pxd":41
14987  *     if i < a: return a
14988  *     if i > b: return b
14989  *     return i             # <<<<<<<<<<<<<<
14990  *
14991  * cdef inline np.float64_t fclip(np.float64_t f,
14992  */
14993   __pyx_r = __pyx_v_i;
14994   goto __pyx_L0;
14995 
14996   /* "yt/utilities/lib/fp_utils.pxd":38
14997  *     return i
14998  *
14999  * cdef inline np.int64_t i64clip(np.int64_t i, np.int64_t a, np.int64_t b) nogil:             # <<<<<<<<<<<<<<
15000  *     if i < a: return a
15001  *     if i > b: return b
15002  */
15003 
15004   /* function exit code */
15005   __pyx_L0:;
15006   return __pyx_r;
15007 }
15008 
15009 /* "yt/utilities/lib/fp_utils.pxd":43
15010  *     return i
15011  *
15012  * cdef inline np.float64_t fclip(np.float64_t f,             # <<<<<<<<<<<<<<
15013  *                       np.float64_t a, np.float64_t b) nogil:
15014  *     return fmin(fmax(f, a), b)
15015  */
15016 
__pyx_f_2yt_9utilities_3lib_8fp_utils_fclip(__pyx_t_5numpy_float64_t __pyx_v_f,__pyx_t_5numpy_float64_t __pyx_v_a,__pyx_t_5numpy_float64_t __pyx_v_b)15017 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_fclip(__pyx_t_5numpy_float64_t __pyx_v_f, __pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) {
15018   __pyx_t_5numpy_float64_t __pyx_r;
15019 
15020   /* "yt/utilities/lib/fp_utils.pxd":45
15021  * cdef inline np.float64_t fclip(np.float64_t f,
15022  *                       np.float64_t a, np.float64_t b) nogil:
15023  *     return fmin(fmax(f, a), b)             # <<<<<<<<<<<<<<
15024  *
15025  * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1) nogil:
15026  */
15027   __pyx_r = __pyx_f_2yt_9utilities_3lib_8fp_utils_fmin(__pyx_f_2yt_9utilities_3lib_8fp_utils_fmax(__pyx_v_f, __pyx_v_a), __pyx_v_b);
15028   goto __pyx_L0;
15029 
15030   /* "yt/utilities/lib/fp_utils.pxd":43
15031  *     return i
15032  *
15033  * cdef inline np.float64_t fclip(np.float64_t f,             # <<<<<<<<<<<<<<
15034  *                       np.float64_t a, np.float64_t b) nogil:
15035  *     return fmin(fmax(f, a), b)
15036  */
15037 
15038   /* function exit code */
15039   __pyx_L0:;
15040   return __pyx_r;
15041 }
15042 
15043 /* "yt/utilities/lib/fp_utils.pxd":47
15044  *     return fmin(fmax(f, a), b)
15045  *
15046  * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
15047  *     if i0 > i1: return i0
15048  *     return i1
15049  */
15050 
__pyx_f_2yt_9utilities_3lib_8fp_utils_i64max(__pyx_t_5numpy_int64_t __pyx_v_i0,__pyx_t_5numpy_int64_t __pyx_v_i1)15051 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_i64max(__pyx_t_5numpy_int64_t __pyx_v_i0, __pyx_t_5numpy_int64_t __pyx_v_i1) {
15052   __pyx_t_5numpy_int64_t __pyx_r;
15053   int __pyx_t_1;
15054 
15055   /* "yt/utilities/lib/fp_utils.pxd":48
15056  *
15057  * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1) nogil:
15058  *     if i0 > i1: return i0             # <<<<<<<<<<<<<<
15059  *     return i1
15060  *
15061  */
15062   __pyx_t_1 = ((__pyx_v_i0 > __pyx_v_i1) != 0);
15063   if (__pyx_t_1) {
15064     __pyx_r = __pyx_v_i0;
15065     goto __pyx_L0;
15066   }
15067 
15068   /* "yt/utilities/lib/fp_utils.pxd":49
15069  * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1) nogil:
15070  *     if i0 > i1: return i0
15071  *     return i1             # <<<<<<<<<<<<<<
15072  *
15073  * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1) nogil:
15074  */
15075   __pyx_r = __pyx_v_i1;
15076   goto __pyx_L0;
15077 
15078   /* "yt/utilities/lib/fp_utils.pxd":47
15079  *     return fmin(fmax(f, a), b)
15080  *
15081  * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
15082  *     if i0 > i1: return i0
15083  *     return i1
15084  */
15085 
15086   /* function exit code */
15087   __pyx_L0:;
15088   return __pyx_r;
15089 }
15090 
15091 /* "yt/utilities/lib/fp_utils.pxd":51
15092  *     return i1
15093  *
15094  * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
15095  *     if i0 < i1: return i0
15096  *     return i1
15097  */
15098 
__pyx_f_2yt_9utilities_3lib_8fp_utils_i64min(__pyx_t_5numpy_int64_t __pyx_v_i0,__pyx_t_5numpy_int64_t __pyx_v_i1)15099 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_8fp_utils_i64min(__pyx_t_5numpy_int64_t __pyx_v_i0, __pyx_t_5numpy_int64_t __pyx_v_i1) {
15100   __pyx_t_5numpy_int64_t __pyx_r;
15101   int __pyx_t_1;
15102 
15103   /* "yt/utilities/lib/fp_utils.pxd":52
15104  *
15105  * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1) nogil:
15106  *     if i0 < i1: return i0             # <<<<<<<<<<<<<<
15107  *     return i1
15108  *
15109  */
15110   __pyx_t_1 = ((__pyx_v_i0 < __pyx_v_i1) != 0);
15111   if (__pyx_t_1) {
15112     __pyx_r = __pyx_v_i0;
15113     goto __pyx_L0;
15114   }
15115 
15116   /* "yt/utilities/lib/fp_utils.pxd":53
15117  * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1) nogil:
15118  *     if i0 < i1: return i0
15119  *     return i1             # <<<<<<<<<<<<<<
15120  *
15121  * cdef inline _ensure_code(arr):
15122  */
15123   __pyx_r = __pyx_v_i1;
15124   goto __pyx_L0;
15125 
15126   /* "yt/utilities/lib/fp_utils.pxd":51
15127  *     return i1
15128  *
15129  * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1) nogil:             # <<<<<<<<<<<<<<
15130  *     if i0 < i1: return i0
15131  *     return i1
15132  */
15133 
15134   /* function exit code */
15135   __pyx_L0:;
15136   return __pyx_r;
15137 }
15138 
15139 /* "yt/utilities/lib/fp_utils.pxd":55
15140  *     return i1
15141  *
15142  * cdef inline _ensure_code(arr):             # <<<<<<<<<<<<<<
15143  *     if hasattr(arr, "units"):
15144  *         if "code_length" == str(arr.units):
15145  */
15146 
__pyx_f_2yt_9utilities_3lib_8fp_utils__ensure_code(PyObject * __pyx_v_arr)15147 static CYTHON_INLINE PyObject *__pyx_f_2yt_9utilities_3lib_8fp_utils__ensure_code(PyObject *__pyx_v_arr) {
15148   PyObject *__pyx_r = NULL;
15149   __Pyx_RefNannyDeclarations
15150   int __pyx_t_1;
15151   int __pyx_t_2;
15152   PyObject *__pyx_t_3 = NULL;
15153   PyObject *__pyx_t_4 = NULL;
15154   PyObject *__pyx_t_5 = NULL;
15155   __Pyx_RefNannySetupContext("_ensure_code", 0);
15156 
15157   /* "yt/utilities/lib/fp_utils.pxd":56
15158  *
15159  * cdef inline _ensure_code(arr):
15160  *     if hasattr(arr, "units"):             # <<<<<<<<<<<<<<
15161  *         if "code_length" == str(arr.units):
15162  *             return arr
15163  */
15164   __pyx_t_1 = __Pyx_HasAttr(__pyx_v_arr, __pyx_n_s_units); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(4, 56, __pyx_L1_error)
15165   __pyx_t_2 = (__pyx_t_1 != 0);
15166   if (__pyx_t_2) {
15167 
15168     /* "yt/utilities/lib/fp_utils.pxd":57
15169  * cdef inline _ensure_code(arr):
15170  *     if hasattr(arr, "units"):
15171  *         if "code_length" == str(arr.units):             # <<<<<<<<<<<<<<
15172  *             return arr
15173  *         arr.convert_to_units("code_length")
15174  */
15175     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 57, __pyx_L1_error)
15176     __Pyx_GOTREF(__pyx_t_3);
15177     __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 57, __pyx_L1_error)
15178     __Pyx_GOTREF(__pyx_t_4);
15179     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15180     __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_n_s_code_length, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(4, 57, __pyx_L1_error)
15181     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15182     if (__pyx_t_2) {
15183 
15184       /* "yt/utilities/lib/fp_utils.pxd":58
15185  *     if hasattr(arr, "units"):
15186  *         if "code_length" == str(arr.units):
15187  *             return arr             # <<<<<<<<<<<<<<
15188  *         arr.convert_to_units("code_length")
15189  *     return arr
15190  */
15191       __Pyx_XDECREF(__pyx_r);
15192       __Pyx_INCREF(__pyx_v_arr);
15193       __pyx_r = __pyx_v_arr;
15194       goto __pyx_L0;
15195 
15196       /* "yt/utilities/lib/fp_utils.pxd":57
15197  * cdef inline _ensure_code(arr):
15198  *     if hasattr(arr, "units"):
15199  *         if "code_length" == str(arr.units):             # <<<<<<<<<<<<<<
15200  *             return arr
15201  *         arr.convert_to_units("code_length")
15202  */
15203     }
15204 
15205     /* "yt/utilities/lib/fp_utils.pxd":59
15206  *         if "code_length" == str(arr.units):
15207  *             return arr
15208  *         arr.convert_to_units("code_length")             # <<<<<<<<<<<<<<
15209  *     return arr
15210  */
15211     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_convert_to_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 59, __pyx_L1_error)
15212     __Pyx_GOTREF(__pyx_t_3);
15213     __pyx_t_5 = NULL;
15214     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
15215       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
15216       if (likely(__pyx_t_5)) {
15217         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
15218         __Pyx_INCREF(__pyx_t_5);
15219         __Pyx_INCREF(function);
15220         __Pyx_DECREF_SET(__pyx_t_3, function);
15221       }
15222     }
15223     __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_n_s_code_length) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_code_length);
15224     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15225     if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 59, __pyx_L1_error)
15226     __Pyx_GOTREF(__pyx_t_4);
15227     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15228     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15229 
15230     /* "yt/utilities/lib/fp_utils.pxd":56
15231  *
15232  * cdef inline _ensure_code(arr):
15233  *     if hasattr(arr, "units"):             # <<<<<<<<<<<<<<
15234  *         if "code_length" == str(arr.units):
15235  *             return arr
15236  */
15237   }
15238 
15239   /* "yt/utilities/lib/fp_utils.pxd":60
15240  *             return arr
15241  *         arr.convert_to_units("code_length")
15242  *     return arr             # <<<<<<<<<<<<<<
15243  */
15244   __Pyx_XDECREF(__pyx_r);
15245   __Pyx_INCREF(__pyx_v_arr);
15246   __pyx_r = __pyx_v_arr;
15247   goto __pyx_L0;
15248 
15249   /* "yt/utilities/lib/fp_utils.pxd":55
15250  *     return i1
15251  *
15252  * cdef inline _ensure_code(arr):             # <<<<<<<<<<<<<<
15253  *     if hasattr(arr, "units"):
15254  *         if "code_length" == str(arr.units):
15255  */
15256 
15257   /* function exit code */
15258   __pyx_L1_error:;
15259   __Pyx_XDECREF(__pyx_t_3);
15260   __Pyx_XDECREF(__pyx_t_4);
15261   __Pyx_XDECREF(__pyx_t_5);
15262   __Pyx_AddTraceback("yt.utilities.lib.fp_utils._ensure_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
15263   __pyx_r = 0;
15264   __pyx_L0:;
15265   __Pyx_XGIVEREF(__pyx_r);
15266   __Pyx_RefNannyFinishContext();
15267   return __pyx_r;
15268 }
15269 
15270 /* "oct_visitors.pxd":51
15271  *     cdef void visit(self, Oct*, np.uint8_t selected)
15272  *
15273  *     cdef inline int oind(self):             # <<<<<<<<<<<<<<
15274  *         cdef int d = (1 << self.oref)
15275  *         return (((self.ind[0]*d)+self.ind[1])*d+self.ind[2])
15276  */
15277 
__pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_oind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor * __pyx_v_self)15278 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_oind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *__pyx_v_self) {
15279   int __pyx_v_d;
15280   int __pyx_r;
15281   __Pyx_RefNannyDeclarations
15282   __Pyx_RefNannySetupContext("oind", 0);
15283 
15284   /* "oct_visitors.pxd":52
15285  *
15286  *     cdef inline int oind(self):
15287  *         cdef int d = (1 << self.oref)             # <<<<<<<<<<<<<<
15288  *         return (((self.ind[0]*d)+self.ind[1])*d+self.ind[2])
15289  *
15290  */
15291   __pyx_v_d = (1 << __pyx_v_self->oref);
15292 
15293   /* "oct_visitors.pxd":53
15294  *     cdef inline int oind(self):
15295  *         cdef int d = (1 << self.oref)
15296  *         return (((self.ind[0]*d)+self.ind[1])*d+self.ind[2])             # <<<<<<<<<<<<<<
15297  *
15298  *     cdef inline int rind(self):
15299  */
15300   __pyx_r = (((((__pyx_v_self->ind[0]) * __pyx_v_d) + (__pyx_v_self->ind[1])) * __pyx_v_d) + (__pyx_v_self->ind[2]));
15301   goto __pyx_L0;
15302 
15303   /* "oct_visitors.pxd":51
15304  *     cdef void visit(self, Oct*, np.uint8_t selected)
15305  *
15306  *     cdef inline int oind(self):             # <<<<<<<<<<<<<<
15307  *         cdef int d = (1 << self.oref)
15308  *         return (((self.ind[0]*d)+self.ind[1])*d+self.ind[2])
15309  */
15310 
15311   /* function exit code */
15312   __pyx_L0:;
15313   __Pyx_RefNannyFinishContext();
15314   return __pyx_r;
15315 }
15316 
15317 /* "oct_visitors.pxd":55
15318  *         return (((self.ind[0]*d)+self.ind[1])*d+self.ind[2])
15319  *
15320  *     cdef inline int rind(self):             # <<<<<<<<<<<<<<
15321  *         cdef int d = (1 << self.oref)
15322  *         return (((self.ind[2]*d)+self.ind[1])*d+self.ind[0])
15323  */
15324 
__pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor * __pyx_v_self)15325 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_10OctVisitor_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor *__pyx_v_self) {
15326   int __pyx_v_d;
15327   int __pyx_r;
15328   __Pyx_RefNannyDeclarations
15329   __Pyx_RefNannySetupContext("rind", 0);
15330 
15331   /* "oct_visitors.pxd":56
15332  *
15333  *     cdef inline int rind(self):
15334  *         cdef int d = (1 << self.oref)             # <<<<<<<<<<<<<<
15335  *         return (((self.ind[2]*d)+self.ind[1])*d+self.ind[0])
15336  *
15337  */
15338   __pyx_v_d = (1 << __pyx_v_self->oref);
15339 
15340   /* "oct_visitors.pxd":57
15341  *     cdef inline int rind(self):
15342  *         cdef int d = (1 << self.oref)
15343  *         return (((self.ind[2]*d)+self.ind[1])*d+self.ind[0])             # <<<<<<<<<<<<<<
15344  *
15345  * cdef class CountTotalOcts(OctVisitor):
15346  */
15347   __pyx_r = (((((__pyx_v_self->ind[2]) * __pyx_v_d) + (__pyx_v_self->ind[1])) * __pyx_v_d) + (__pyx_v_self->ind[0]));
15348   goto __pyx_L0;
15349 
15350   /* "oct_visitors.pxd":55
15351  *         return (((self.ind[0]*d)+self.ind[1])*d+self.ind[2])
15352  *
15353  *     cdef inline int rind(self):             # <<<<<<<<<<<<<<
15354  *         cdef int d = (1 << self.oref)
15355  *         return (((self.ind[2]*d)+self.ind[1])*d+self.ind[0])
15356  */
15357 
15358   /* function exit code */
15359   __pyx_L0:;
15360   __Pyx_RefNannyFinishContext();
15361   return __pyx_r;
15362 }
15363 
15364 /* "oct_visitors.pxd":142
15365  *     cdef np.uint64_t[:] morton_ind
15366  *
15367  * cdef inline int cind(int i, int j, int k) nogil:             # <<<<<<<<<<<<<<
15368  *     # THIS ONLY WORKS FOR CHILDREN.  It is not general for zones.
15369  *     return (((i*2)+j)*2+k)
15370  */
15371 
__pyx_f_2yt_8geometry_12oct_visitors_cind(int __pyx_v_i,int __pyx_v_j,int __pyx_v_k)15372 static CYTHON_INLINE int __pyx_f_2yt_8geometry_12oct_visitors_cind(int __pyx_v_i, int __pyx_v_j, int __pyx_v_k) {
15373   int __pyx_r;
15374 
15375   /* "oct_visitors.pxd":144
15376  * cdef inline int cind(int i, int j, int k) nogil:
15377  *     # THIS ONLY WORKS FOR CHILDREN.  It is not general for zones.
15378  *     return (((i*2)+j)*2+k)             # <<<<<<<<<<<<<<
15379  *
15380  * from oct_container cimport OctreeContainer
15381  */
15382   __pyx_r = ((((__pyx_v_i * 2) + __pyx_v_j) * 2) + __pyx_v_k);
15383   goto __pyx_L0;
15384 
15385   /* "oct_visitors.pxd":142
15386  *     cdef np.uint64_t[:] morton_ind
15387  *
15388  * cdef inline int cind(int i, int j, int k) nogil:             # <<<<<<<<<<<<<<
15389  *     # THIS ONLY WORKS FOR CHILDREN.  It is not general for zones.
15390  *     return (((i*2)+j)*2+k)
15391  */
15392 
15393   /* function exit code */
15394   __pyx_L0:;
15395   return __pyx_r;
15396 }
15397 
15398 /* "oct_visitors.pxd":165
15399  *     cdef void set_neighbour_info(self, Oct *o, int ishift[3])
15400  *
15401  *     cdef inline np.uint8_t neighbour_rind(self):             # <<<<<<<<<<<<<<
15402  *         cdef int d = (1 << self.oref)
15403  *         return (((self.neigh_ind[2]*d)+self.neigh_ind[1])*d+self.neigh_ind[0])
15404  */
15405 
__pyx_f_2yt_8geometry_12oct_visitors_20BaseNeighbourVisitor_neighbour_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor * __pyx_v_self)15406 static CYTHON_INLINE __pyx_t_5numpy_uint8_t __pyx_f_2yt_8geometry_12oct_visitors_20BaseNeighbourVisitor_neighbour_rind(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor *__pyx_v_self) {
15407   int __pyx_v_d;
15408   __pyx_t_5numpy_uint8_t __pyx_r;
15409   __Pyx_RefNannyDeclarations
15410   __Pyx_RefNannySetupContext("neighbour_rind", 0);
15411 
15412   /* "oct_visitors.pxd":166
15413  *
15414  *     cdef inline np.uint8_t neighbour_rind(self):
15415  *         cdef int d = (1 << self.oref)             # <<<<<<<<<<<<<<
15416  *         return (((self.neigh_ind[2]*d)+self.neigh_ind[1])*d+self.neigh_ind[0])
15417  *
15418  */
15419   __pyx_v_d = (1 << __pyx_v_self->__pyx_base.oref);
15420 
15421   /* "oct_visitors.pxd":167
15422  *     cdef inline np.uint8_t neighbour_rind(self):
15423  *         cdef int d = (1 << self.oref)
15424  *         return (((self.neigh_ind[2]*d)+self.neigh_ind[1])*d+self.neigh_ind[0])             # <<<<<<<<<<<<<<
15425  *
15426  * cdef class NeighbourCellIndexVisitor(BaseNeighbourVisitor):
15427  */
15428   __pyx_r = (((((__pyx_v_self->neigh_ind[2]) * __pyx_v_d) + (__pyx_v_self->neigh_ind[1])) * __pyx_v_d) + (__pyx_v_self->neigh_ind[0]));
15429   goto __pyx_L0;
15430 
15431   /* "oct_visitors.pxd":165
15432  *     cdef void set_neighbour_info(self, Oct *o, int ishift[3])
15433  *
15434  *     cdef inline np.uint8_t neighbour_rind(self):             # <<<<<<<<<<<<<<
15435  *         cdef int d = (1 << self.oref)
15436  *         return (((self.neigh_ind[2]*d)+self.neigh_ind[1])*d+self.neigh_ind[0])
15437  */
15438 
15439   /* function exit code */
15440   __pyx_L0:;
15441   __Pyx_RefNannyFinishContext();
15442   return __pyx_r;
15443 }
15444 
15445 /* "yt/utilities/lib/geometry_utils.pxd":24
15446  * @cython.boundscheck(False)
15447  * @cython.wraparound(False)
15448  * cdef inline np.int64_t ifrexp(np.float64_t x, np.int64_t *e):             # <<<<<<<<<<<<<<
15449  *     cdef np.float64_t m
15450  *     cdef int e0 = 0
15451  */
15452 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_int64_t * __pyx_v_e)15453 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_int64_t *__pyx_v_e) {
15454   __pyx_t_5numpy_float64_t __pyx_v_m;
15455   int __pyx_v_e0;
15456   __pyx_t_5numpy_int64_t __pyx_r;
15457   __Pyx_RefNannyDeclarations
15458   __Pyx_RefNannySetupContext("ifrexp", 0);
15459 
15460   /* "yt/utilities/lib/geometry_utils.pxd":26
15461  * cdef inline np.int64_t ifrexp(np.float64_t x, np.int64_t *e):
15462  *     cdef np.float64_t m
15463  *     cdef int e0 = 0             # <<<<<<<<<<<<<<
15464  *     m = frexp(x,&e0)
15465  *     e[0] = <np.int64_t>e0
15466  */
15467   __pyx_v_e0 = 0;
15468 
15469   /* "yt/utilities/lib/geometry_utils.pxd":27
15470  *     cdef np.float64_t m
15471  *     cdef int e0 = 0
15472  *     m = frexp(x,&e0)             # <<<<<<<<<<<<<<
15473  *     e[0] = <np.int64_t>e0
15474  *     return <np.int64_t>ldexp(m,<int>DBL_MANT_DIG)
15475  */
15476   __pyx_v_m = frexp(__pyx_v_x, (&__pyx_v_e0));
15477 
15478   /* "yt/utilities/lib/geometry_utils.pxd":28
15479  *     cdef int e0 = 0
15480  *     m = frexp(x,&e0)
15481  *     e[0] = <np.int64_t>e0             # <<<<<<<<<<<<<<
15482  *     return <np.int64_t>ldexp(m,<int>DBL_MANT_DIG)
15483  *
15484  */
15485   (__pyx_v_e[0]) = ((__pyx_t_5numpy_int64_t)__pyx_v_e0);
15486 
15487   /* "yt/utilities/lib/geometry_utils.pxd":29
15488  *     m = frexp(x,&e0)
15489  *     e[0] = <np.int64_t>e0
15490  *     return <np.int64_t>ldexp(m,<int>DBL_MANT_DIG)             # <<<<<<<<<<<<<<
15491  *
15492  * @cython.cdivision(True)
15493  */
15494   __pyx_r = ((__pyx_t_5numpy_int64_t)ldexp(__pyx_v_m, ((int)DBL_MANT_DIG)));
15495   goto __pyx_L0;
15496 
15497   /* "yt/utilities/lib/geometry_utils.pxd":24
15498  * @cython.boundscheck(False)
15499  * @cython.wraparound(False)
15500  * cdef inline np.int64_t ifrexp(np.float64_t x, np.int64_t *e):             # <<<<<<<<<<<<<<
15501  *     cdef np.float64_t m
15502  *     cdef int e0 = 0
15503  */
15504 
15505   /* function exit code */
15506   __pyx_L0:;
15507   __Pyx_RefNannyFinishContext();
15508   return __pyx_r;
15509 }
15510 
15511 /* "yt/utilities/lib/geometry_utils.pxd":34
15512  * @cython.boundscheck(False)
15513  * @cython.wraparound(False)
15514  * cdef inline np.int64_t msdb(np.int64_t a, np.int64_t b):             # <<<<<<<<<<<<<<
15515  *     """Get the most significant differing bit between a and b."""
15516  *     cdef np.int64_t c, ndx
15517  */
15518 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_msdb(__pyx_t_5numpy_int64_t __pyx_v_a,__pyx_t_5numpy_int64_t __pyx_v_b)15519 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_msdb(__pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) {
15520   __pyx_t_5numpy_int64_t __pyx_v_c;
15521   __pyx_t_5numpy_int64_t __pyx_v_ndx;
15522   __pyx_t_5numpy_int64_t __pyx_r;
15523   __Pyx_RefNannyDeclarations
15524   int __pyx_t_1;
15525   __Pyx_RefNannySetupContext("msdb", 0);
15526 
15527   /* "yt/utilities/lib/geometry_utils.pxd":37
15528  *     """Get the most significant differing bit between a and b."""
15529  *     cdef np.int64_t c, ndx
15530  *     c = a ^ b             # <<<<<<<<<<<<<<
15531  *     ndx = 0
15532  *     while (0 < c):
15533  */
15534   __pyx_v_c = (__pyx_v_a ^ __pyx_v_b);
15535 
15536   /* "yt/utilities/lib/geometry_utils.pxd":38
15537  *     cdef np.int64_t c, ndx
15538  *     c = a ^ b
15539  *     ndx = 0             # <<<<<<<<<<<<<<
15540  *     while (0 < c):
15541  *         c = (c >> 1)
15542  */
15543   __pyx_v_ndx = 0;
15544 
15545   /* "yt/utilities/lib/geometry_utils.pxd":39
15546  *     c = a ^ b
15547  *     ndx = 0
15548  *     while (0 < c):             # <<<<<<<<<<<<<<
15549  *         c = (c >> 1)
15550  *         ndx+=1
15551  */
15552   while (1) {
15553     __pyx_t_1 = ((0 < __pyx_v_c) != 0);
15554     if (!__pyx_t_1) break;
15555 
15556     /* "yt/utilities/lib/geometry_utils.pxd":40
15557  *     ndx = 0
15558  *     while (0 < c):
15559  *         c = (c >> 1)             # <<<<<<<<<<<<<<
15560  *         ndx+=1
15561  *     return ndx
15562  */
15563     __pyx_v_c = (__pyx_v_c >> 1);
15564 
15565     /* "yt/utilities/lib/geometry_utils.pxd":41
15566  *     while (0 < c):
15567  *         c = (c >> 1)
15568  *         ndx+=1             # <<<<<<<<<<<<<<
15569  *     return ndx
15570  *
15571  */
15572     __pyx_v_ndx = (__pyx_v_ndx + 1);
15573   }
15574 
15575   /* "yt/utilities/lib/geometry_utils.pxd":42
15576  *         c = (c >> 1)
15577  *         ndx+=1
15578  *     return ndx             # <<<<<<<<<<<<<<
15579  *
15580  * @cython.cdivision(True)
15581  */
15582   __pyx_r = __pyx_v_ndx;
15583   goto __pyx_L0;
15584 
15585   /* "yt/utilities/lib/geometry_utils.pxd":34
15586  * @cython.boundscheck(False)
15587  * @cython.wraparound(False)
15588  * cdef inline np.int64_t msdb(np.int64_t a, np.int64_t b):             # <<<<<<<<<<<<<<
15589  *     """Get the most significant differing bit between a and b."""
15590  *     cdef np.int64_t c, ndx
15591  */
15592 
15593   /* function exit code */
15594   __pyx_L0:;
15595   __Pyx_RefNannyFinishContext();
15596   return __pyx_r;
15597 }
15598 
15599 /* "yt/utilities/lib/geometry_utils.pxd":47
15600  * @cython.boundscheck(False)
15601  * @cython.wraparound(False)
15602  * cdef inline np.int64_t xor_msb(np.float64_t a, np.float64_t b):             # <<<<<<<<<<<<<<
15603  *     """Get the exponent of the highest differing bit between a and b"""
15604  *     # Get mantissa and exponents for each number
15605  */
15606 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_xor_msb(__pyx_t_5numpy_float64_t __pyx_v_a,__pyx_t_5numpy_float64_t __pyx_v_b)15607 static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_xor_msb(__pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) {
15608   __pyx_t_5numpy_int64_t __pyx_v_a_m;
15609   __pyx_t_5numpy_int64_t __pyx_v_a_e;
15610   __pyx_t_5numpy_int64_t __pyx_v_b_m;
15611   __pyx_t_5numpy_int64_t __pyx_v_b_e;
15612   __pyx_t_5numpy_int64_t __pyx_v_x;
15613   __pyx_t_5numpy_int64_t __pyx_v_y;
15614   __pyx_t_5numpy_int64_t __pyx_v_z;
15615   __pyx_t_5numpy_int64_t __pyx_r;
15616   __Pyx_RefNannyDeclarations
15617   int __pyx_t_1;
15618   __Pyx_RefNannySetupContext("xor_msb", 0);
15619 
15620   /* "yt/utilities/lib/geometry_utils.pxd":51
15621  *     # Get mantissa and exponents for each number
15622  *     cdef np.int64_t a_m, a_e, b_m, b_e, x, y, z
15623  *     b_e = 0             # <<<<<<<<<<<<<<
15624  *     a_e = 0
15625  *     a_m = ifrexp(a,&a_e)
15626  */
15627   __pyx_v_b_e = 0;
15628 
15629   /* "yt/utilities/lib/geometry_utils.pxd":52
15630  *     cdef np.int64_t a_m, a_e, b_m, b_e, x, y, z
15631  *     b_e = 0
15632  *     a_e = 0             # <<<<<<<<<<<<<<
15633  *     a_m = ifrexp(a,&a_e)
15634  *     b_m = ifrexp(b,&b_e)
15635  */
15636   __pyx_v_a_e = 0;
15637 
15638   /* "yt/utilities/lib/geometry_utils.pxd":53
15639  *     b_e = 0
15640  *     a_e = 0
15641  *     a_m = ifrexp(a,&a_e)             # <<<<<<<<<<<<<<
15642  *     b_m = ifrexp(b,&b_e)
15643  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)
15644  */
15645   __pyx_v_a_m = __pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_v_a, (&__pyx_v_a_e));
15646 
15647   /* "yt/utilities/lib/geometry_utils.pxd":54
15648  *     a_e = 0
15649  *     a_m = ifrexp(a,&a_e)
15650  *     b_m = ifrexp(b,&b_e)             # <<<<<<<<<<<<<<
15651  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)
15652  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
15653  */
15654   __pyx_v_b_m = __pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_v_b, (&__pyx_v_b_e));
15655 
15656   /* "yt/utilities/lib/geometry_utils.pxd":55
15657  *     a_m = ifrexp(a,&a_e)
15658  *     b_m = ifrexp(b,&b_e)
15659  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)             # <<<<<<<<<<<<<<
15660  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
15661  *     # Compare mantissa if exponents equal
15662  */
15663   __pyx_v_x = ((__pyx_t_5numpy_int64_t)((__pyx_v_a_e + 1) * DBL_MANT_DIG));
15664 
15665   /* "yt/utilities/lib/geometry_utils.pxd":56
15666  *     b_m = ifrexp(b,&b_e)
15667  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)
15668  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)             # <<<<<<<<<<<<<<
15669  *     # Compare mantissa if exponents equal
15670  *     if x == y:
15671  */
15672   __pyx_v_y = ((__pyx_t_5numpy_int64_t)((__pyx_v_b_e + 1) * DBL_MANT_DIG));
15673 
15674   /* "yt/utilities/lib/geometry_utils.pxd":58
15675  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
15676  *     # Compare mantissa if exponents equal
15677  *     if x == y:             # <<<<<<<<<<<<<<
15678  *         if a_m == b_m: return 0
15679  *         z = msdb(a_m,b_m)
15680  */
15681   __pyx_t_1 = ((__pyx_v_x == __pyx_v_y) != 0);
15682   if (__pyx_t_1) {
15683 
15684     /* "yt/utilities/lib/geometry_utils.pxd":59
15685  *     # Compare mantissa if exponents equal
15686  *     if x == y:
15687  *         if a_m == b_m: return 0             # <<<<<<<<<<<<<<
15688  *         z = msdb(a_m,b_m)
15689  *         #if 1: return z
15690  */
15691     __pyx_t_1 = ((__pyx_v_a_m == __pyx_v_b_m) != 0);
15692     if (__pyx_t_1) {
15693       __pyx_r = 0;
15694       goto __pyx_L0;
15695     }
15696 
15697     /* "yt/utilities/lib/geometry_utils.pxd":60
15698  *     if x == y:
15699  *         if a_m == b_m: return 0
15700  *         z = msdb(a_m,b_m)             # <<<<<<<<<<<<<<
15701  *         #if 1: return z
15702  *         x = x - z
15703  */
15704     __pyx_v_z = __pyx_f_2yt_9utilities_3lib_14geometry_utils_msdb(__pyx_v_a_m, __pyx_v_b_m);
15705 
15706     /* "yt/utilities/lib/geometry_utils.pxd":62
15707  *         z = msdb(a_m,b_m)
15708  *         #if 1: return z
15709  *         x = x - z             # <<<<<<<<<<<<<<
15710  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)
15711  *     # Otherwise return largest exponent
15712  */
15713     __pyx_v_x = (__pyx_v_x - __pyx_v_z);
15714 
15715     /* "yt/utilities/lib/geometry_utils.pxd":63
15716  *         #if 1: return z
15717  *         x = x - z
15718  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)             # <<<<<<<<<<<<<<
15719  *     # Otherwise return largest exponent
15720  *     if y < x:
15721  */
15722     __pyx_r = (__pyx_v_x - 1);
15723     goto __pyx_L0;
15724 
15725     /* "yt/utilities/lib/geometry_utils.pxd":58
15726  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
15727  *     # Compare mantissa if exponents equal
15728  *     if x == y:             # <<<<<<<<<<<<<<
15729  *         if a_m == b_m: return 0
15730  *         z = msdb(a_m,b_m)
15731  */
15732   }
15733 
15734   /* "yt/utilities/lib/geometry_utils.pxd":65
15735  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)
15736  *     # Otherwise return largest exponent
15737  *     if y < x:             # <<<<<<<<<<<<<<
15738  *         return x
15739  *     else:
15740  */
15741   __pyx_t_1 = ((__pyx_v_y < __pyx_v_x) != 0);
15742   if (__pyx_t_1) {
15743 
15744     /* "yt/utilities/lib/geometry_utils.pxd":66
15745  *     # Otherwise return largest exponent
15746  *     if y < x:
15747  *         return x             # <<<<<<<<<<<<<<
15748  *     else:
15749  *         return y
15750  */
15751     __pyx_r = __pyx_v_x;
15752     goto __pyx_L0;
15753 
15754     /* "yt/utilities/lib/geometry_utils.pxd":65
15755  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)
15756  *     # Otherwise return largest exponent
15757  *     if y < x:             # <<<<<<<<<<<<<<
15758  *         return x
15759  *     else:
15760  */
15761   }
15762 
15763   /* "yt/utilities/lib/geometry_utils.pxd":68
15764  *         return x
15765  *     else:
15766  *         return y             # <<<<<<<<<<<<<<
15767  *
15768  * @cython.cdivision(True)
15769  */
15770   /*else*/ {
15771     __pyx_r = __pyx_v_y;
15772     goto __pyx_L0;
15773   }
15774 
15775   /* "yt/utilities/lib/geometry_utils.pxd":47
15776  * @cython.boundscheck(False)
15777  * @cython.wraparound(False)
15778  * cdef inline np.int64_t xor_msb(np.float64_t a, np.float64_t b):             # <<<<<<<<<<<<<<
15779  *     """Get the exponent of the highest differing bit between a and b"""
15780  *     # Get mantissa and exponents for each number
15781  */
15782 
15783   /* function exit code */
15784   __pyx_L0:;
15785   __Pyx_RefNannyFinishContext();
15786   return __pyx_r;
15787 }
15788 
15789 /* "yt/utilities/lib/geometry_utils.pxd":73
15790  * @cython.boundscheck(False)
15791  * @cython.wraparound(False)
15792  * cdef inline int compare_floats_morton(np.float64_t p[3], np.float64_t q[3]):             # <<<<<<<<<<<<<<
15793  *     cdef int j, out, dim
15794  *     cdef np.int64_t x, y
15795  */
15796 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_compare_floats_morton(__pyx_t_5numpy_float64_t * __pyx_v_p,__pyx_t_5numpy_float64_t * __pyx_v_q)15797 static CYTHON_INLINE int __pyx_f_2yt_9utilities_3lib_14geometry_utils_compare_floats_morton(__pyx_t_5numpy_float64_t *__pyx_v_p, __pyx_t_5numpy_float64_t *__pyx_v_q) {
15798   int __pyx_v_j;
15799   int __pyx_v_out;
15800   int __pyx_v_dim;
15801   __pyx_t_5numpy_int64_t __pyx_v_x;
15802   __pyx_t_5numpy_int64_t __pyx_v_y;
15803   int __pyx_r;
15804   __Pyx_RefNannyDeclarations
15805   int __pyx_t_1;
15806   int __pyx_t_2;
15807   __Pyx_RefNannySetupContext("compare_floats_morton", 0);
15808 
15809   /* "yt/utilities/lib/geometry_utils.pxd":76
15810  *     cdef int j, out, dim
15811  *     cdef np.int64_t x, y
15812  *     x = -9999999999             # <<<<<<<<<<<<<<
15813  *     y = 0
15814  *     dim = 0
15815  */
15816   __pyx_v_x = -9999999999LL;
15817 
15818   /* "yt/utilities/lib/geometry_utils.pxd":77
15819  *     cdef np.int64_t x, y
15820  *     x = -9999999999
15821  *     y = 0             # <<<<<<<<<<<<<<
15822  *     dim = 0
15823  *     for j in range(3):#[::-1]:
15824  */
15825   __pyx_v_y = 0;
15826 
15827   /* "yt/utilities/lib/geometry_utils.pxd":78
15828  *     x = -9999999999
15829  *     y = 0
15830  *     dim = 0             # <<<<<<<<<<<<<<
15831  *     for j in range(3):#[::-1]:
15832  *         y = xor_msb(p[j],q[j])
15833  */
15834   __pyx_v_dim = 0;
15835 
15836   /* "yt/utilities/lib/geometry_utils.pxd":79
15837  *     y = 0
15838  *     dim = 0
15839  *     for j in range(3):#[::-1]:             # <<<<<<<<<<<<<<
15840  *         y = xor_msb(p[j],q[j])
15841  *         if x < y:
15842  */
15843   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
15844     __pyx_v_j = __pyx_t_1;
15845 
15846     /* "yt/utilities/lib/geometry_utils.pxd":80
15847  *     dim = 0
15848  *     for j in range(3):#[::-1]:
15849  *         y = xor_msb(p[j],q[j])             # <<<<<<<<<<<<<<
15850  *         if x < y:
15851  *            x = y
15852  */
15853     __pyx_v_y = __pyx_f_2yt_9utilities_3lib_14geometry_utils_xor_msb((__pyx_v_p[__pyx_v_j]), (__pyx_v_q[__pyx_v_j]));
15854 
15855     /* "yt/utilities/lib/geometry_utils.pxd":81
15856  *     for j in range(3):#[::-1]:
15857  *         y = xor_msb(p[j],q[j])
15858  *         if x < y:             # <<<<<<<<<<<<<<
15859  *            x = y
15860  *            dim = j
15861  */
15862     __pyx_t_2 = ((__pyx_v_x < __pyx_v_y) != 0);
15863     if (__pyx_t_2) {
15864 
15865       /* "yt/utilities/lib/geometry_utils.pxd":82
15866  *         y = xor_msb(p[j],q[j])
15867  *         if x < y:
15868  *            x = y             # <<<<<<<<<<<<<<
15869  *            dim = j
15870  *     if p[dim] < q[dim]:
15871  */
15872       __pyx_v_x = __pyx_v_y;
15873 
15874       /* "yt/utilities/lib/geometry_utils.pxd":83
15875  *         if x < y:
15876  *            x = y
15877  *            dim = j             # <<<<<<<<<<<<<<
15878  *     if p[dim] < q[dim]:
15879  *         out = 1
15880  */
15881       __pyx_v_dim = __pyx_v_j;
15882 
15883       /* "yt/utilities/lib/geometry_utils.pxd":81
15884  *     for j in range(3):#[::-1]:
15885  *         y = xor_msb(p[j],q[j])
15886  *         if x < y:             # <<<<<<<<<<<<<<
15887  *            x = y
15888  *            dim = j
15889  */
15890     }
15891   }
15892 
15893   /* "yt/utilities/lib/geometry_utils.pxd":84
15894  *            x = y
15895  *            dim = j
15896  *     if p[dim] < q[dim]:             # <<<<<<<<<<<<<<
15897  *         out = 1
15898  *     else:
15899  */
15900   __pyx_t_2 = (((__pyx_v_p[__pyx_v_dim]) < (__pyx_v_q[__pyx_v_dim])) != 0);
15901   if (__pyx_t_2) {
15902 
15903     /* "yt/utilities/lib/geometry_utils.pxd":85
15904  *            dim = j
15905  *     if p[dim] < q[dim]:
15906  *         out = 1             # <<<<<<<<<<<<<<
15907  *     else:
15908  *         out = 0
15909  */
15910     __pyx_v_out = 1;
15911 
15912     /* "yt/utilities/lib/geometry_utils.pxd":84
15913  *            x = y
15914  *            dim = j
15915  *     if p[dim] < q[dim]:             # <<<<<<<<<<<<<<
15916  *         out = 1
15917  *     else:
15918  */
15919     goto __pyx_L6;
15920   }
15921 
15922   /* "yt/utilities/lib/geometry_utils.pxd":87
15923  *         out = 1
15924  *     else:
15925  *         out = 0             # <<<<<<<<<<<<<<
15926  *     return out
15927  *
15928  */
15929   /*else*/ {
15930     __pyx_v_out = 0;
15931   }
15932   __pyx_L6:;
15933 
15934   /* "yt/utilities/lib/geometry_utils.pxd":88
15935  *     else:
15936  *         out = 0
15937  *     return out             # <<<<<<<<<<<<<<
15938  *
15939  * @cython.cdivision(True)
15940  */
15941   __pyx_r = __pyx_v_out;
15942   goto __pyx_L0;
15943 
15944   /* "yt/utilities/lib/geometry_utils.pxd":73
15945  * @cython.boundscheck(False)
15946  * @cython.wraparound(False)
15947  * cdef inline int compare_floats_morton(np.float64_t p[3], np.float64_t q[3]):             # <<<<<<<<<<<<<<
15948  *     cdef int j, out, dim
15949  *     cdef np.int64_t x, y
15950  */
15951 
15952   /* function exit code */
15953   __pyx_L0:;
15954   __Pyx_RefNannyFinishContext();
15955   return __pyx_r;
15956 }
15957 
15958 /* "yt/utilities/lib/geometry_utils.pxd":93
15959  * @cython.boundscheck(False)
15960  * @cython.wraparound(False)
15961  * cdef inline np.float64_t euclidean_distance(np.float64_t[:] p, np.float64_t[:] q):             # <<<<<<<<<<<<<<
15962  *     cdef int j
15963  *     cdef np.float64_t d
15964  */
15965 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_euclidean_distance(__Pyx_memviewslice __pyx_v_p,__Pyx_memviewslice __pyx_v_q)15966 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_euclidean_distance(__Pyx_memviewslice __pyx_v_p, __Pyx_memviewslice __pyx_v_q) {
15967   int __pyx_v_j;
15968   __pyx_t_5numpy_float64_t __pyx_v_d;
15969   __pyx_t_5numpy_float64_t __pyx_r;
15970   __Pyx_RefNannyDeclarations
15971   int __pyx_t_1;
15972   Py_ssize_t __pyx_t_2;
15973   int __pyx_t_3;
15974   Py_ssize_t __pyx_t_4;
15975   __Pyx_RefNannySetupContext("euclidean_distance", 0);
15976 
15977   /* "yt/utilities/lib/geometry_utils.pxd":96
15978  *     cdef int j
15979  *     cdef np.float64_t d
15980  *     d = 0.0             # <<<<<<<<<<<<<<
15981  *     for j in range(3):
15982  *         d+=(p[j]-q[j])**2
15983  */
15984   __pyx_v_d = 0.0;
15985 
15986   /* "yt/utilities/lib/geometry_utils.pxd":97
15987  *     cdef np.float64_t d
15988  *     d = 0.0
15989  *     for j in range(3):             # <<<<<<<<<<<<<<
15990  *         d+=(p[j]-q[j])**2
15991  *     return sqrt(d)
15992  */
15993   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
15994     __pyx_v_j = __pyx_t_1;
15995 
15996     /* "yt/utilities/lib/geometry_utils.pxd":98
15997  *     d = 0.0
15998  *     for j in range(3):
15999  *         d+=(p[j]-q[j])**2             # <<<<<<<<<<<<<<
16000  *     return sqrt(d)
16001  *
16002  */
16003     __pyx_t_2 = __pyx_v_j;
16004     __pyx_t_3 = -1;
16005     if (__pyx_t_2 < 0) {
16006       __pyx_t_2 += __pyx_v_p.shape[0];
16007       if (unlikely(__pyx_t_2 < 0)) __pyx_t_3 = 0;
16008     } else if (unlikely(__pyx_t_2 >= __pyx_v_p.shape[0])) __pyx_t_3 = 0;
16009     if (unlikely(__pyx_t_3 != -1)) {
16010       __Pyx_RaiseBufferIndexError(__pyx_t_3);
16011       __PYX_ERR(5, 98, __pyx_L1_error)
16012     }
16013     __pyx_t_4 = __pyx_v_j;
16014     __pyx_t_3 = -1;
16015     if (__pyx_t_4 < 0) {
16016       __pyx_t_4 += __pyx_v_q.shape[0];
16017       if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0;
16018     } else if (unlikely(__pyx_t_4 >= __pyx_v_q.shape[0])) __pyx_t_3 = 0;
16019     if (unlikely(__pyx_t_3 != -1)) {
16020       __Pyx_RaiseBufferIndexError(__pyx_t_3);
16021       __PYX_ERR(5, 98, __pyx_L1_error)
16022     }
16023     __pyx_v_d = (__pyx_v_d + pow(((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_p.data + __pyx_t_2 * __pyx_v_p.strides[0]) ))) - (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_q.data + __pyx_t_4 * __pyx_v_q.strides[0]) )))), 2.0));
16024   }
16025 
16026   /* "yt/utilities/lib/geometry_utils.pxd":99
16027  *     for j in range(3):
16028  *         d+=(p[j]-q[j])**2
16029  *     return sqrt(d)             # <<<<<<<<<<<<<<
16030  *
16031  * # Todo: allow radius reported independently in each dimension for rectangular domain
16032  */
16033   __pyx_r = sqrt(__pyx_v_d);
16034   goto __pyx_L0;
16035 
16036   /* "yt/utilities/lib/geometry_utils.pxd":93
16037  * @cython.boundscheck(False)
16038  * @cython.wraparound(False)
16039  * cdef inline np.float64_t euclidean_distance(np.float64_t[:] p, np.float64_t[:] q):             # <<<<<<<<<<<<<<
16040  *     cdef int j
16041  *     cdef np.float64_t d
16042  */
16043 
16044   /* function exit code */
16045   __pyx_L1_error:;
16046   __Pyx_WriteUnraisable("yt.utilities.lib.geometry_utils.euclidean_distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
16047   __pyx_r = 0;
16048   __pyx_L0:;
16049   __Pyx_RefNannyFinishContext();
16050   return __pyx_r;
16051 }
16052 
16053 /* "yt/utilities/lib/geometry_utils.pxd":105
16054  * @cython.boundscheck(False)
16055  * @cython.wraparound(False)
16056  * cdef inline np.float64_t smallest_quadtree_box(np.float64_t p[3], np.float64_t q[3], np.int32_t order,             # <<<<<<<<<<<<<<
16057  *                                                np.float64_t DLE[3], np.float64_t DRE[3],
16058  *                                                np.float64_t *cx, np.float64_t *cy, np.float64_t *cz):
16059  */
16060 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_smallest_quadtree_box(__pyx_t_5numpy_float64_t * __pyx_v_p,__pyx_t_5numpy_float64_t * __pyx_v_q,__pyx_t_5numpy_int32_t __pyx_v_order,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_DRE,__pyx_t_5numpy_float64_t * __pyx_v_cx,__pyx_t_5numpy_float64_t * __pyx_v_cy,__pyx_t_5numpy_float64_t * __pyx_v_cz)16061 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_smallest_quadtree_box(__pyx_t_5numpy_float64_t *__pyx_v_p, __pyx_t_5numpy_float64_t *__pyx_v_q, __pyx_t_5numpy_int32_t __pyx_v_order, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_DRE, __pyx_t_5numpy_float64_t *__pyx_v_cx, __pyx_t_5numpy_float64_t *__pyx_v_cy, __pyx_t_5numpy_float64_t *__pyx_v_cz) {
16062   int __pyx_v_j;
16063   __pyx_t_5numpy_float64_t __pyx_v_c[3];
16064   __pyx_t_5numpy_uint64_t __pyx_v_pidx[3];
16065   __pyx_t_5numpy_uint64_t __pyx_v_pidx_next[3];
16066   __pyx_t_5numpy_uint64_t __pyx_v_qidx_next[3];
16067   __pyx_t_5numpy_float64_t __pyx_v_dds[3];
16068   __pyx_t_5numpy_float64_t __pyx_v_rad;
16069   int __pyx_v_lvl;
16070   int __pyx_v_done;
16071   __pyx_t_5numpy_float64_t __pyx_r;
16072   __Pyx_RefNannyDeclarations
16073   int __pyx_t_1;
16074   int __pyx_t_2;
16075   __Pyx_RefNannySetupContext("smallest_quadtree_box", 0);
16076 
16077   /* "yt/utilities/lib/geometry_utils.pxd":112
16078  *     cdef np.uint64_t pidx[3]
16079  *     # cdef np.uint64_t qidx[3]
16080  *     for j in range(3):             # <<<<<<<<<<<<<<
16081  *         pidx[j] = 0
16082  *         # qidx[j] = 0
16083  */
16084   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
16085     __pyx_v_j = __pyx_t_1;
16086 
16087     /* "yt/utilities/lib/geometry_utils.pxd":113
16088  *     # cdef np.uint64_t qidx[3]
16089  *     for j in range(3):
16090  *         pidx[j] = 0             # <<<<<<<<<<<<<<
16091  *         # qidx[j] = 0
16092  *     cdef np.uint64_t pidx_next[3]
16093  */
16094     (__pyx_v_pidx[__pyx_v_j]) = 0;
16095   }
16096 
16097   /* "yt/utilities/lib/geometry_utils.pxd":119
16098  *     cdef np.float64_t dds[3]
16099  *     cdef np.float64_t rad
16100  *     cdef int lvl = 0             # <<<<<<<<<<<<<<
16101  *     cdef int done = 0
16102  *     while not done:
16103  */
16104   __pyx_v_lvl = 0;
16105 
16106   /* "yt/utilities/lib/geometry_utils.pxd":120
16107  *     cdef np.float64_t rad
16108  *     cdef int lvl = 0
16109  *     cdef int done = 0             # <<<<<<<<<<<<<<
16110  *     while not done:
16111  *         if (lvl+1 >= order):
16112  */
16113   __pyx_v_done = 0;
16114 
16115   /* "yt/utilities/lib/geometry_utils.pxd":121
16116  *     cdef int lvl = 0
16117  *     cdef int done = 0
16118  *     while not done:             # <<<<<<<<<<<<<<
16119  *         if (lvl+1 >= order):
16120  *             done = 1
16121  */
16122   while (1) {
16123     __pyx_t_2 = ((!(__pyx_v_done != 0)) != 0);
16124     if (!__pyx_t_2) break;
16125 
16126     /* "yt/utilities/lib/geometry_utils.pxd":122
16127  *     cdef int done = 0
16128  *     while not done:
16129  *         if (lvl+1 >= order):             # <<<<<<<<<<<<<<
16130  *             done = 1
16131  *         for j in range(3):
16132  */
16133     __pyx_t_2 = (((__pyx_v_lvl + 1) >= __pyx_v_order) != 0);
16134     if (__pyx_t_2) {
16135 
16136       /* "yt/utilities/lib/geometry_utils.pxd":123
16137  *     while not done:
16138  *         if (lvl+1 >= order):
16139  *             done = 1             # <<<<<<<<<<<<<<
16140  *         for j in range(3):
16141  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
16142  */
16143       __pyx_v_done = 1;
16144 
16145       /* "yt/utilities/lib/geometry_utils.pxd":122
16146  *     cdef int done = 0
16147  *     while not done:
16148  *         if (lvl+1 >= order):             # <<<<<<<<<<<<<<
16149  *             done = 1
16150  *         for j in range(3):
16151  */
16152     }
16153 
16154     /* "yt/utilities/lib/geometry_utils.pxd":124
16155  *         if (lvl+1 >= order):
16156  *             done = 1
16157  *         for j in range(3):             # <<<<<<<<<<<<<<
16158  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
16159  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
16160  */
16161     for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
16162       __pyx_v_j = __pyx_t_1;
16163 
16164       /* "yt/utilities/lib/geometry_utils.pxd":125
16165  *             done = 1
16166  *         for j in range(3):
16167  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))             # <<<<<<<<<<<<<<
16168  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
16169  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
16170  */
16171       (__pyx_v_dds[__pyx_v_j]) = (((__pyx_v_DRE[__pyx_v_j]) - (__pyx_v_DLE[__pyx_v_j])) / (1 << (((int)__pyx_v_lvl) + 1)));
16172 
16173       /* "yt/utilities/lib/geometry_utils.pxd":126
16174  *         for j in range(3):
16175  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
16176  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])             # <<<<<<<<<<<<<<
16177  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
16178  *         for j in range(3):
16179  */
16180       (__pyx_v_pidx_next[__pyx_v_j]) = ((__pyx_t_5numpy_uint64_t)(((__pyx_v_p[__pyx_v_j]) - (__pyx_v_DLE[__pyx_v_j])) / (__pyx_v_dds[__pyx_v_j])));
16181 
16182       /* "yt/utilities/lib/geometry_utils.pxd":127
16183  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
16184  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
16185  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])             # <<<<<<<<<<<<<<
16186  *         for j in range(3):
16187  *             if pidx_next[j]!=qidx_next[j]:
16188  */
16189       (__pyx_v_qidx_next[__pyx_v_j]) = ((__pyx_t_5numpy_uint64_t)(((__pyx_v_q[__pyx_v_j]) - (__pyx_v_DLE[__pyx_v_j])) / (__pyx_v_dds[__pyx_v_j])));
16190     }
16191 
16192     /* "yt/utilities/lib/geometry_utils.pxd":128
16193  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
16194  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
16195  *         for j in range(3):             # <<<<<<<<<<<<<<
16196  *             if pidx_next[j]!=qidx_next[j]:
16197  *                 done = 1
16198  */
16199     for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
16200       __pyx_v_j = __pyx_t_1;
16201 
16202       /* "yt/utilities/lib/geometry_utils.pxd":129
16203  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
16204  *         for j in range(3):
16205  *             if pidx_next[j]!=qidx_next[j]:             # <<<<<<<<<<<<<<
16206  *                 done = 1
16207  *                 break
16208  */
16209       __pyx_t_2 = (((__pyx_v_pidx_next[__pyx_v_j]) != (__pyx_v_qidx_next[__pyx_v_j])) != 0);
16210       if (__pyx_t_2) {
16211 
16212         /* "yt/utilities/lib/geometry_utils.pxd":130
16213  *         for j in range(3):
16214  *             if pidx_next[j]!=qidx_next[j]:
16215  *                 done = 1             # <<<<<<<<<<<<<<
16216  *                 break
16217  *         if not done:
16218  */
16219         __pyx_v_done = 1;
16220 
16221         /* "yt/utilities/lib/geometry_utils.pxd":131
16222  *             if pidx_next[j]!=qidx_next[j]:
16223  *                 done = 1
16224  *                 break             # <<<<<<<<<<<<<<
16225  *         if not done:
16226  *             for j in range(3):
16227  */
16228         goto __pyx_L11_break;
16229 
16230         /* "yt/utilities/lib/geometry_utils.pxd":129
16231  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
16232  *         for j in range(3):
16233  *             if pidx_next[j]!=qidx_next[j]:             # <<<<<<<<<<<<<<
16234  *                 done = 1
16235  *                 break
16236  */
16237       }
16238     }
16239     __pyx_L11_break:;
16240 
16241     /* "yt/utilities/lib/geometry_utils.pxd":132
16242  *                 done = 1
16243  *                 break
16244  *         if not done:             # <<<<<<<<<<<<<<
16245  *             for j in range(3):
16246  *                 pidx[j] = pidx_next[j]
16247  */
16248     __pyx_t_2 = ((!(__pyx_v_done != 0)) != 0);
16249     if (__pyx_t_2) {
16250 
16251       /* "yt/utilities/lib/geometry_utils.pxd":133
16252  *                 break
16253  *         if not done:
16254  *             for j in range(3):             # <<<<<<<<<<<<<<
16255  *                 pidx[j] = pidx_next[j]
16256  *                 # qidx[j] = qidx_next[j]
16257  */
16258       for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
16259         __pyx_v_j = __pyx_t_1;
16260 
16261         /* "yt/utilities/lib/geometry_utils.pxd":134
16262  *         if not done:
16263  *             for j in range(3):
16264  *                 pidx[j] = pidx_next[j]             # <<<<<<<<<<<<<<
16265  *                 # qidx[j] = qidx_next[j]
16266  *             lvl+=1
16267  */
16268         (__pyx_v_pidx[__pyx_v_j]) = (__pyx_v_pidx_next[__pyx_v_j]);
16269       }
16270 
16271       /* "yt/utilities/lib/geometry_utils.pxd":136
16272  *                 pidx[j] = pidx_next[j]
16273  *                 # qidx[j] = qidx_next[j]
16274  *             lvl+=1             # <<<<<<<<<<<<<<
16275  *     rad = 0.0
16276  *     for j in range(3):
16277  */
16278       __pyx_v_lvl = (__pyx_v_lvl + 1);
16279 
16280       /* "yt/utilities/lib/geometry_utils.pxd":132
16281  *                 done = 1
16282  *                 break
16283  *         if not done:             # <<<<<<<<<<<<<<
16284  *             for j in range(3):
16285  *                 pidx[j] = pidx_next[j]
16286  */
16287     }
16288   }
16289 
16290   /* "yt/utilities/lib/geometry_utils.pxd":137
16291  *                 # qidx[j] = qidx_next[j]
16292  *             lvl+=1
16293  *     rad = 0.0             # <<<<<<<<<<<<<<
16294  *     for j in range(3):
16295  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
16296  */
16297   __pyx_v_rad = 0.0;
16298 
16299   /* "yt/utilities/lib/geometry_utils.pxd":138
16300  *             lvl+=1
16301  *     rad = 0.0
16302  *     for j in range(3):             # <<<<<<<<<<<<<<
16303  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
16304  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
16305  */
16306   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
16307     __pyx_v_j = __pyx_t_1;
16308 
16309     /* "yt/utilities/lib/geometry_utils.pxd":139
16310  *     rad = 0.0
16311  *     for j in range(3):
16312  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)             # <<<<<<<<<<<<<<
16313  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
16314  *         rad+=((dds[j]/2.0)**2)
16315  */
16316     (__pyx_v_dds[__pyx_v_j]) = (((__pyx_v_DRE[__pyx_v_j]) - (__pyx_v_DLE[__pyx_v_j])) / (1 << __pyx_v_lvl));
16317 
16318     /* "yt/utilities/lib/geometry_utils.pxd":140
16319  *     for j in range(3):
16320  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
16321  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)             # <<<<<<<<<<<<<<
16322  *         rad+=((dds[j]/2.0)**2)
16323  *     cx[0] = c[0]
16324  */
16325     (__pyx_v_c[__pyx_v_j]) = ((__pyx_v_dds[__pyx_v_j]) * (((__pyx_t_5numpy_float64_t)(__pyx_v_pidx[__pyx_v_j])) + 0.5));
16326 
16327     /* "yt/utilities/lib/geometry_utils.pxd":141
16328  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
16329  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
16330  *         rad+=((dds[j]/2.0)**2)             # <<<<<<<<<<<<<<
16331  *     cx[0] = c[0]
16332  *     cy[0] = c[1]
16333  */
16334     __pyx_v_rad = (__pyx_v_rad + pow(((__pyx_v_dds[__pyx_v_j]) / 2.0), 2.0));
16335   }
16336 
16337   /* "yt/utilities/lib/geometry_utils.pxd":142
16338  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
16339  *         rad+=((dds[j]/2.0)**2)
16340  *     cx[0] = c[0]             # <<<<<<<<<<<<<<
16341  *     cy[0] = c[1]
16342  *     cz[0] = c[2]
16343  */
16344   (__pyx_v_cx[0]) = (__pyx_v_c[0]);
16345 
16346   /* "yt/utilities/lib/geometry_utils.pxd":143
16347  *         rad+=((dds[j]/2.0)**2)
16348  *     cx[0] = c[0]
16349  *     cy[0] = c[1]             # <<<<<<<<<<<<<<
16350  *     cz[0] = c[2]
16351  *     return sqrt(rad)
16352  */
16353   (__pyx_v_cy[0]) = (__pyx_v_c[1]);
16354 
16355   /* "yt/utilities/lib/geometry_utils.pxd":144
16356  *     cx[0] = c[0]
16357  *     cy[0] = c[1]
16358  *     cz[0] = c[2]             # <<<<<<<<<<<<<<
16359  *     return sqrt(rad)
16360  *
16361  */
16362   (__pyx_v_cz[0]) = (__pyx_v_c[2]);
16363 
16364   /* "yt/utilities/lib/geometry_utils.pxd":145
16365  *     cy[0] = c[1]
16366  *     cz[0] = c[2]
16367  *     return sqrt(rad)             # <<<<<<<<<<<<<<
16368  *
16369  * #-----------------------------------------------------------------------------
16370  */
16371   __pyx_r = sqrt(__pyx_v_rad);
16372   goto __pyx_L0;
16373 
16374   /* "yt/utilities/lib/geometry_utils.pxd":105
16375  * @cython.boundscheck(False)
16376  * @cython.wraparound(False)
16377  * cdef inline np.float64_t smallest_quadtree_box(np.float64_t p[3], np.float64_t q[3], np.int32_t order,             # <<<<<<<<<<<<<<
16378  *                                                np.float64_t DLE[3], np.float64_t DRE[3],
16379  *                                                np.float64_t *cx, np.float64_t *cy, np.float64_t *cz):
16380  */
16381 
16382   /* function exit code */
16383   __pyx_L0:;
16384   __Pyx_RefNannyFinishContext();
16385   return __pyx_r;
16386 }
16387 
16388 /* "yt/utilities/lib/geometry_utils.pxd":152
16389  * @cython.boundscheck(False)
16390  * @cython.wraparound(False)
16391  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):             # <<<<<<<<<<<<<<
16392  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
16393  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)
16394  */
16395 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by3(__pyx_t_5numpy_uint64_t __pyx_v_x)16396 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by3(__pyx_t_5numpy_uint64_t __pyx_v_x) {
16397   __pyx_t_5numpy_uint64_t __pyx_r;
16398   __Pyx_RefNannyDeclarations
16399   __Pyx_RefNannySetupContext("spread_64bits_by3", 0);
16400 
16401   /* "yt/utilities/lib/geometry_utils.pxd":153
16402  * @cython.wraparound(False)
16403  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):
16404  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))             # <<<<<<<<<<<<<<
16405  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)
16406  *
16407  */
16408   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint64_t)0x00000000001FFFFF));
16409 
16410   /* "yt/utilities/lib/geometry_utils.pxd":154
16411  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):
16412  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
16413  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)             # <<<<<<<<<<<<<<
16414  *
16415  * #-----------------------------------------------------------------------------
16416  */
16417   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 20)) * ((__pyx_t_5numpy_uint64_t)0x000001FFC00003FF));
16418 
16419   /* "yt/utilities/lib/geometry_utils.pxd":152
16420  * @cython.boundscheck(False)
16421  * @cython.wraparound(False)
16422  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):             # <<<<<<<<<<<<<<
16423  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
16424  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)
16425  */
16426 
16427   /* function exit code */
16428   __pyx_r = 0;
16429   __Pyx_RefNannyFinishContext();
16430   return __pyx_r;
16431 }
16432 
16433 /* "yt/utilities/lib/geometry_utils.pxd":161
16434  * @cython.boundscheck(False)
16435  * @cython.wraparound(False)
16436  * cdef inline np.uint64_t spread_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
16437  *     # This magic comes from http://stackoverflow.com/questions/1024754/how-to-compute-a-3d-morton-number-interleave-the-bits-of-3-ints
16438  *     # Only reversible up to 2097151
16439  */
16440 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_t_5numpy_uint64_t __pyx_v_x)16441 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_t_5numpy_uint64_t __pyx_v_x) {
16442   __pyx_t_5numpy_uint64_t __pyx_r;
16443   __Pyx_RefNannyDeclarations
16444   __Pyx_RefNannySetupContext("spread_64bits_by2", 0);
16445 
16446   /* "yt/utilities/lib/geometry_utils.pxd":166
16447  *     # Select highest 21 bits (Required to be reversible to 21st bit)
16448  *     # x = ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---k jihg fedc ba98 7654 3210
16449  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))             # <<<<<<<<<<<<<<
16450  *     # x = ---- ---- ---- ---- ---- ---k jihg fedc ba-- ---- ---- ---- ---- --98 7654 3210
16451  *     x=(x|(x<<20))&(<np.uint64_t>0x000001FFC00003FF)
16452  */
16453   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint64_t)0x00000000001FFFFF));
16454 
16455   /* "yt/utilities/lib/geometry_utils.pxd":168
16456  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
16457  *     # x = ---- ---- ---- ---- ---- ---k jihg fedc ba-- ---- ---- ---- ---- --98 7654 3210
16458  *     x=(x|(x<<20))&(<np.uint64_t>0x000001FFC00003FF)             # <<<<<<<<<<<<<<
16459  *     # x = ---- ---- ---- -kji hgf- ---- ---- -edc ba-- ---- ---- 9876 5--- ---- ---4 3210
16460  *     x=(x|(x<<10))&(<np.uint64_t>0x0007E007C00F801F)
16461  */
16462   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 20)) & ((__pyx_t_5numpy_uint64_t)0x000001FFC00003FF));
16463 
16464   /* "yt/utilities/lib/geometry_utils.pxd":170
16465  *     x=(x|(x<<20))&(<np.uint64_t>0x000001FFC00003FF)
16466  *     # x = ---- ---- ---- -kji hgf- ---- ---- -edc ba-- ---- ---- 9876 5--- ---- ---4 3210
16467  *     x=(x|(x<<10))&(<np.uint64_t>0x0007E007C00F801F)             # <<<<<<<<<<<<<<
16468  *     # x = ---- ---- -kji h--- -gf- ---- -edc ---- ba-- ---- 987- ---6 5--- ---4 32-- --10
16469  *     x=(x|(x<<4))&(<np.uint64_t>0x00786070C0E181C3)
16470  */
16471   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 10)) & ((__pyx_t_5numpy_uint64_t)0x0007E007C00F801F));
16472 
16473   /* "yt/utilities/lib/geometry_utils.pxd":172
16474  *     x=(x|(x<<10))&(<np.uint64_t>0x0007E007C00F801F)
16475  *     # x = ---- ---- -kji h--- -gf- ---- -edc ---- ba-- ---- 987- ---6 5--- ---4 32-- --10
16476  *     x=(x|(x<<4))&(<np.uint64_t>0x00786070C0E181C3)             # <<<<<<<<<<<<<<
16477  *     # x = ---- ---k ji-- h--g --f- ---e d--c --b- -a-- --98 --7- -6-- 5--- -43- -2-- 1--0
16478  *     x=(x|(x<<2))&(<np.uint64_t>0x0199219243248649)
16479  */
16480   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 4)) & ((__pyx_t_5numpy_uint64_t)0x00786070C0E181C3));
16481 
16482   /* "yt/utilities/lib/geometry_utils.pxd":174
16483  *     x=(x|(x<<4))&(<np.uint64_t>0x00786070C0E181C3)
16484  *     # x = ---- ---k ji-- h--g --f- ---e d--c --b- -a-- --98 --7- -6-- 5--- -43- -2-- 1--0
16485  *     x=(x|(x<<2))&(<np.uint64_t>0x0199219243248649)             # <<<<<<<<<<<<<<
16486  *     # x = ---- -kj- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16487  *     x=(x|(x<<2))&(<np.uint64_t>0x0649249249249249)
16488  */
16489   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint64_t)0x0199219243248649));
16490 
16491   /* "yt/utilities/lib/geometry_utils.pxd":176
16492  *     x=(x|(x<<2))&(<np.uint64_t>0x0199219243248649)
16493  *     # x = ---- -kj- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16494  *     x=(x|(x<<2))&(<np.uint64_t>0x0649249249249249)             # <<<<<<<<<<<<<<
16495  *     # x = ---k --j- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16496  *     x=(x|(x<<2))&(<np.uint64_t>0x1249249249249249)
16497  */
16498   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint64_t)0x0649249249249249));
16499 
16500   /* "yt/utilities/lib/geometry_utils.pxd":178
16501  *     x=(x|(x<<2))&(<np.uint64_t>0x0649249249249249)
16502  *     # x = ---k --j- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16503  *     x=(x|(x<<2))&(<np.uint64_t>0x1249249249249249)             # <<<<<<<<<<<<<<
16504  *     return x
16505  *
16506  */
16507   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint64_t)0x1249249249249249));
16508 
16509   /* "yt/utilities/lib/geometry_utils.pxd":179
16510  *     # x = ---k --j- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16511  *     x=(x|(x<<2))&(<np.uint64_t>0x1249249249249249)
16512  *     return x             # <<<<<<<<<<<<<<
16513  *
16514  * @cython.cdivision(True)
16515  */
16516   __pyx_r = __pyx_v_x;
16517   goto __pyx_L0;
16518 
16519   /* "yt/utilities/lib/geometry_utils.pxd":161
16520  * @cython.boundscheck(False)
16521  * @cython.wraparound(False)
16522  * cdef inline np.uint64_t spread_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
16523  *     # This magic comes from http://stackoverflow.com/questions/1024754/how-to-compute-a-3d-morton-number-interleave-the-bits-of-3-ints
16524  *     # Only reversible up to 2097151
16525  */
16526 
16527   /* function exit code */
16528   __pyx_L0:;
16529   __Pyx_RefNannyFinishContext();
16530   return __pyx_r;
16531 }
16532 
16533 /* "yt/utilities/lib/geometry_utils.pxd":184
16534  * @cython.boundscheck(False)
16535  * @cython.wraparound(False)
16536  * cdef inline np.uint64_t compact_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
16537  *     # Reversed magic
16538  *     x=x&(<np.uint64_t>0x1249249249249249)
16539  */
16540 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2(__pyx_t_5numpy_uint64_t __pyx_v_x)16541 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2(__pyx_t_5numpy_uint64_t __pyx_v_x) {
16542   __pyx_t_5numpy_uint64_t __pyx_r;
16543   __Pyx_RefNannyDeclarations
16544   __Pyx_RefNannySetupContext("compact_64bits_by2", 0);
16545 
16546   /* "yt/utilities/lib/geometry_utils.pxd":186
16547  * cdef inline np.uint64_t compact_64bits_by2(np.uint64_t x):
16548  *     # Reversed magic
16549  *     x=x&(<np.uint64_t>0x1249249249249249)             # <<<<<<<<<<<<<<
16550  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)
16551  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
16552  */
16553   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint64_t)0x1249249249249249));
16554 
16555   /* "yt/utilities/lib/geometry_utils.pxd":187
16556  *     # Reversed magic
16557  *     x=x&(<np.uint64_t>0x1249249249249249)
16558  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)             # <<<<<<<<<<<<<<
16559  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
16560  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
16561  */
16562   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint64_t)0x0649249249249249));
16563 
16564   /* "yt/utilities/lib/geometry_utils.pxd":188
16565  *     x=x&(<np.uint64_t>0x1249249249249249)
16566  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)
16567  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)             # <<<<<<<<<<<<<<
16568  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
16569  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
16570  */
16571   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint64_t)0x0199219243248649));
16572 
16573   /* "yt/utilities/lib/geometry_utils.pxd":189
16574  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)
16575  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
16576  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)             # <<<<<<<<<<<<<<
16577  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
16578  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
16579  */
16580   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint64_t)0x00786070C0E181C3));
16581 
16582   /* "yt/utilities/lib/geometry_utils.pxd":190
16583  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
16584  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
16585  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)             # <<<<<<<<<<<<<<
16586  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
16587  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)
16588  */
16589   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 4)) & ((__pyx_t_5numpy_uint64_t)0x0007E007C00F801F));
16590 
16591   /* "yt/utilities/lib/geometry_utils.pxd":191
16592  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
16593  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
16594  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)             # <<<<<<<<<<<<<<
16595  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)
16596  *     return x
16597  */
16598   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 10)) & ((__pyx_t_5numpy_uint64_t)0x000001FFC00003FF));
16599 
16600   /* "yt/utilities/lib/geometry_utils.pxd":192
16601  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
16602  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
16603  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)             # <<<<<<<<<<<<<<
16604  *     return x
16605  *
16606  */
16607   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 20)) & ((__pyx_t_5numpy_uint64_t)0x00000000001FFFFF));
16608 
16609   /* "yt/utilities/lib/geometry_utils.pxd":193
16610  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
16611  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)
16612  *     return x             # <<<<<<<<<<<<<<
16613  *
16614  * #-----------------------------------------------------------------------------
16615  */
16616   __pyx_r = __pyx_v_x;
16617   goto __pyx_L0;
16618 
16619   /* "yt/utilities/lib/geometry_utils.pxd":184
16620  * @cython.boundscheck(False)
16621  * @cython.wraparound(False)
16622  * cdef inline np.uint64_t compact_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
16623  *     # Reversed magic
16624  *     x=x&(<np.uint64_t>0x1249249249249249)
16625  */
16626 
16627   /* function exit code */
16628   __pyx_L0:;
16629   __Pyx_RefNannyFinishContext();
16630   return __pyx_r;
16631 }
16632 
16633 /* "yt/utilities/lib/geometry_utils.pxd":200
16634  * @cython.boundscheck(False)
16635  * @cython.wraparound(False)
16636  * cdef inline np.uint32_t spread_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
16637  *     # Only reversible up to 1023
16638  *     # Select highest 10 bits (Required to be reversible to 10st bit)
16639  */
16640 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_32bits_by2(__pyx_t_5numpy_uint32_t __pyx_v_x)16641 static CYTHON_INLINE __pyx_t_5numpy_uint32_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_32bits_by2(__pyx_t_5numpy_uint32_t __pyx_v_x) {
16642   __pyx_t_5numpy_uint32_t __pyx_r;
16643   __Pyx_RefNannyDeclarations
16644   __Pyx_RefNannySetupContext("spread_32bits_by2", 0);
16645 
16646   /* "yt/utilities/lib/geometry_utils.pxd":204
16647  *     # Select highest 10 bits (Required to be reversible to 10st bit)
16648  *     # x = ---- ---- ---- ---- ---- --98 7654 3210
16649  *     x=(x&(<np.uint32_t>0x000003FF))             # <<<<<<<<<<<<<<
16650  *     # x = ---- --98 ---- ---- ---- ---- 7654 3210
16651  *     x=(x|(x<<16))&(<np.uint32_t>0xFF0000FF)
16652  */
16653   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint32_t)0x000003FF));
16654 
16655   /* "yt/utilities/lib/geometry_utils.pxd":206
16656  *     x=(x&(<np.uint32_t>0x000003FF))
16657  *     # x = ---- --98 ---- ---- ---- ---- 7654 3210
16658  *     x=(x|(x<<16))&(<np.uint32_t>0xFF0000FF)             # <<<<<<<<<<<<<<
16659  *     # x = ---- --98 ---- ---- 7654 ---- ---- 3210
16660  *     x=(x|(x<<8))&(<np.uint32_t>0x0300F00F)
16661  */
16662   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 16)) & ((__pyx_t_5numpy_uint32_t)0xFF0000FF));
16663 
16664   /* "yt/utilities/lib/geometry_utils.pxd":208
16665  *     x=(x|(x<<16))&(<np.uint32_t>0xFF0000FF)
16666  *     # x = ---- --98 ---- ---- 7654 ---- ---- 3210
16667  *     x=(x|(x<<8))&(<np.uint32_t>0x0300F00F)             # <<<<<<<<<<<<<<
16668  *     # x = ---- --98 ---- 76-- --54 ---- 32-- --10
16669  *     x=(x|(x<<4))&(<np.uint32_t>0x030C30C3)
16670  */
16671   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 8)) & ((__pyx_t_5numpy_uint32_t)0x0300F00F));
16672 
16673   /* "yt/utilities/lib/geometry_utils.pxd":210
16674  *     x=(x|(x<<8))&(<np.uint32_t>0x0300F00F)
16675  *     # x = ---- --98 ---- 76-- --54 ---- 32-- --10
16676  *     x=(x|(x<<4))&(<np.uint32_t>0x030C30C3)             # <<<<<<<<<<<<<<
16677  *     # x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16678  *     x=(x|(x<<2))&(<np.uint32_t>0x09249249)
16679  */
16680   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 4)) & ((__pyx_t_5numpy_uint32_t)0x030C30C3));
16681 
16682   /* "yt/utilities/lib/geometry_utils.pxd":212
16683  *     x=(x|(x<<4))&(<np.uint32_t>0x030C30C3)
16684  *     # x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16685  *     x=(x|(x<<2))&(<np.uint32_t>0x09249249)             # <<<<<<<<<<<<<<
16686  *     return x
16687  *
16688  */
16689   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint32_t)0x09249249));
16690 
16691   /* "yt/utilities/lib/geometry_utils.pxd":213
16692  *     # x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
16693  *     x=(x|(x<<2))&(<np.uint32_t>0x09249249)
16694  *     return x             # <<<<<<<<<<<<<<
16695  *
16696  * @cython.cdivision(True)
16697  */
16698   __pyx_r = __pyx_v_x;
16699   goto __pyx_L0;
16700 
16701   /* "yt/utilities/lib/geometry_utils.pxd":200
16702  * @cython.boundscheck(False)
16703  * @cython.wraparound(False)
16704  * cdef inline np.uint32_t spread_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
16705  *     # Only reversible up to 1023
16706  *     # Select highest 10 bits (Required to be reversible to 10st bit)
16707  */
16708 
16709   /* function exit code */
16710   __pyx_L0:;
16711   __Pyx_RefNannyFinishContext();
16712   return __pyx_r;
16713 }
16714 
16715 /* "yt/utilities/lib/geometry_utils.pxd":218
16716  * @cython.boundscheck(False)
16717  * @cython.wraparound(False)
16718  * cdef inline np.uint32_t compact_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
16719  *     # Reversed magic
16720  *     x=x&(<np.uint32_t>0x09249249)
16721  */
16722 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_32bits_by2(__pyx_t_5numpy_uint32_t __pyx_v_x)16723 static CYTHON_INLINE __pyx_t_5numpy_uint32_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_32bits_by2(__pyx_t_5numpy_uint32_t __pyx_v_x) {
16724   __pyx_t_5numpy_uint32_t __pyx_r;
16725   __Pyx_RefNannyDeclarations
16726   __Pyx_RefNannySetupContext("compact_32bits_by2", 0);
16727 
16728   /* "yt/utilities/lib/geometry_utils.pxd":220
16729  * cdef inline np.uint32_t compact_32bits_by2(np.uint32_t x):
16730  *     # Reversed magic
16731  *     x=x&(<np.uint32_t>0x09249249)             # <<<<<<<<<<<<<<
16732  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)
16733  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
16734  */
16735   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint32_t)0x09249249));
16736 
16737   /* "yt/utilities/lib/geometry_utils.pxd":221
16738  *     # Reversed magic
16739  *     x=x&(<np.uint32_t>0x09249249)
16740  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)             # <<<<<<<<<<<<<<
16741  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
16742  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
16743  */
16744   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint32_t)0x030C30C3));
16745 
16746   /* "yt/utilities/lib/geometry_utils.pxd":222
16747  *     x=x&(<np.uint32_t>0x09249249)
16748  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)
16749  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)             # <<<<<<<<<<<<<<
16750  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
16751  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)
16752  */
16753   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 4)) & ((__pyx_t_5numpy_uint32_t)0x0300F00F));
16754 
16755   /* "yt/utilities/lib/geometry_utils.pxd":223
16756  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)
16757  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
16758  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)             # <<<<<<<<<<<<<<
16759  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)
16760  *     return x
16761  */
16762   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 8)) & ((__pyx_t_5numpy_uint32_t)0xFF0000FF));
16763 
16764   /* "yt/utilities/lib/geometry_utils.pxd":224
16765  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
16766  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
16767  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)             # <<<<<<<<<<<<<<
16768  *     return x
16769  *
16770  */
16771   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 16)) & ((__pyx_t_5numpy_uint32_t)0x000003FF));
16772 
16773   /* "yt/utilities/lib/geometry_utils.pxd":225
16774  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
16775  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)
16776  *     return x             # <<<<<<<<<<<<<<
16777  *
16778  * @cython.cdivision(True)
16779  */
16780   __pyx_r = __pyx_v_x;
16781   goto __pyx_L0;
16782 
16783   /* "yt/utilities/lib/geometry_utils.pxd":218
16784  * @cython.boundscheck(False)
16785  * @cython.wraparound(False)
16786  * cdef inline np.uint32_t compact_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
16787  *     # Reversed magic
16788  *     x=x&(<np.uint32_t>0x09249249)
16789  */
16790 
16791   /* function exit code */
16792   __pyx_L0:;
16793   __Pyx_RefNannyFinishContext();
16794   return __pyx_r;
16795 }
16796 
16797 /* "yt/utilities/lib/geometry_utils.pxd":230
16798  * @cython.boundscheck(False)
16799  * @cython.wraparound(False)
16800  * cdef inline np.uint64_t masked_merge_64bit(np.uint64_t a, np.uint64_t b, np.uint64_t mask):             # <<<<<<<<<<<<<<
16801  *     # https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
16802  *     return a ^ ((a ^ b) & mask)
16803  */
16804 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_masked_merge_64bit(__pyx_t_5numpy_uint64_t __pyx_v_a,__pyx_t_5numpy_uint64_t __pyx_v_b,__pyx_t_5numpy_uint64_t __pyx_v_mask)16805 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_masked_merge_64bit(__pyx_t_5numpy_uint64_t __pyx_v_a, __pyx_t_5numpy_uint64_t __pyx_v_b, __pyx_t_5numpy_uint64_t __pyx_v_mask) {
16806   __pyx_t_5numpy_uint64_t __pyx_r;
16807   __Pyx_RefNannyDeclarations
16808   __Pyx_RefNannySetupContext("masked_merge_64bit", 0);
16809 
16810   /* "yt/utilities/lib/geometry_utils.pxd":232
16811  * cdef inline np.uint64_t masked_merge_64bit(np.uint64_t a, np.uint64_t b, np.uint64_t mask):
16812  *     # https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
16813  *     return a ^ ((a ^ b) & mask)             # <<<<<<<<<<<<<<
16814  *
16815  * @cython.cdivision(True)
16816  */
16817   __pyx_r = (__pyx_v_a ^ ((__pyx_v_a ^ __pyx_v_b) & __pyx_v_mask));
16818   goto __pyx_L0;
16819 
16820   /* "yt/utilities/lib/geometry_utils.pxd":230
16821  * @cython.boundscheck(False)
16822  * @cython.wraparound(False)
16823  * cdef inline np.uint64_t masked_merge_64bit(np.uint64_t a, np.uint64_t b, np.uint64_t mask):             # <<<<<<<<<<<<<<
16824  *     # https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
16825  *     return a ^ ((a ^ b) & mask)
16826  */
16827 
16828   /* function exit code */
16829   __pyx_L0:;
16830   __Pyx_RefNannyFinishContext();
16831   return __pyx_r;
16832 }
16833 
16834 /* "yt/utilities/lib/geometry_utils.pxd":235
16835  *
16836  * @cython.cdivision(True)
16837  * cdef inline np.uint64_t encode_morton_64bit(np.uint64_t x_ind, np.uint64_t y_ind, np.uint64_t z_ind):             # <<<<<<<<<<<<<<
16838  *     cdef np.uint64_t mi
16839  *     mi = 0
16840  */
16841 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_t_5numpy_uint64_t __pyx_v_x_ind,__pyx_t_5numpy_uint64_t __pyx_v_y_ind,__pyx_t_5numpy_uint64_t __pyx_v_z_ind)16842 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_t_5numpy_uint64_t __pyx_v_x_ind, __pyx_t_5numpy_uint64_t __pyx_v_y_ind, __pyx_t_5numpy_uint64_t __pyx_v_z_ind) {
16843   __pyx_t_5numpy_uint64_t __pyx_v_mi;
16844   __pyx_t_5numpy_uint64_t __pyx_r;
16845   __Pyx_RefNannyDeclarations
16846   __Pyx_RefNannySetupContext("encode_morton_64bit", 0);
16847 
16848   /* "yt/utilities/lib/geometry_utils.pxd":237
16849  * cdef inline np.uint64_t encode_morton_64bit(np.uint64_t x_ind, np.uint64_t y_ind, np.uint64_t z_ind):
16850  *     cdef np.uint64_t mi
16851  *     mi = 0             # <<<<<<<<<<<<<<
16852  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT
16853  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
16854  */
16855   __pyx_v_mi = 0;
16856 
16857   /* "yt/utilities/lib/geometry_utils.pxd":238
16858  *     cdef np.uint64_t mi
16859  *     mi = 0
16860  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT             # <<<<<<<<<<<<<<
16861  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
16862  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT
16863  */
16864   __pyx_v_mi = (__pyx_v_mi | (__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_v_z_ind) << 0));
16865 
16866   /* "yt/utilities/lib/geometry_utils.pxd":239
16867  *     mi = 0
16868  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT
16869  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT             # <<<<<<<<<<<<<<
16870  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT
16871  *     return mi
16872  */
16873   __pyx_v_mi = (__pyx_v_mi | (__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_v_y_ind) << 1));
16874 
16875   /* "yt/utilities/lib/geometry_utils.pxd":240
16876  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT
16877  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
16878  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT             # <<<<<<<<<<<<<<
16879  *     return mi
16880  *
16881  */
16882   __pyx_v_mi = (__pyx_v_mi | (__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_v_x_ind) << 2));
16883 
16884   /* "yt/utilities/lib/geometry_utils.pxd":241
16885  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
16886  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT
16887  *     return mi             # <<<<<<<<<<<<<<
16888  *
16889  * @cython.cdivision(True)
16890  */
16891   __pyx_r = __pyx_v_mi;
16892   goto __pyx_L0;
16893 
16894   /* "yt/utilities/lib/geometry_utils.pxd":235
16895  *
16896  * @cython.cdivision(True)
16897  * cdef inline np.uint64_t encode_morton_64bit(np.uint64_t x_ind, np.uint64_t y_ind, np.uint64_t z_ind):             # <<<<<<<<<<<<<<
16898  *     cdef np.uint64_t mi
16899  *     mi = 0
16900  */
16901 
16902   /* function exit code */
16903   __pyx_L0:;
16904   __Pyx_RefNannyFinishContext();
16905   return __pyx_r;
16906 }
16907 
16908 /* "yt/utilities/lib/geometry_utils.pxd":244
16909  *
16910  * @cython.cdivision(True)
16911  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):             # <<<<<<<<<<<<<<
16912  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
16913  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
16914  */
16915 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_decode_morton_64bit(__pyx_t_5numpy_uint64_t __pyx_v_mi,__pyx_t_5numpy_uint64_t * __pyx_v_p)16916 static CYTHON_INLINE void __pyx_f_2yt_9utilities_3lib_14geometry_utils_decode_morton_64bit(__pyx_t_5numpy_uint64_t __pyx_v_mi, __pyx_t_5numpy_uint64_t *__pyx_v_p) {
16917   __Pyx_RefNannyDeclarations
16918   __Pyx_RefNannySetupContext("decode_morton_64bit", 0);
16919 
16920   /* "yt/utilities/lib/geometry_utils.pxd":245
16921  * @cython.cdivision(True)
16922  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):
16923  *     p[0] = compact_64bits_by2(mi>>XSHIFT)             # <<<<<<<<<<<<<<
16924  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
16925  *     p[2] = compact_64bits_by2(mi>>ZSHIFT)
16926  */
16927   (__pyx_v_p[0]) = __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2((__pyx_v_mi >> 2));
16928 
16929   /* "yt/utilities/lib/geometry_utils.pxd":246
16930  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):
16931  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
16932  *     p[1] = compact_64bits_by2(mi>>YSHIFT)             # <<<<<<<<<<<<<<
16933  *     p[2] = compact_64bits_by2(mi>>ZSHIFT)
16934  *
16935  */
16936   (__pyx_v_p[1]) = __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2((__pyx_v_mi >> 1));
16937 
16938   /* "yt/utilities/lib/geometry_utils.pxd":247
16939  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
16940  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
16941  *     p[2] = compact_64bits_by2(mi>>ZSHIFT)             # <<<<<<<<<<<<<<
16942  *
16943  * @cython.cdivision(True)
16944  */
16945   (__pyx_v_p[2]) = __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2((__pyx_v_mi >> 0));
16946 
16947   /* "yt/utilities/lib/geometry_utils.pxd":244
16948  *
16949  * @cython.cdivision(True)
16950  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):             # <<<<<<<<<<<<<<
16951  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
16952  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
16953  */
16954 
16955   /* function exit code */
16956   __Pyx_RefNannyFinishContext();
16957 }
16958 
16959 /* "yt/utilities/lib/geometry_utils.pxd":250
16960  *
16961  * @cython.cdivision(True)
16962  * cdef inline np.uint64_t bounded_morton(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
16963  *                                np.float64_t *DLE, np.float64_t *DRE, np.int32_t order):
16964  *     cdef int i
16965  */
16966 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_float64_t __pyx_v_y,__pyx_t_5numpy_float64_t __pyx_v_z,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_DRE,__pyx_t_5numpy_int32_t __pyx_v_order)16967 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_DRE, __pyx_t_5numpy_int32_t __pyx_v_order) {
16968   int __pyx_v_i;
16969   __pyx_t_5numpy_float64_t __pyx_v_dds[3];
16970   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
16971   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
16972   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
16973   __pyx_t_5numpy_uint64_t __pyx_v_mi;
16974   __pyx_t_5numpy_uint64_t __pyx_r;
16975   __Pyx_RefNannyDeclarations
16976   int __pyx_t_1;
16977   __Pyx_RefNannySetupContext("bounded_morton", 0);
16978 
16979   /* "yt/utilities/lib/geometry_utils.pxd":256
16980  *     cdef np.uint64_t x_ind, y_ind, z_ind
16981  *     cdef np.uint64_t mi
16982  *     for i in range(3):             # <<<<<<<<<<<<<<
16983  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)
16984  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
16985  */
16986   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
16987     __pyx_v_i = __pyx_t_1;
16988 
16989     /* "yt/utilities/lib/geometry_utils.pxd":257
16990  *     cdef np.uint64_t mi
16991  *     for i in range(3):
16992  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)             # <<<<<<<<<<<<<<
16993  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
16994  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
16995  */
16996     (__pyx_v_dds[__pyx_v_i]) = (((__pyx_v_DRE[__pyx_v_i]) - (__pyx_v_DLE[__pyx_v_i])) / (1 << __pyx_v_order));
16997   }
16998 
16999   /* "yt/utilities/lib/geometry_utils.pxd":258
17000  *     for i in range(3):
17001  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)
17002  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])             # <<<<<<<<<<<<<<
17003  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
17004  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17005  */
17006   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds[0])));
17007 
17008   /* "yt/utilities/lib/geometry_utils.pxd":259
17009  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)
17010  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
17011  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])             # <<<<<<<<<<<<<<
17012  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17013  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
17014  */
17015   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds[1])));
17016 
17017   /* "yt/utilities/lib/geometry_utils.pxd":260
17018  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
17019  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
17020  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])             # <<<<<<<<<<<<<<
17021  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
17022  *     return mi
17023  */
17024   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds[2])));
17025 
17026   /* "yt/utilities/lib/geometry_utils.pxd":261
17027  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
17028  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17029  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
17030  *     return mi
17031  *
17032  */
17033   __pyx_v_mi = __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_v_x_ind, __pyx_v_y_ind, __pyx_v_z_ind);
17034 
17035   /* "yt/utilities/lib/geometry_utils.pxd":262
17036  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17037  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
17038  *     return mi             # <<<<<<<<<<<<<<
17039  *
17040  * @cython.cdivision(True)
17041  */
17042   __pyx_r = __pyx_v_mi;
17043   goto __pyx_L0;
17044 
17045   /* "yt/utilities/lib/geometry_utils.pxd":250
17046  *
17047  * @cython.cdivision(True)
17048  * cdef inline np.uint64_t bounded_morton(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17049  *                                np.float64_t *DLE, np.float64_t *DRE, np.int32_t order):
17050  *     cdef int i
17051  */
17052 
17053   /* function exit code */
17054   __pyx_L0:;
17055   __Pyx_RefNannyFinishContext();
17056   return __pyx_r;
17057 }
17058 
17059 /* "yt/utilities/lib/geometry_utils.pxd":265
17060  *
17061  * @cython.cdivision(True)
17062  * cdef inline np.uint64_t bounded_morton_relative(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17063  *                                np.float64_t *DLE, np.float64_t *DRE,
17064  *                                np.int32_t order1, np.int32_t order2):
17065  */
17066 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_relative(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_float64_t __pyx_v_y,__pyx_t_5numpy_float64_t __pyx_v_z,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_DRE,__pyx_t_5numpy_int32_t __pyx_v_order1,__pyx_t_5numpy_int32_t __pyx_v_order2)17067 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_relative(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_DRE, __pyx_t_5numpy_int32_t __pyx_v_order1, __pyx_t_5numpy_int32_t __pyx_v_order2) {
17068   int __pyx_v_i;
17069   __pyx_t_5numpy_float64_t __pyx_v_dds1[3];
17070   __pyx_t_5numpy_float64_t __pyx_v_dds2[3];
17071   __pyx_t_5numpy_float64_t __pyx_v_DLE2[3];
17072   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
17073   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
17074   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
17075   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
17076   __pyx_t_5numpy_uint64_t __pyx_r;
17077   __Pyx_RefNannyDeclarations
17078   int __pyx_t_1;
17079   __Pyx_RefNannySetupContext("bounded_morton_relative", 0);
17080 
17081   /* "yt/utilities/lib/geometry_utils.pxd":274
17082  *     cdef np.uint64_t x_ind, y_ind, z_ind
17083  *     cdef np.uint64_t mi2
17084  *     for i in range(3):             # <<<<<<<<<<<<<<
17085  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)
17086  *         dds2[i] = dds1[i] / (1 << order2)
17087  */
17088   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
17089     __pyx_v_i = __pyx_t_1;
17090 
17091     /* "yt/utilities/lib/geometry_utils.pxd":275
17092  *     cdef np.uint64_t mi2
17093  *     for i in range(3):
17094  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)             # <<<<<<<<<<<<<<
17095  *         dds2[i] = dds1[i] / (1 << order2)
17096  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17097  */
17098     (__pyx_v_dds1[__pyx_v_i]) = (((__pyx_v_DRE[__pyx_v_i]) - (__pyx_v_DLE[__pyx_v_i])) / (1 << __pyx_v_order1));
17099 
17100     /* "yt/utilities/lib/geometry_utils.pxd":276
17101  *     for i in range(3):
17102  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)
17103  *         dds2[i] = dds1[i] / (1 << order2)             # <<<<<<<<<<<<<<
17104  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17105  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17106  */
17107     (__pyx_v_dds2[__pyx_v_i]) = ((__pyx_v_dds1[__pyx_v_i]) / (1 << __pyx_v_order2));
17108   }
17109 
17110   /* "yt/utilities/lib/geometry_utils.pxd":277
17111  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)
17112  *         dds2[i] = dds1[i] / (1 << order2)
17113  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]             # <<<<<<<<<<<<<<
17114  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17115  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17116  */
17117   (__pyx_v_DLE2[0]) = (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds1[0])))) * (__pyx_v_dds1[0]));
17118 
17119   /* "yt/utilities/lib/geometry_utils.pxd":278
17120  *         dds2[i] = dds1[i] / (1 << order2)
17121  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17122  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]             # <<<<<<<<<<<<<<
17123  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17124  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17125  */
17126   (__pyx_v_DLE2[1]) = (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds1[1])))) * (__pyx_v_dds1[1]));
17127 
17128   /* "yt/utilities/lib/geometry_utils.pxd":279
17129  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17130  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17131  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]             # <<<<<<<<<<<<<<
17132  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17133  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17134  */
17135   (__pyx_v_DLE2[2]) = (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds1[2])))) * (__pyx_v_dds1[2]));
17136 
17137   /* "yt/utilities/lib/geometry_utils.pxd":280
17138  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17139  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17140  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])             # <<<<<<<<<<<<<<
17141  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17142  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17143  */
17144   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE2[0])) / (__pyx_v_dds2[0])));
17145 
17146   /* "yt/utilities/lib/geometry_utils.pxd":281
17147  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17148  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17149  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])             # <<<<<<<<<<<<<<
17150  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17151  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
17152  */
17153   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE2[1])) / (__pyx_v_dds2[1])));
17154 
17155   /* "yt/utilities/lib/geometry_utils.pxd":282
17156  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17157  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17158  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])             # <<<<<<<<<<<<<<
17159  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
17160  *     return mi2
17161  */
17162   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE2[2])) / (__pyx_v_dds2[2])));
17163 
17164   /* "yt/utilities/lib/geometry_utils.pxd":283
17165  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17166  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17167  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
17168  *     return mi2
17169  *
17170  */
17171   __pyx_v_mi2 = __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_v_x_ind, __pyx_v_y_ind, __pyx_v_z_ind);
17172 
17173   /* "yt/utilities/lib/geometry_utils.pxd":284
17174  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17175  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
17176  *     return mi2             # <<<<<<<<<<<<<<
17177  *
17178  *
17179  */
17180   __pyx_r = __pyx_v_mi2;
17181   goto __pyx_L0;
17182 
17183   /* "yt/utilities/lib/geometry_utils.pxd":265
17184  *
17185  * @cython.cdivision(True)
17186  * cdef inline np.uint64_t bounded_morton_relative(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17187  *                                np.float64_t *DLE, np.float64_t *DRE,
17188  *                                np.int32_t order1, np.int32_t order2):
17189  */
17190 
17191   /* function exit code */
17192   __pyx_L0:;
17193   __Pyx_RefNannyFinishContext();
17194   return __pyx_r;
17195 }
17196 
17197 /* "yt/utilities/lib/geometry_utils.pxd":289
17198  * # This dosn't seem to be much, if at all, faster...
17199  * @cython.cdivision(True)
17200  * cdef inline np.uint64_t bounded_morton_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17201  *                                np.float64_t *DLE, np.float64_t *dds):
17202  *     cdef np.uint64_t x_ind, y_ind, z_ind
17203  */
17204 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_dds(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_float64_t __pyx_v_y,__pyx_t_5numpy_float64_t __pyx_v_z,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_dds)17205 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_dds(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_dds) {
17206   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
17207   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
17208   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
17209   __pyx_t_5numpy_uint64_t __pyx_v_mi;
17210   __pyx_t_5numpy_uint64_t __pyx_r;
17211   __Pyx_RefNannyDeclarations
17212   __Pyx_RefNannySetupContext("bounded_morton_dds", 0);
17213 
17214   /* "yt/utilities/lib/geometry_utils.pxd":293
17215  *     cdef np.uint64_t x_ind, y_ind, z_ind
17216  *     cdef np.uint64_t mi
17217  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])             # <<<<<<<<<<<<<<
17218  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
17219  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17220  */
17221   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds[0])));
17222 
17223   /* "yt/utilities/lib/geometry_utils.pxd":294
17224  *     cdef np.uint64_t mi
17225  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
17226  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])             # <<<<<<<<<<<<<<
17227  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17228  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
17229  */
17230   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds[1])));
17231 
17232   /* "yt/utilities/lib/geometry_utils.pxd":295
17233  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
17234  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
17235  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])             # <<<<<<<<<<<<<<
17236  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
17237  *     return mi
17238  */
17239   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds[2])));
17240 
17241   /* "yt/utilities/lib/geometry_utils.pxd":296
17242  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
17243  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17244  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
17245  *     return mi
17246  *
17247  */
17248   __pyx_v_mi = __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_v_x_ind, __pyx_v_y_ind, __pyx_v_z_ind);
17249 
17250   /* "yt/utilities/lib/geometry_utils.pxd":297
17251  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
17252  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
17253  *     return mi             # <<<<<<<<<<<<<<
17254  *
17255  * @cython.cdivision(True)
17256  */
17257   __pyx_r = __pyx_v_mi;
17258   goto __pyx_L0;
17259 
17260   /* "yt/utilities/lib/geometry_utils.pxd":289
17261  * # This dosn't seem to be much, if at all, faster...
17262  * @cython.cdivision(True)
17263  * cdef inline np.uint64_t bounded_morton_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17264  *                                np.float64_t *DLE, np.float64_t *dds):
17265  *     cdef np.uint64_t x_ind, y_ind, z_ind
17266  */
17267 
17268   /* function exit code */
17269   __pyx_L0:;
17270   __Pyx_RefNannyFinishContext();
17271   return __pyx_r;
17272 }
17273 
17274 /* "yt/utilities/lib/geometry_utils.pxd":300
17275  *
17276  * @cython.cdivision(True)
17277  * cdef inline np.uint64_t bounded_morton_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17278  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2):
17279  *     cdef np.float64_t DLE2[3]
17280  */
17281 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_relative_dds(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_float64_t __pyx_v_y,__pyx_t_5numpy_float64_t __pyx_v_z,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_dds1,__pyx_t_5numpy_float64_t * __pyx_v_dds2)17282 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_relative_dds(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_dds1, __pyx_t_5numpy_float64_t *__pyx_v_dds2) {
17283   __pyx_t_5numpy_float64_t __pyx_v_DLE2[3];
17284   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
17285   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
17286   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
17287   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
17288   __pyx_t_5numpy_uint64_t __pyx_r;
17289   __Pyx_RefNannyDeclarations
17290   __Pyx_RefNannySetupContext("bounded_morton_relative_dds", 0);
17291 
17292   /* "yt/utilities/lib/geometry_utils.pxd":305
17293  *     cdef np.uint64_t x_ind, y_ind, z_ind
17294  *     cdef np.uint64_t mi2
17295  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]             # <<<<<<<<<<<<<<
17296  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17297  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17298  */
17299   (__pyx_v_DLE2[0]) = (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds1[0])))) * (__pyx_v_dds1[0]));
17300 
17301   /* "yt/utilities/lib/geometry_utils.pxd":306
17302  *     cdef np.uint64_t mi2
17303  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17304  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]             # <<<<<<<<<<<<<<
17305  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17306  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17307  */
17308   (__pyx_v_DLE2[1]) = (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds1[1])))) * (__pyx_v_dds1[1]));
17309 
17310   /* "yt/utilities/lib/geometry_utils.pxd":307
17311  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17312  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17313  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]             # <<<<<<<<<<<<<<
17314  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17315  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17316  */
17317   (__pyx_v_DLE2[2]) = (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds1[2])))) * (__pyx_v_dds1[2]));
17318 
17319   /* "yt/utilities/lib/geometry_utils.pxd":308
17320  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17321  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17322  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])             # <<<<<<<<<<<<<<
17323  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17324  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17325  */
17326   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE2[0])) / (__pyx_v_dds2[0])));
17327 
17328   /* "yt/utilities/lib/geometry_utils.pxd":309
17329  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17330  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17331  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])             # <<<<<<<<<<<<<<
17332  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17333  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
17334  */
17335   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE2[1])) / (__pyx_v_dds2[1])));
17336 
17337   /* "yt/utilities/lib/geometry_utils.pxd":310
17338  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17339  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17340  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])             # <<<<<<<<<<<<<<
17341  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
17342  *     return mi2
17343  */
17344   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE2[2])) / (__pyx_v_dds2[2])));
17345 
17346   /* "yt/utilities/lib/geometry_utils.pxd":311
17347  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17348  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17349  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
17350  *     return mi2
17351  *
17352  */
17353   __pyx_v_mi2 = __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit(__pyx_v_x_ind, __pyx_v_y_ind, __pyx_v_z_ind);
17354 
17355   /* "yt/utilities/lib/geometry_utils.pxd":312
17356  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17357  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
17358  *     return mi2             # <<<<<<<<<<<<<<
17359  *
17360  *
17361  */
17362   __pyx_r = __pyx_v_mi2;
17363   goto __pyx_L0;
17364 
17365   /* "yt/utilities/lib/geometry_utils.pxd":300
17366  *
17367  * @cython.cdivision(True)
17368  * cdef inline np.uint64_t bounded_morton_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17369  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2):
17370  *     cdef np.float64_t DLE2[3]
17371  */
17372 
17373   /* function exit code */
17374   __pyx_L0:;
17375   __Pyx_RefNannyFinishContext();
17376   return __pyx_r;
17377 }
17378 
17379 /* "yt/utilities/lib/geometry_utils.pxd":316
17380  *
17381  * @cython.cdivision(True)
17382  * cdef inline np.uint64_t bounded_morton_split_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17383  *                                np.float64_t *DLE, np.float64_t *dds, np.uint64_t *p):
17384  *     cdef np.uint64_t mi
17385  */
17386 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_split_dds(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_float64_t __pyx_v_y,__pyx_t_5numpy_float64_t __pyx_v_z,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_dds,__pyx_t_5numpy_uint64_t * __pyx_v_p)17387 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_split_dds(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_uint64_t *__pyx_v_p) {
17388   __pyx_t_5numpy_uint64_t __pyx_v_mi;
17389   __pyx_t_5numpy_uint64_t __pyx_r;
17390   __Pyx_RefNannyDeclarations
17391   __Pyx_RefNannySetupContext("bounded_morton_split_dds", 0);
17392 
17393   /* "yt/utilities/lib/geometry_utils.pxd":319
17394  *                                np.float64_t *DLE, np.float64_t *dds, np.uint64_t *p):
17395  *     cdef np.uint64_t mi
17396  *     p[0] = <np.uint64_t> ((x - DLE[0])/dds[0])             # <<<<<<<<<<<<<<
17397  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])
17398  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
17399  */
17400   (__pyx_v_p[0]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds[0])));
17401 
17402   /* "yt/utilities/lib/geometry_utils.pxd":320
17403  *     cdef np.uint64_t mi
17404  *     p[0] = <np.uint64_t> ((x - DLE[0])/dds[0])
17405  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])             # <<<<<<<<<<<<<<
17406  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
17407  *     mi = encode_morton_64bit(p[0], p[1], p[2])
17408  */
17409   (__pyx_v_p[1]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds[1])));
17410 
17411   /* "yt/utilities/lib/geometry_utils.pxd":321
17412  *     p[0] = <np.uint64_t> ((x - DLE[0])/dds[0])
17413  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])
17414  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])             # <<<<<<<<<<<<<<
17415  *     mi = encode_morton_64bit(p[0], p[1], p[2])
17416  *     return mi
17417  */
17418   (__pyx_v_p[2]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds[2])));
17419 
17420   /* "yt/utilities/lib/geometry_utils.pxd":322
17421  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])
17422  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
17423  *     mi = encode_morton_64bit(p[0], p[1], p[2])             # <<<<<<<<<<<<<<
17424  *     return mi
17425  *
17426  */
17427   __pyx_v_mi = __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit((__pyx_v_p[0]), (__pyx_v_p[1]), (__pyx_v_p[2]));
17428 
17429   /* "yt/utilities/lib/geometry_utils.pxd":323
17430  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
17431  *     mi = encode_morton_64bit(p[0], p[1], p[2])
17432  *     return mi             # <<<<<<<<<<<<<<
17433  *
17434  * @cython.cdivision(True)
17435  */
17436   __pyx_r = __pyx_v_mi;
17437   goto __pyx_L0;
17438 
17439   /* "yt/utilities/lib/geometry_utils.pxd":316
17440  *
17441  * @cython.cdivision(True)
17442  * cdef inline np.uint64_t bounded_morton_split_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17443  *                                np.float64_t *DLE, np.float64_t *dds, np.uint64_t *p):
17444  *     cdef np.uint64_t mi
17445  */
17446 
17447   /* function exit code */
17448   __pyx_L0:;
17449   __Pyx_RefNannyFinishContext();
17450   return __pyx_r;
17451 }
17452 
17453 /* "yt/utilities/lib/geometry_utils.pxd":326
17454  *
17455  * @cython.cdivision(True)
17456  * cdef inline np.uint64_t bounded_morton_split_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17457  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2,
17458  *                                np.uint64_t *p2):
17459  */
17460 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_split_relative_dds(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_float64_t __pyx_v_y,__pyx_t_5numpy_float64_t __pyx_v_z,__pyx_t_5numpy_float64_t * __pyx_v_DLE,__pyx_t_5numpy_float64_t * __pyx_v_dds1,__pyx_t_5numpy_float64_t * __pyx_v_dds2,__pyx_t_5numpy_uint64_t * __pyx_v_p2)17461 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_bounded_morton_split_relative_dds(__pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, __pyx_t_5numpy_float64_t *__pyx_v_DLE, __pyx_t_5numpy_float64_t *__pyx_v_dds1, __pyx_t_5numpy_float64_t *__pyx_v_dds2, __pyx_t_5numpy_uint64_t *__pyx_v_p2) {
17462   __pyx_t_5numpy_float64_t __pyx_v_DLE2[3];
17463   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
17464   __pyx_t_5numpy_uint64_t __pyx_r;
17465   __Pyx_RefNannyDeclarations
17466   __Pyx_RefNannySetupContext("bounded_morton_split_relative_dds", 0);
17467 
17468   /* "yt/utilities/lib/geometry_utils.pxd":331
17469  *     cdef np.float64_t DLE2[3]
17470  *     cdef np.uint64_t mi2
17471  *     DLE2[0] = DLE[0] + <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]             # <<<<<<<<<<<<<<
17472  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17473  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17474  */
17475   (__pyx_v_DLE2[0]) = ((__pyx_v_DLE[0]) + (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds1[0])))) * (__pyx_v_dds1[0])));
17476 
17477   /* "yt/utilities/lib/geometry_utils.pxd":332
17478  *     cdef np.uint64_t mi2
17479  *     DLE2[0] = DLE[0] + <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17480  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]             # <<<<<<<<<<<<<<
17481  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17482  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17483  */
17484   (__pyx_v_DLE2[1]) = ((__pyx_v_DLE[1]) + (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds1[1])))) * (__pyx_v_dds1[1])));
17485 
17486   /* "yt/utilities/lib/geometry_utils.pxd":333
17487  *     DLE2[0] = DLE[0] + <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
17488  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17489  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]             # <<<<<<<<<<<<<<
17490  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17491  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17492  */
17493   (__pyx_v_DLE2[2]) = ((__pyx_v_DLE[2]) + (((__pyx_t_5numpy_float64_t)((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds1[2])))) * (__pyx_v_dds1[2])));
17494 
17495   /* "yt/utilities/lib/geometry_utils.pxd":334
17496  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
17497  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17498  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])             # <<<<<<<<<<<<<<
17499  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17500  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17501  */
17502   (__pyx_v_p2[0]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE2[0])) / (__pyx_v_dds2[0])));
17503 
17504   /* "yt/utilities/lib/geometry_utils.pxd":335
17505  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
17506  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17507  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])             # <<<<<<<<<<<<<<
17508  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17509  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])
17510  */
17511   (__pyx_v_p2[1]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE2[1])) / (__pyx_v_dds2[1])));
17512 
17513   /* "yt/utilities/lib/geometry_utils.pxd":336
17514  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
17515  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17516  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])             # <<<<<<<<<<<<<<
17517  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])
17518  *     return mi2
17519  */
17520   (__pyx_v_p2[2]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE2[2])) / (__pyx_v_dds2[2])));
17521 
17522   /* "yt/utilities/lib/geometry_utils.pxd":337
17523  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
17524  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17525  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])             # <<<<<<<<<<<<<<
17526  *     return mi2
17527  *
17528  */
17529   __pyx_v_mi2 = __pyx_f_2yt_9utilities_3lib_14geometry_utils_encode_morton_64bit((__pyx_v_p2[0]), (__pyx_v_p2[1]), (__pyx_v_p2[2]));
17530 
17531   /* "yt/utilities/lib/geometry_utils.pxd":338
17532  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
17533  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])
17534  *     return mi2             # <<<<<<<<<<<<<<
17535  *
17536  *
17537  */
17538   __pyx_r = __pyx_v_mi2;
17539   goto __pyx_L0;
17540 
17541   /* "yt/utilities/lib/geometry_utils.pxd":326
17542  *
17543  * @cython.cdivision(True)
17544  * cdef inline np.uint64_t bounded_morton_split_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
17545  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2,
17546  *                                np.uint64_t *p2):
17547  */
17548 
17549   /* function exit code */
17550   __pyx_L0:;
17551   __Pyx_RefNannyFinishContext();
17552   return __pyx_r;
17553 }
17554 
17555 /* "selection_routines.pxd":81
17556  *     cdef public SelectorObject sel2
17557  *
17558  * cdef inline np.float64_t _periodic_dist(np.float64_t x1, np.float64_t x2,             # <<<<<<<<<<<<<<
17559  *                                         np.float64_t dw, bint periodic) nogil:
17560  *     cdef np.float64_t rel = x1 - x2
17561  */
17562 
__pyx_f_2yt_8geometry_18selection_routines__periodic_dist(__pyx_t_5numpy_float64_t __pyx_v_x1,__pyx_t_5numpy_float64_t __pyx_v_x2,__pyx_t_5numpy_float64_t __pyx_v_dw,int __pyx_v_periodic)17563 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_18selection_routines__periodic_dist(__pyx_t_5numpy_float64_t __pyx_v_x1, __pyx_t_5numpy_float64_t __pyx_v_x2, __pyx_t_5numpy_float64_t __pyx_v_dw, int __pyx_v_periodic) {
17564   __pyx_t_5numpy_float64_t __pyx_v_rel;
17565   __pyx_t_5numpy_float64_t __pyx_r;
17566   int __pyx_t_1;
17567 
17568   /* "selection_routines.pxd":83
17569  * cdef inline np.float64_t _periodic_dist(np.float64_t x1, np.float64_t x2,
17570  *                                         np.float64_t dw, bint periodic) nogil:
17571  *     cdef np.float64_t rel = x1 - x2             # <<<<<<<<<<<<<<
17572  *     if not periodic: return rel
17573  *     if rel > dw * 0.5:
17574  */
17575   __pyx_v_rel = (__pyx_v_x1 - __pyx_v_x2);
17576 
17577   /* "selection_routines.pxd":84
17578  *                                         np.float64_t dw, bint periodic) nogil:
17579  *     cdef np.float64_t rel = x1 - x2
17580  *     if not periodic: return rel             # <<<<<<<<<<<<<<
17581  *     if rel > dw * 0.5:
17582  *         rel -= dw
17583  */
17584   __pyx_t_1 = ((!(__pyx_v_periodic != 0)) != 0);
17585   if (__pyx_t_1) {
17586     __pyx_r = __pyx_v_rel;
17587     goto __pyx_L0;
17588   }
17589 
17590   /* "selection_routines.pxd":85
17591  *     cdef np.float64_t rel = x1 - x2
17592  *     if not periodic: return rel
17593  *     if rel > dw * 0.5:             # <<<<<<<<<<<<<<
17594  *         rel -= dw
17595  *     elif rel < -dw * 0.5:
17596  */
17597   __pyx_t_1 = ((__pyx_v_rel > (__pyx_v_dw * 0.5)) != 0);
17598   if (__pyx_t_1) {
17599 
17600     /* "selection_routines.pxd":86
17601  *     if not periodic: return rel
17602  *     if rel > dw * 0.5:
17603  *         rel -= dw             # <<<<<<<<<<<<<<
17604  *     elif rel < -dw * 0.5:
17605  *         rel += dw
17606  */
17607     __pyx_v_rel = (__pyx_v_rel - __pyx_v_dw);
17608 
17609     /* "selection_routines.pxd":85
17610  *     cdef np.float64_t rel = x1 - x2
17611  *     if not periodic: return rel
17612  *     if rel > dw * 0.5:             # <<<<<<<<<<<<<<
17613  *         rel -= dw
17614  *     elif rel < -dw * 0.5:
17615  */
17616     goto __pyx_L4;
17617   }
17618 
17619   /* "selection_routines.pxd":87
17620  *     if rel > dw * 0.5:
17621  *         rel -= dw
17622  *     elif rel < -dw * 0.5:             # <<<<<<<<<<<<<<
17623  *         rel += dw
17624  *     return rel
17625  */
17626   __pyx_t_1 = ((__pyx_v_rel < ((-__pyx_v_dw) * 0.5)) != 0);
17627   if (__pyx_t_1) {
17628 
17629     /* "selection_routines.pxd":88
17630  *         rel -= dw
17631  *     elif rel < -dw * 0.5:
17632  *         rel += dw             # <<<<<<<<<<<<<<
17633  *     return rel
17634  */
17635     __pyx_v_rel = (__pyx_v_rel + __pyx_v_dw);
17636 
17637     /* "selection_routines.pxd":87
17638  *     if rel > dw * 0.5:
17639  *         rel -= dw
17640  *     elif rel < -dw * 0.5:             # <<<<<<<<<<<<<<
17641  *         rel += dw
17642  *     return rel
17643  */
17644   }
17645   __pyx_L4:;
17646 
17647   /* "selection_routines.pxd":89
17648  *     elif rel < -dw * 0.5:
17649  *         rel += dw
17650  *     return rel             # <<<<<<<<<<<<<<
17651  */
17652   __pyx_r = __pyx_v_rel;
17653   goto __pyx_L0;
17654 
17655   /* "selection_routines.pxd":81
17656  *     cdef public SelectorObject sel2
17657  *
17658  * cdef inline np.float64_t _periodic_dist(np.float64_t x1, np.float64_t x2,             # <<<<<<<<<<<<<<
17659  *                                         np.float64_t dw, bint periodic) nogil:
17660  *     cdef np.float64_t rel = x1 - x2
17661  */
17662 
17663   /* function exit code */
17664   __pyx_L0:;
17665   return __pyx_r;
17666 }
17667 
17668 /* "oct_container.pxd":48
17669  *
17670  * cdef class OctObjectPool(ObjectPool):
17671  *     cdef inline OctAllocationContainer *get_cont(self, int i):             # <<<<<<<<<<<<<<
17672  *         return <OctAllocationContainer*> (&self.containers[i])
17673  *
17674  */
17675 
__pyx_f_2yt_8geometry_13oct_container_13OctObjectPool_get_cont(struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool * __pyx_v_self,int __pyx_v_i)17676 static CYTHON_INLINE struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer *__pyx_f_2yt_8geometry_13oct_container_13OctObjectPool_get_cont(struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool *__pyx_v_self, int __pyx_v_i) {
17677   struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer *__pyx_r;
17678   __Pyx_RefNannyDeclarations
17679   __Pyx_RefNannySetupContext("get_cont", 0);
17680 
17681   /* "oct_container.pxd":49
17682  * cdef class OctObjectPool(ObjectPool):
17683  *     cdef inline OctAllocationContainer *get_cont(self, int i):
17684  *         return <OctAllocationContainer*> (&self.containers[i])             # <<<<<<<<<<<<<<
17685  *
17686  * cdef OctList *OctList_append(OctList *list, Oct *o)
17687  */
17688   __pyx_r = ((struct __pyx_t_2yt_8geometry_13oct_container_OctAllocationContainer *)(&(__pyx_v_self->__pyx_base.containers[__pyx_v_i])));
17689   goto __pyx_L0;
17690 
17691   /* "oct_container.pxd":48
17692  *
17693  * cdef class OctObjectPool(ObjectPool):
17694  *     cdef inline OctAllocationContainer *get_cont(self, int i):             # <<<<<<<<<<<<<<
17695  *         return <OctAllocationContainer*> (&self.containers[i])
17696  *
17697  */
17698 
17699   /* function exit code */
17700   __pyx_L0:;
17701   __Pyx_RefNannyFinishContext();
17702   return __pyx_r;
17703 }
17704 
17705 /* "yt/geometry/particle_deposit.pxd":27
17706  *     void *alloca(int)
17707  *
17708  * cdef inline int gind(int i, int j, int k, int dims[3]):             # <<<<<<<<<<<<<<
17709  *     # The ordering is such that we want i to vary the slowest in this instance,
17710  *     # even though in other instances it varies the fastest.  To see this in
17711  */
17712 
__pyx_f_2yt_8geometry_16particle_deposit_gind(int __pyx_v_i,int __pyx_v_j,int __pyx_v_k,int * __pyx_v_dims)17713 static CYTHON_INLINE int __pyx_f_2yt_8geometry_16particle_deposit_gind(int __pyx_v_i, int __pyx_v_j, int __pyx_v_k, int *__pyx_v_dims) {
17714   int __pyx_r;
17715   __Pyx_RefNannyDeclarations
17716   __Pyx_RefNannySetupContext("gind", 0);
17717 
17718   /* "yt/geometry/particle_deposit.pxd":32
17719  *     # action, try looking at the results of an n_ref=256 particle CIC plot,
17720  *     # which shows it the most clearly.
17721  *     return ((i*dims[1])+j)*dims[2]+k             # <<<<<<<<<<<<<<
17722  *
17723  *
17724  */
17725   __pyx_r = ((((__pyx_v_i * (__pyx_v_dims[1])) + __pyx_v_j) * (__pyx_v_dims[2])) + __pyx_v_k);
17726   goto __pyx_L0;
17727 
17728   /* "yt/geometry/particle_deposit.pxd":27
17729  *     void *alloca(int)
17730  *
17731  * cdef inline int gind(int i, int j, int k, int dims[3]):             # <<<<<<<<<<<<<<
17732  *     # The ordering is such that we want i to vary the slowest in this instance,
17733  *     # even though in other instances it varies the fastest.  To see this in
17734  */
17735 
17736   /* function exit code */
17737   __pyx_L0:;
17738   __Pyx_RefNannyFinishContext();
17739   return __pyx_r;
17740 }
17741 
17742 /* "yt/geometry/particle_deposit.pxd":39
17743  * ####################################################
17744  *
17745  * cdef inline np.float64_t sph_kernel_cubic(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
17746  *     cdef np.float64_t kernel
17747  *     # C is 8/pi
17748  */
17749 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_cubic(__pyx_t_5numpy_float64_t __pyx_v_x)17750 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_cubic(__pyx_t_5numpy_float64_t __pyx_v_x) {
17751   __pyx_t_5numpy_float64_t __pyx_v_kernel;
17752   __pyx_t_5numpy_float64_t __pyx_v_C;
17753   __pyx_t_5numpy_float64_t __pyx_r;
17754   int __pyx_t_1;
17755   int __pyx_t_2;
17756 
17757   /* "yt/geometry/particle_deposit.pxd":42
17758  *     cdef np.float64_t kernel
17759  *     # C is 8/pi
17760  *     cdef np.float64_t C = 2.5464790894703255             # <<<<<<<<<<<<<<
17761  *     if x <= 0.5:
17762  *         kernel = 1.-6.*x*x*(1.-x)
17763  */
17764   __pyx_v_C = 2.5464790894703255;
17765 
17766   /* "yt/geometry/particle_deposit.pxd":43
17767  *     # C is 8/pi
17768  *     cdef np.float64_t C = 2.5464790894703255
17769  *     if x <= 0.5:             # <<<<<<<<<<<<<<
17770  *         kernel = 1.-6.*x*x*(1.-x)
17771  *     elif x>0.5 and x<=1.0:
17772  */
17773   __pyx_t_1 = ((__pyx_v_x <= 0.5) != 0);
17774   if (__pyx_t_1) {
17775 
17776     /* "yt/geometry/particle_deposit.pxd":44
17777  *     cdef np.float64_t C = 2.5464790894703255
17778  *     if x <= 0.5:
17779  *         kernel = 1.-6.*x*x*(1.-x)             # <<<<<<<<<<<<<<
17780  *     elif x>0.5 and x<=1.0:
17781  *         kernel = 2.*(1.-x)*(1.-x)*(1.-x)
17782  */
17783     __pyx_v_kernel = (1. - (((6. * __pyx_v_x) * __pyx_v_x) * (1. - __pyx_v_x)));
17784 
17785     /* "yt/geometry/particle_deposit.pxd":43
17786  *     # C is 8/pi
17787  *     cdef np.float64_t C = 2.5464790894703255
17788  *     if x <= 0.5:             # <<<<<<<<<<<<<<
17789  *         kernel = 1.-6.*x*x*(1.-x)
17790  *     elif x>0.5 and x<=1.0:
17791  */
17792     goto __pyx_L3;
17793   }
17794 
17795   /* "yt/geometry/particle_deposit.pxd":45
17796  *     if x <= 0.5:
17797  *         kernel = 1.-6.*x*x*(1.-x)
17798  *     elif x>0.5 and x<=1.0:             # <<<<<<<<<<<<<<
17799  *         kernel = 2.*(1.-x)*(1.-x)*(1.-x)
17800  *     else:
17801  */
17802   __pyx_t_2 = ((__pyx_v_x > 0.5) != 0);
17803   if (__pyx_t_2) {
17804   } else {
17805     __pyx_t_1 = __pyx_t_2;
17806     goto __pyx_L4_bool_binop_done;
17807   }
17808   __pyx_t_2 = ((__pyx_v_x <= 1.0) != 0);
17809   __pyx_t_1 = __pyx_t_2;
17810   __pyx_L4_bool_binop_done:;
17811   if (__pyx_t_1) {
17812 
17813     /* "yt/geometry/particle_deposit.pxd":46
17814  *         kernel = 1.-6.*x*x*(1.-x)
17815  *     elif x>0.5 and x<=1.0:
17816  *         kernel = 2.*(1.-x)*(1.-x)*(1.-x)             # <<<<<<<<<<<<<<
17817  *     else:
17818  *         kernel = 0.
17819  */
17820     __pyx_v_kernel = (((2. * (1. - __pyx_v_x)) * (1. - __pyx_v_x)) * (1. - __pyx_v_x));
17821 
17822     /* "yt/geometry/particle_deposit.pxd":45
17823  *     if x <= 0.5:
17824  *         kernel = 1.-6.*x*x*(1.-x)
17825  *     elif x>0.5 and x<=1.0:             # <<<<<<<<<<<<<<
17826  *         kernel = 2.*(1.-x)*(1.-x)*(1.-x)
17827  *     else:
17828  */
17829     goto __pyx_L3;
17830   }
17831 
17832   /* "yt/geometry/particle_deposit.pxd":48
17833  *         kernel = 2.*(1.-x)*(1.-x)*(1.-x)
17834  *     else:
17835  *         kernel = 0.             # <<<<<<<<<<<<<<
17836  *     return kernel * C
17837  *
17838  */
17839   /*else*/ {
17840     __pyx_v_kernel = 0.;
17841   }
17842   __pyx_L3:;
17843 
17844   /* "yt/geometry/particle_deposit.pxd":49
17845  *     else:
17846  *         kernel = 0.
17847  *     return kernel * C             # <<<<<<<<<<<<<<
17848  *
17849  * ########################################################
17850  */
17851   __pyx_r = (__pyx_v_kernel * __pyx_v_C);
17852   goto __pyx_L0;
17853 
17854   /* "yt/geometry/particle_deposit.pxd":39
17855  * ####################################################
17856  *
17857  * cdef inline np.float64_t sph_kernel_cubic(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
17858  *     cdef np.float64_t kernel
17859  *     # C is 8/pi
17860  */
17861 
17862   /* function exit code */
17863   __pyx_L0:;
17864   return __pyx_r;
17865 }
17866 
17867 /* "yt/geometry/particle_deposit.pxd":56
17868  *
17869  * # quartic spline
17870  * cdef inline np.float64_t sph_kernel_quartic(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
17871  *     cdef np.float64_t kernel
17872  *     cdef np.float64_t C = 9.71404681957369  # 5.**6/512/np.pi
17873  */
17874 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quartic(__pyx_t_5numpy_float64_t __pyx_v_x)17875 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quartic(__pyx_t_5numpy_float64_t __pyx_v_x) {
17876   __pyx_t_5numpy_float64_t __pyx_v_kernel;
17877   __pyx_t_5numpy_float64_t __pyx_v_C;
17878   __pyx_t_5numpy_float64_t __pyx_r;
17879   int __pyx_t_1;
17880 
17881   /* "yt/geometry/particle_deposit.pxd":58
17882  * cdef inline np.float64_t sph_kernel_quartic(np.float64_t x) nogil:
17883  *     cdef np.float64_t kernel
17884  *     cdef np.float64_t C = 9.71404681957369  # 5.**6/512/np.pi             # <<<<<<<<<<<<<<
17885  *     if x < 1:
17886  *         kernel = (1.-x)**4
17887  */
17888   __pyx_v_C = 9.71404681957369;
17889 
17890   /* "yt/geometry/particle_deposit.pxd":59
17891  *     cdef np.float64_t kernel
17892  *     cdef np.float64_t C = 9.71404681957369  # 5.**6/512/np.pi
17893  *     if x < 1:             # <<<<<<<<<<<<<<
17894  *         kernel = (1.-x)**4
17895  *         if x < 3./5:
17896  */
17897   __pyx_t_1 = ((__pyx_v_x < 1.0) != 0);
17898   if (__pyx_t_1) {
17899 
17900     /* "yt/geometry/particle_deposit.pxd":60
17901  *     cdef np.float64_t C = 9.71404681957369  # 5.**6/512/np.pi
17902  *     if x < 1:
17903  *         kernel = (1.-x)**4             # <<<<<<<<<<<<<<
17904  *         if x < 3./5:
17905  *             kernel -= 5*(3./5-x)**4
17906  */
17907     __pyx_v_kernel = pow((1. - __pyx_v_x), 4.0);
17908 
17909     /* "yt/geometry/particle_deposit.pxd":61
17910  *     if x < 1:
17911  *         kernel = (1.-x)**4
17912  *         if x < 3./5:             # <<<<<<<<<<<<<<
17913  *             kernel -= 5*(3./5-x)**4
17914  *             if x < 1./5:
17915  */
17916     __pyx_t_1 = ((__pyx_v_x < (3. / 5.0)) != 0);
17917     if (__pyx_t_1) {
17918 
17919       /* "yt/geometry/particle_deposit.pxd":62
17920  *         kernel = (1.-x)**4
17921  *         if x < 3./5:
17922  *             kernel -= 5*(3./5-x)**4             # <<<<<<<<<<<<<<
17923  *             if x < 1./5:
17924  *                 kernel += 10*(1./5-x)**4
17925  */
17926       __pyx_v_kernel = (__pyx_v_kernel - (5.0 * pow(((3. / 5.0) - __pyx_v_x), 4.0)));
17927 
17928       /* "yt/geometry/particle_deposit.pxd":63
17929  *         if x < 3./5:
17930  *             kernel -= 5*(3./5-x)**4
17931  *             if x < 1./5:             # <<<<<<<<<<<<<<
17932  *                 kernel += 10*(1./5-x)**4
17933  *     else:
17934  */
17935       __pyx_t_1 = ((__pyx_v_x < (1. / 5.0)) != 0);
17936       if (__pyx_t_1) {
17937 
17938         /* "yt/geometry/particle_deposit.pxd":64
17939  *             kernel -= 5*(3./5-x)**4
17940  *             if x < 1./5:
17941  *                 kernel += 10*(1./5-x)**4             # <<<<<<<<<<<<<<
17942  *     else:
17943  *         kernel = 0.
17944  */
17945         __pyx_v_kernel = (__pyx_v_kernel + (10.0 * pow(((1. / 5.0) - __pyx_v_x), 4.0)));
17946 
17947         /* "yt/geometry/particle_deposit.pxd":63
17948  *         if x < 3./5:
17949  *             kernel -= 5*(3./5-x)**4
17950  *             if x < 1./5:             # <<<<<<<<<<<<<<
17951  *                 kernel += 10*(1./5-x)**4
17952  *     else:
17953  */
17954       }
17955 
17956       /* "yt/geometry/particle_deposit.pxd":61
17957  *     if x < 1:
17958  *         kernel = (1.-x)**4
17959  *         if x < 3./5:             # <<<<<<<<<<<<<<
17960  *             kernel -= 5*(3./5-x)**4
17961  *             if x < 1./5:
17962  */
17963     }
17964 
17965     /* "yt/geometry/particle_deposit.pxd":59
17966  *     cdef np.float64_t kernel
17967  *     cdef np.float64_t C = 9.71404681957369  # 5.**6/512/np.pi
17968  *     if x < 1:             # <<<<<<<<<<<<<<
17969  *         kernel = (1.-x)**4
17970  *         if x < 3./5:
17971  */
17972     goto __pyx_L3;
17973   }
17974 
17975   /* "yt/geometry/particle_deposit.pxd":66
17976  *                 kernel += 10*(1./5-x)**4
17977  *     else:
17978  *         kernel = 0.             # <<<<<<<<<<<<<<
17979  *     return kernel * C
17980  *
17981  */
17982   /*else*/ {
17983     __pyx_v_kernel = 0.;
17984   }
17985   __pyx_L3:;
17986 
17987   /* "yt/geometry/particle_deposit.pxd":67
17988  *     else:
17989  *         kernel = 0.
17990  *     return kernel * C             # <<<<<<<<<<<<<<
17991  *
17992  * # quintic spline
17993  */
17994   __pyx_r = (__pyx_v_kernel * __pyx_v_C);
17995   goto __pyx_L0;
17996 
17997   /* "yt/geometry/particle_deposit.pxd":56
17998  *
17999  * # quartic spline
18000  * cdef inline np.float64_t sph_kernel_quartic(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18001  *     cdef np.float64_t kernel
18002  *     cdef np.float64_t C = 9.71404681957369  # 5.**6/512/np.pi
18003  */
18004 
18005   /* function exit code */
18006   __pyx_L0:;
18007   return __pyx_r;
18008 }
18009 
18010 /* "yt/geometry/particle_deposit.pxd":70
18011  *
18012  * # quintic spline
18013  * cdef inline np.float64_t sph_kernel_quintic(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18014  *     cdef np.float64_t kernel
18015  *     cdef np.float64_t C = 17.403593027098754  # 3.**7/40/np.pi
18016  */
18017 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quintic(__pyx_t_5numpy_float64_t __pyx_v_x)18018 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quintic(__pyx_t_5numpy_float64_t __pyx_v_x) {
18019   __pyx_t_5numpy_float64_t __pyx_v_kernel;
18020   __pyx_t_5numpy_float64_t __pyx_v_C;
18021   __pyx_t_5numpy_float64_t __pyx_r;
18022   int __pyx_t_1;
18023 
18024   /* "yt/geometry/particle_deposit.pxd":72
18025  * cdef inline np.float64_t sph_kernel_quintic(np.float64_t x) nogil:
18026  *     cdef np.float64_t kernel
18027  *     cdef np.float64_t C = 17.403593027098754  # 3.**7/40/np.pi             # <<<<<<<<<<<<<<
18028  *     if x < 1:
18029  *         kernel = (1.-x)**5
18030  */
18031   __pyx_v_C = 17.403593027098754;
18032 
18033   /* "yt/geometry/particle_deposit.pxd":73
18034  *     cdef np.float64_t kernel
18035  *     cdef np.float64_t C = 17.403593027098754  # 3.**7/40/np.pi
18036  *     if x < 1:             # <<<<<<<<<<<<<<
18037  *         kernel = (1.-x)**5
18038  *         if x < 2./3:
18039  */
18040   __pyx_t_1 = ((__pyx_v_x < 1.0) != 0);
18041   if (__pyx_t_1) {
18042 
18043     /* "yt/geometry/particle_deposit.pxd":74
18044  *     cdef np.float64_t C = 17.403593027098754  # 3.**7/40/np.pi
18045  *     if x < 1:
18046  *         kernel = (1.-x)**5             # <<<<<<<<<<<<<<
18047  *         if x < 2./3:
18048  *             kernel -= 6*(2./3-x)**5
18049  */
18050     __pyx_v_kernel = pow((1. - __pyx_v_x), 5.0);
18051 
18052     /* "yt/geometry/particle_deposit.pxd":75
18053  *     if x < 1:
18054  *         kernel = (1.-x)**5
18055  *         if x < 2./3:             # <<<<<<<<<<<<<<
18056  *             kernel -= 6*(2./3-x)**5
18057  *             if x < 1./3:
18058  */
18059     __pyx_t_1 = ((__pyx_v_x < (2. / 3.0)) != 0);
18060     if (__pyx_t_1) {
18061 
18062       /* "yt/geometry/particle_deposit.pxd":76
18063  *         kernel = (1.-x)**5
18064  *         if x < 2./3:
18065  *             kernel -= 6*(2./3-x)**5             # <<<<<<<<<<<<<<
18066  *             if x < 1./3:
18067  *                 kernel += 15*(1./3-x)**5
18068  */
18069       __pyx_v_kernel = (__pyx_v_kernel - (6.0 * pow(((2. / 3.0) - __pyx_v_x), 5.0)));
18070 
18071       /* "yt/geometry/particle_deposit.pxd":77
18072  *         if x < 2./3:
18073  *             kernel -= 6*(2./3-x)**5
18074  *             if x < 1./3:             # <<<<<<<<<<<<<<
18075  *                 kernel += 15*(1./3-x)**5
18076  *     else:
18077  */
18078       __pyx_t_1 = ((__pyx_v_x < (1. / 3.0)) != 0);
18079       if (__pyx_t_1) {
18080 
18081         /* "yt/geometry/particle_deposit.pxd":78
18082  *             kernel -= 6*(2./3-x)**5
18083  *             if x < 1./3:
18084  *                 kernel += 15*(1./3-x)**5             # <<<<<<<<<<<<<<
18085  *     else:
18086  *         kernel = 0.
18087  */
18088         __pyx_v_kernel = (__pyx_v_kernel + (15.0 * pow(((1. / 3.0) - __pyx_v_x), 5.0)));
18089 
18090         /* "yt/geometry/particle_deposit.pxd":77
18091  *         if x < 2./3:
18092  *             kernel -= 6*(2./3-x)**5
18093  *             if x < 1./3:             # <<<<<<<<<<<<<<
18094  *                 kernel += 15*(1./3-x)**5
18095  *     else:
18096  */
18097       }
18098 
18099       /* "yt/geometry/particle_deposit.pxd":75
18100  *     if x < 1:
18101  *         kernel = (1.-x)**5
18102  *         if x < 2./3:             # <<<<<<<<<<<<<<
18103  *             kernel -= 6*(2./3-x)**5
18104  *             if x < 1./3:
18105  */
18106     }
18107 
18108     /* "yt/geometry/particle_deposit.pxd":73
18109  *     cdef np.float64_t kernel
18110  *     cdef np.float64_t C = 17.403593027098754  # 3.**7/40/np.pi
18111  *     if x < 1:             # <<<<<<<<<<<<<<
18112  *         kernel = (1.-x)**5
18113  *         if x < 2./3:
18114  */
18115     goto __pyx_L3;
18116   }
18117 
18118   /* "yt/geometry/particle_deposit.pxd":80
18119  *                 kernel += 15*(1./3-x)**5
18120  *     else:
18121  *         kernel = 0.             # <<<<<<<<<<<<<<
18122  *     return kernel * C
18123  *
18124  */
18125   /*else*/ {
18126     __pyx_v_kernel = 0.;
18127   }
18128   __pyx_L3:;
18129 
18130   /* "yt/geometry/particle_deposit.pxd":81
18131  *     else:
18132  *         kernel = 0.
18133  *     return kernel * C             # <<<<<<<<<<<<<<
18134  *
18135  * # Wendland C2
18136  */
18137   __pyx_r = (__pyx_v_kernel * __pyx_v_C);
18138   goto __pyx_L0;
18139 
18140   /* "yt/geometry/particle_deposit.pxd":70
18141  *
18142  * # quintic spline
18143  * cdef inline np.float64_t sph_kernel_quintic(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18144  *     cdef np.float64_t kernel
18145  *     cdef np.float64_t C = 17.403593027098754  # 3.**7/40/np.pi
18146  */
18147 
18148   /* function exit code */
18149   __pyx_L0:;
18150   return __pyx_r;
18151 }
18152 
18153 /* "yt/geometry/particle_deposit.pxd":84
18154  *
18155  * # Wendland C2
18156  * cdef inline np.float64_t sph_kernel_wendland2(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18157  *     cdef np.float64_t kernel
18158  *     cdef np.float64_t C = 3.3422538049298023  # 21./2/np.pi
18159  */
18160 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland2(__pyx_t_5numpy_float64_t __pyx_v_x)18161 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland2(__pyx_t_5numpy_float64_t __pyx_v_x) {
18162   __pyx_t_5numpy_float64_t __pyx_v_kernel;
18163   __pyx_t_5numpy_float64_t __pyx_v_C;
18164   __pyx_t_5numpy_float64_t __pyx_r;
18165   int __pyx_t_1;
18166 
18167   /* "yt/geometry/particle_deposit.pxd":86
18168  * cdef inline np.float64_t sph_kernel_wendland2(np.float64_t x) nogil:
18169  *     cdef np.float64_t kernel
18170  *     cdef np.float64_t C = 3.3422538049298023  # 21./2/np.pi             # <<<<<<<<<<<<<<
18171  *     if x < 1:
18172  *         kernel = (1.-x)**4 * (1+4*x)
18173  */
18174   __pyx_v_C = 3.3422538049298023;
18175 
18176   /* "yt/geometry/particle_deposit.pxd":87
18177  *     cdef np.float64_t kernel
18178  *     cdef np.float64_t C = 3.3422538049298023  # 21./2/np.pi
18179  *     if x < 1:             # <<<<<<<<<<<<<<
18180  *         kernel = (1.-x)**4 * (1+4*x)
18181  *     else:
18182  */
18183   __pyx_t_1 = ((__pyx_v_x < 1.0) != 0);
18184   if (__pyx_t_1) {
18185 
18186     /* "yt/geometry/particle_deposit.pxd":88
18187  *     cdef np.float64_t C = 3.3422538049298023  # 21./2/np.pi
18188  *     if x < 1:
18189  *         kernel = (1.-x)**4 * (1+4*x)             # <<<<<<<<<<<<<<
18190  *     else:
18191  *         kernel = 0.
18192  */
18193     __pyx_v_kernel = (pow((1. - __pyx_v_x), 4.0) * (1.0 + (4.0 * __pyx_v_x)));
18194 
18195     /* "yt/geometry/particle_deposit.pxd":87
18196  *     cdef np.float64_t kernel
18197  *     cdef np.float64_t C = 3.3422538049298023  # 21./2/np.pi
18198  *     if x < 1:             # <<<<<<<<<<<<<<
18199  *         kernel = (1.-x)**4 * (1+4*x)
18200  *     else:
18201  */
18202     goto __pyx_L3;
18203   }
18204 
18205   /* "yt/geometry/particle_deposit.pxd":90
18206  *         kernel = (1.-x)**4 * (1+4*x)
18207  *     else:
18208  *         kernel = 0.             # <<<<<<<<<<<<<<
18209  *     return kernel * C
18210  *
18211  */
18212   /*else*/ {
18213     __pyx_v_kernel = 0.;
18214   }
18215   __pyx_L3:;
18216 
18217   /* "yt/geometry/particle_deposit.pxd":91
18218  *     else:
18219  *         kernel = 0.
18220  *     return kernel * C             # <<<<<<<<<<<<<<
18221  *
18222  * # Wendland C4
18223  */
18224   __pyx_r = (__pyx_v_kernel * __pyx_v_C);
18225   goto __pyx_L0;
18226 
18227   /* "yt/geometry/particle_deposit.pxd":84
18228  *
18229  * # Wendland C2
18230  * cdef inline np.float64_t sph_kernel_wendland2(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18231  *     cdef np.float64_t kernel
18232  *     cdef np.float64_t C = 3.3422538049298023  # 21./2/np.pi
18233  */
18234 
18235   /* function exit code */
18236   __pyx_L0:;
18237   return __pyx_r;
18238 }
18239 
18240 /* "yt/geometry/particle_deposit.pxd":94
18241  *
18242  * # Wendland C4
18243  * cdef inline np.float64_t sph_kernel_wendland4(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18244  *     cdef np.float64_t kernel
18245  *     cdef np.float64_t C = 4.923856051905513  # 495./32/np.pi
18246  */
18247 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland4(__pyx_t_5numpy_float64_t __pyx_v_x)18248 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland4(__pyx_t_5numpy_float64_t __pyx_v_x) {
18249   __pyx_t_5numpy_float64_t __pyx_v_kernel;
18250   __pyx_t_5numpy_float64_t __pyx_v_C;
18251   __pyx_t_5numpy_float64_t __pyx_r;
18252   int __pyx_t_1;
18253 
18254   /* "yt/geometry/particle_deposit.pxd":96
18255  * cdef inline np.float64_t sph_kernel_wendland4(np.float64_t x) nogil:
18256  *     cdef np.float64_t kernel
18257  *     cdef np.float64_t C = 4.923856051905513  # 495./32/np.pi             # <<<<<<<<<<<<<<
18258  *     if x < 1:
18259  *         kernel = (1.-x)**6 * (1+6*x+35./3*x**2)
18260  */
18261   __pyx_v_C = 4.923856051905513;
18262 
18263   /* "yt/geometry/particle_deposit.pxd":97
18264  *     cdef np.float64_t kernel
18265  *     cdef np.float64_t C = 4.923856051905513  # 495./32/np.pi
18266  *     if x < 1:             # <<<<<<<<<<<<<<
18267  *         kernel = (1.-x)**6 * (1+6*x+35./3*x**2)
18268  *     else:
18269  */
18270   __pyx_t_1 = ((__pyx_v_x < 1.0) != 0);
18271   if (__pyx_t_1) {
18272 
18273     /* "yt/geometry/particle_deposit.pxd":98
18274  *     cdef np.float64_t C = 4.923856051905513  # 495./32/np.pi
18275  *     if x < 1:
18276  *         kernel = (1.-x)**6 * (1+6*x+35./3*x**2)             # <<<<<<<<<<<<<<
18277  *     else:
18278  *         kernel = 0.
18279  */
18280     __pyx_v_kernel = (pow((1. - __pyx_v_x), 6.0) * ((1.0 + (6.0 * __pyx_v_x)) + ((35. / 3.0) * pow(__pyx_v_x, 2.0))));
18281 
18282     /* "yt/geometry/particle_deposit.pxd":97
18283  *     cdef np.float64_t kernel
18284  *     cdef np.float64_t C = 4.923856051905513  # 495./32/np.pi
18285  *     if x < 1:             # <<<<<<<<<<<<<<
18286  *         kernel = (1.-x)**6 * (1+6*x+35./3*x**2)
18287  *     else:
18288  */
18289     goto __pyx_L3;
18290   }
18291 
18292   /* "yt/geometry/particle_deposit.pxd":100
18293  *         kernel = (1.-x)**6 * (1+6*x+35./3*x**2)
18294  *     else:
18295  *         kernel = 0.             # <<<<<<<<<<<<<<
18296  *     return kernel * C
18297  *
18298  */
18299   /*else*/ {
18300     __pyx_v_kernel = 0.;
18301   }
18302   __pyx_L3:;
18303 
18304   /* "yt/geometry/particle_deposit.pxd":101
18305  *     else:
18306  *         kernel = 0.
18307  *     return kernel * C             # <<<<<<<<<<<<<<
18308  *
18309  * # Wendland C6
18310  */
18311   __pyx_r = (__pyx_v_kernel * __pyx_v_C);
18312   goto __pyx_L0;
18313 
18314   /* "yt/geometry/particle_deposit.pxd":94
18315  *
18316  * # Wendland C4
18317  * cdef inline np.float64_t sph_kernel_wendland4(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18318  *     cdef np.float64_t kernel
18319  *     cdef np.float64_t C = 4.923856051905513  # 495./32/np.pi
18320  */
18321 
18322   /* function exit code */
18323   __pyx_L0:;
18324   return __pyx_r;
18325 }
18326 
18327 /* "yt/geometry/particle_deposit.pxd":104
18328  *
18329  * # Wendland C6
18330  * cdef inline np.float64_t sph_kernel_wendland6(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18331  *     cdef np.float64_t kernel
18332  *     cdef np.float64_t C = 6.78895304126366  # 1365./64/np.pi
18333  */
18334 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland6(__pyx_t_5numpy_float64_t __pyx_v_x)18335 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland6(__pyx_t_5numpy_float64_t __pyx_v_x) {
18336   __pyx_t_5numpy_float64_t __pyx_v_kernel;
18337   __pyx_t_5numpy_float64_t __pyx_v_C;
18338   __pyx_t_5numpy_float64_t __pyx_r;
18339   int __pyx_t_1;
18340 
18341   /* "yt/geometry/particle_deposit.pxd":106
18342  * cdef inline np.float64_t sph_kernel_wendland6(np.float64_t x) nogil:
18343  *     cdef np.float64_t kernel
18344  *     cdef np.float64_t C = 6.78895304126366  # 1365./64/np.pi             # <<<<<<<<<<<<<<
18345  *     if x < 1:
18346  *         kernel = (1.-x)**8 * (1+8*x+25*x**2+32*x**3)
18347  */
18348   __pyx_v_C = 6.78895304126366;
18349 
18350   /* "yt/geometry/particle_deposit.pxd":107
18351  *     cdef np.float64_t kernel
18352  *     cdef np.float64_t C = 6.78895304126366  # 1365./64/np.pi
18353  *     if x < 1:             # <<<<<<<<<<<<<<
18354  *         kernel = (1.-x)**8 * (1+8*x+25*x**2+32*x**3)
18355  *     else:
18356  */
18357   __pyx_t_1 = ((__pyx_v_x < 1.0) != 0);
18358   if (__pyx_t_1) {
18359 
18360     /* "yt/geometry/particle_deposit.pxd":108
18361  *     cdef np.float64_t C = 6.78895304126366  # 1365./64/np.pi
18362  *     if x < 1:
18363  *         kernel = (1.-x)**8 * (1+8*x+25*x**2+32*x**3)             # <<<<<<<<<<<<<<
18364  *     else:
18365  *         kernel = 0.
18366  */
18367     __pyx_v_kernel = (pow((1. - __pyx_v_x), 8.0) * (((1.0 + (8.0 * __pyx_v_x)) + (25.0 * pow(__pyx_v_x, 2.0))) + (32.0 * pow(__pyx_v_x, 3.0))));
18368 
18369     /* "yt/geometry/particle_deposit.pxd":107
18370  *     cdef np.float64_t kernel
18371  *     cdef np.float64_t C = 6.78895304126366  # 1365./64/np.pi
18372  *     if x < 1:             # <<<<<<<<<<<<<<
18373  *         kernel = (1.-x)**8 * (1+8*x+25*x**2+32*x**3)
18374  *     else:
18375  */
18376     goto __pyx_L3;
18377   }
18378 
18379   /* "yt/geometry/particle_deposit.pxd":110
18380  *         kernel = (1.-x)**8 * (1+8*x+25*x**2+32*x**3)
18381  *     else:
18382  *         kernel = 0.             # <<<<<<<<<<<<<<
18383  *     return kernel * C
18384  *
18385  */
18386   /*else*/ {
18387     __pyx_v_kernel = 0.;
18388   }
18389   __pyx_L3:;
18390 
18391   /* "yt/geometry/particle_deposit.pxd":111
18392  *     else:
18393  *         kernel = 0.
18394  *     return kernel * C             # <<<<<<<<<<<<<<
18395  *
18396  * cdef inline np.float64_t sph_kernel_dummy(np.float64_t x) nogil:
18397  */
18398   __pyx_r = (__pyx_v_kernel * __pyx_v_C);
18399   goto __pyx_L0;
18400 
18401   /* "yt/geometry/particle_deposit.pxd":104
18402  *
18403  * # Wendland C6
18404  * cdef inline np.float64_t sph_kernel_wendland6(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18405  *     cdef np.float64_t kernel
18406  *     cdef np.float64_t C = 6.78895304126366  # 1365./64/np.pi
18407  */
18408 
18409   /* function exit code */
18410   __pyx_L0:;
18411   return __pyx_r;
18412 }
18413 
18414 /* "yt/geometry/particle_deposit.pxd":113
18415  *     return kernel * C
18416  *
18417  * cdef inline np.float64_t sph_kernel_dummy(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18418  *     return 0
18419  *
18420  */
18421 
__pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_dummy(CYTHON_UNUSED __pyx_t_5numpy_float64_t __pyx_v_x)18422 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_dummy(CYTHON_UNUSED __pyx_t_5numpy_float64_t __pyx_v_x) {
18423   __pyx_t_5numpy_float64_t __pyx_r;
18424 
18425   /* "yt/geometry/particle_deposit.pxd":114
18426  *
18427  * cdef inline np.float64_t sph_kernel_dummy(np.float64_t x) nogil:
18428  *     return 0             # <<<<<<<<<<<<<<
18429  *
18430  * # I don't know the way to use a dict in a cdef class.
18431  */
18432   __pyx_r = 0.0;
18433   goto __pyx_L0;
18434 
18435   /* "yt/geometry/particle_deposit.pxd":113
18436  *     return kernel * C
18437  *
18438  * cdef inline np.float64_t sph_kernel_dummy(np.float64_t x) nogil:             # <<<<<<<<<<<<<<
18439  *     return 0
18440  *
18441  */
18442 
18443   /* function exit code */
18444   __pyx_L0:;
18445   return __pyx_r;
18446 }
18447 
18448 /* "yt/geometry/particle_deposit.pxd":120
18449  * # I manually created a function to lookup the kernel functions.
18450  * ctypedef np.float64_t (*kernel_func) (np.float64_t) nogil
18451  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:             # <<<<<<<<<<<<<<
18452  *     with gil:
18453  *         if kernel_name == 'cubic':
18454  */
18455 
__pyx_f_2yt_8geometry_16particle_deposit_get_kernel_func(PyObject * __pyx_v_kernel_name)18456 static CYTHON_INLINE __pyx_t_2yt_8geometry_16particle_deposit_kernel_func __pyx_f_2yt_8geometry_16particle_deposit_get_kernel_func(PyObject *__pyx_v_kernel_name) {
18457   __pyx_t_2yt_8geometry_16particle_deposit_kernel_func __pyx_r;
18458   __Pyx_RefNannyDeclarations
18459   int __pyx_t_1;
18460   int __pyx_t_2;
18461   #ifdef WITH_THREAD
18462   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18463   #endif
18464   __Pyx_RefNannySetupContext("get_kernel_func", 0);
18465   #ifdef WITH_THREAD
18466   __Pyx_PyGILState_Release(__pyx_gilstate_save);
18467   #endif
18468 
18469   /* "yt/geometry/particle_deposit.pxd":121
18470  * ctypedef np.float64_t (*kernel_func) (np.float64_t) nogil
18471  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:
18472  *     with gil:             # <<<<<<<<<<<<<<
18473  *         if kernel_name == 'cubic':
18474  *             return sph_kernel_cubic
18475  */
18476   /*try:*/ {
18477     {
18478         #ifdef WITH_THREAD
18479         PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18480         #endif
18481         /*try:*/ {
18482 
18483           /* "yt/geometry/particle_deposit.pxd":122
18484  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:
18485  *     with gil:
18486  *         if kernel_name == 'cubic':             # <<<<<<<<<<<<<<
18487  *             return sph_kernel_cubic
18488  *         elif kernel_name == 'quartic':
18489  */
18490           __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_cubic, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 122, __pyx_L7_error)
18491           __pyx_t_2 = (__pyx_t_1 != 0);
18492           if (__pyx_t_2) {
18493 
18494             /* "yt/geometry/particle_deposit.pxd":123
18495  *     with gil:
18496  *         if kernel_name == 'cubic':
18497  *             return sph_kernel_cubic             # <<<<<<<<<<<<<<
18498  *         elif kernel_name == 'quartic':
18499  *             return sph_kernel_quartic
18500  */
18501             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_cubic;
18502             goto __pyx_L6_return;
18503 
18504             /* "yt/geometry/particle_deposit.pxd":122
18505  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:
18506  *     with gil:
18507  *         if kernel_name == 'cubic':             # <<<<<<<<<<<<<<
18508  *             return sph_kernel_cubic
18509  *         elif kernel_name == 'quartic':
18510  */
18511           }
18512 
18513           /* "yt/geometry/particle_deposit.pxd":124
18514  *         if kernel_name == 'cubic':
18515  *             return sph_kernel_cubic
18516  *         elif kernel_name == 'quartic':             # <<<<<<<<<<<<<<
18517  *             return sph_kernel_quartic
18518  *         elif kernel_name == 'quintic':
18519  */
18520           __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_quartic, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 124, __pyx_L7_error)
18521           __pyx_t_1 = (__pyx_t_2 != 0);
18522           if (__pyx_t_1) {
18523 
18524             /* "yt/geometry/particle_deposit.pxd":125
18525  *             return sph_kernel_cubic
18526  *         elif kernel_name == 'quartic':
18527  *             return sph_kernel_quartic             # <<<<<<<<<<<<<<
18528  *         elif kernel_name == 'quintic':
18529  *             return sph_kernel_quintic
18530  */
18531             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quartic;
18532             goto __pyx_L6_return;
18533 
18534             /* "yt/geometry/particle_deposit.pxd":124
18535  *         if kernel_name == 'cubic':
18536  *             return sph_kernel_cubic
18537  *         elif kernel_name == 'quartic':             # <<<<<<<<<<<<<<
18538  *             return sph_kernel_quartic
18539  *         elif kernel_name == 'quintic':
18540  */
18541           }
18542 
18543           /* "yt/geometry/particle_deposit.pxd":126
18544  *         elif kernel_name == 'quartic':
18545  *             return sph_kernel_quartic
18546  *         elif kernel_name == 'quintic':             # <<<<<<<<<<<<<<
18547  *             return sph_kernel_quintic
18548  *         elif kernel_name == 'wendland2':
18549  */
18550           __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_quintic, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 126, __pyx_L7_error)
18551           __pyx_t_2 = (__pyx_t_1 != 0);
18552           if (__pyx_t_2) {
18553 
18554             /* "yt/geometry/particle_deposit.pxd":127
18555  *             return sph_kernel_quartic
18556  *         elif kernel_name == 'quintic':
18557  *             return sph_kernel_quintic             # <<<<<<<<<<<<<<
18558  *         elif kernel_name == 'wendland2':
18559  *             return sph_kernel_wendland2
18560  */
18561             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_quintic;
18562             goto __pyx_L6_return;
18563 
18564             /* "yt/geometry/particle_deposit.pxd":126
18565  *         elif kernel_name == 'quartic':
18566  *             return sph_kernel_quartic
18567  *         elif kernel_name == 'quintic':             # <<<<<<<<<<<<<<
18568  *             return sph_kernel_quintic
18569  *         elif kernel_name == 'wendland2':
18570  */
18571           }
18572 
18573           /* "yt/geometry/particle_deposit.pxd":128
18574  *         elif kernel_name == 'quintic':
18575  *             return sph_kernel_quintic
18576  *         elif kernel_name == 'wendland2':             # <<<<<<<<<<<<<<
18577  *             return sph_kernel_wendland2
18578  *         elif kernel_name == 'wendland4':
18579  */
18580           __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_wendland2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 128, __pyx_L7_error)
18581           __pyx_t_1 = (__pyx_t_2 != 0);
18582           if (__pyx_t_1) {
18583 
18584             /* "yt/geometry/particle_deposit.pxd":129
18585  *             return sph_kernel_quintic
18586  *         elif kernel_name == 'wendland2':
18587  *             return sph_kernel_wendland2             # <<<<<<<<<<<<<<
18588  *         elif kernel_name == 'wendland4':
18589  *             return sph_kernel_wendland4
18590  */
18591             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland2;
18592             goto __pyx_L6_return;
18593 
18594             /* "yt/geometry/particle_deposit.pxd":128
18595  *         elif kernel_name == 'quintic':
18596  *             return sph_kernel_quintic
18597  *         elif kernel_name == 'wendland2':             # <<<<<<<<<<<<<<
18598  *             return sph_kernel_wendland2
18599  *         elif kernel_name == 'wendland4':
18600  */
18601           }
18602 
18603           /* "yt/geometry/particle_deposit.pxd":130
18604  *         elif kernel_name == 'wendland2':
18605  *             return sph_kernel_wendland2
18606  *         elif kernel_name == 'wendland4':             # <<<<<<<<<<<<<<
18607  *             return sph_kernel_wendland4
18608  *         elif kernel_name == 'wendland6':
18609  */
18610           __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_wendland4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 130, __pyx_L7_error)
18611           __pyx_t_2 = (__pyx_t_1 != 0);
18612           if (__pyx_t_2) {
18613 
18614             /* "yt/geometry/particle_deposit.pxd":131
18615  *             return sph_kernel_wendland2
18616  *         elif kernel_name == 'wendland4':
18617  *             return sph_kernel_wendland4             # <<<<<<<<<<<<<<
18618  *         elif kernel_name == 'wendland6':
18619  *             return sph_kernel_wendland6
18620  */
18621             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland4;
18622             goto __pyx_L6_return;
18623 
18624             /* "yt/geometry/particle_deposit.pxd":130
18625  *         elif kernel_name == 'wendland2':
18626  *             return sph_kernel_wendland2
18627  *         elif kernel_name == 'wendland4':             # <<<<<<<<<<<<<<
18628  *             return sph_kernel_wendland4
18629  *         elif kernel_name == 'wendland6':
18630  */
18631           }
18632 
18633           /* "yt/geometry/particle_deposit.pxd":132
18634  *         elif kernel_name == 'wendland4':
18635  *             return sph_kernel_wendland4
18636  *         elif kernel_name == 'wendland6':             # <<<<<<<<<<<<<<
18637  *             return sph_kernel_wendland6
18638  *         elif kernel_name == 'none':
18639  */
18640           __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_wendland6, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 132, __pyx_L7_error)
18641           __pyx_t_1 = (__pyx_t_2 != 0);
18642           if (__pyx_t_1) {
18643 
18644             /* "yt/geometry/particle_deposit.pxd":133
18645  *             return sph_kernel_wendland4
18646  *         elif kernel_name == 'wendland6':
18647  *             return sph_kernel_wendland6             # <<<<<<<<<<<<<<
18648  *         elif kernel_name == 'none':
18649  *             return sph_kernel_dummy
18650  */
18651             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_wendland6;
18652             goto __pyx_L6_return;
18653 
18654             /* "yt/geometry/particle_deposit.pxd":132
18655  *         elif kernel_name == 'wendland4':
18656  *             return sph_kernel_wendland4
18657  *         elif kernel_name == 'wendland6':             # <<<<<<<<<<<<<<
18658  *             return sph_kernel_wendland6
18659  *         elif kernel_name == 'none':
18660  */
18661           }
18662 
18663           /* "yt/geometry/particle_deposit.pxd":134
18664  *         elif kernel_name == 'wendland6':
18665  *             return sph_kernel_wendland6
18666  *         elif kernel_name == 'none':             # <<<<<<<<<<<<<<
18667  *             return sph_kernel_dummy
18668  *         else:
18669  */
18670           __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_kernel_name, __pyx_n_s_none, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 134, __pyx_L7_error)
18671           __pyx_t_2 = (__pyx_t_1 != 0);
18672           if (likely(__pyx_t_2)) {
18673 
18674             /* "yt/geometry/particle_deposit.pxd":135
18675  *             return sph_kernel_wendland6
18676  *         elif kernel_name == 'none':
18677  *             return sph_kernel_dummy             # <<<<<<<<<<<<<<
18678  *         else:
18679  *             raise NotImplementedError
18680  */
18681             __pyx_r = __pyx_f_2yt_8geometry_16particle_deposit_sph_kernel_dummy;
18682             goto __pyx_L6_return;
18683 
18684             /* "yt/geometry/particle_deposit.pxd":134
18685  *         elif kernel_name == 'wendland6':
18686  *             return sph_kernel_wendland6
18687  *         elif kernel_name == 'none':             # <<<<<<<<<<<<<<
18688  *             return sph_kernel_dummy
18689  *         else:
18690  */
18691           }
18692 
18693           /* "yt/geometry/particle_deposit.pxd":137
18694  *             return sph_kernel_dummy
18695  *         else:
18696  *             raise NotImplementedError             # <<<<<<<<<<<<<<
18697  *
18698  * cdef class ParticleDepositOperation:
18699  */
18700           /*else*/ {
18701             __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
18702             __PYX_ERR(0, 137, __pyx_L7_error)
18703           }
18704         }
18705 
18706         /* "yt/geometry/particle_deposit.pxd":121
18707  * ctypedef np.float64_t (*kernel_func) (np.float64_t) nogil
18708  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:
18709  *     with gil:             # <<<<<<<<<<<<<<
18710  *         if kernel_name == 'cubic':
18711  *             return sph_kernel_cubic
18712  */
18713         /*finally:*/ {
18714           __pyx_L6_return: {
18715             #ifdef WITH_THREAD
18716             __Pyx_PyGILState_Release(__pyx_gilstate_save);
18717             #endif
18718             goto __pyx_L3_return;
18719           }
18720           __pyx_L7_error: {
18721             #ifdef WITH_THREAD
18722             __Pyx_PyGILState_Release(__pyx_gilstate_save);
18723             #endif
18724             goto __pyx_L4_error;
18725           }
18726         }
18727     }
18728   }
18729   /*finally:*/ {
18730     __pyx_L3_return: {
18731       #ifdef WITH_THREAD
18732       __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18733       #endif
18734       goto __pyx_L0;
18735     }
18736     __pyx_L4_error: {
18737       #ifdef WITH_THREAD
18738       __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18739       #endif
18740       goto __pyx_L1_error;
18741     }
18742   }
18743 
18744   /* "yt/geometry/particle_deposit.pxd":120
18745  * # I manually created a function to lookup the kernel functions.
18746  * ctypedef np.float64_t (*kernel_func) (np.float64_t) nogil
18747  * cdef inline kernel_func get_kernel_func(str kernel_name) nogil:             # <<<<<<<<<<<<<<
18748  *     with gil:
18749  *         if kernel_name == 'cubic':
18750  */
18751 
18752   /* function exit code */
18753   __pyx_r = 0;
18754   goto __pyx_L0;
18755   __pyx_L1_error:;
18756   __Pyx_WriteUnraisable("yt.geometry.particle_deposit.get_kernel_func", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
18757   __pyx_r = 0;
18758   __pyx_L0:;
18759   #ifdef WITH_THREAD
18760   __Pyx_PyGILState_Release(__pyx_gilstate_save);
18761   #endif
18762   return __pyx_r;
18763 }
18764 
18765 /* "View.MemoryView":122
18766  *         cdef bint dtype_is_object
18767  *
18768  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
18769  *                   mode="c", bint allocate_buffer=True):
18770  *
18771  */
18772 
18773 /* Python wrapper */
18774 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_array___cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)18775 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18776   PyObject *__pyx_v_shape = 0;
18777   Py_ssize_t __pyx_v_itemsize;
18778   PyObject *__pyx_v_format = 0;
18779   PyObject *__pyx_v_mode = 0;
18780   int __pyx_v_allocate_buffer;
18781   int __pyx_r;
18782   __Pyx_RefNannyDeclarations
18783   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
18784   {
18785     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};
18786     PyObject* values[5] = {0,0,0,0,0};
18787     values[3] = ((PyObject *)__pyx_n_s_c);
18788     if (unlikely(__pyx_kwds)) {
18789       Py_ssize_t kw_args;
18790       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18791       switch (pos_args) {
18792         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18793         CYTHON_FALLTHROUGH;
18794         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18795         CYTHON_FALLTHROUGH;
18796         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18797         CYTHON_FALLTHROUGH;
18798         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18799         CYTHON_FALLTHROUGH;
18800         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18801         CYTHON_FALLTHROUGH;
18802         case  0: break;
18803         default: goto __pyx_L5_argtuple_error;
18804       }
18805       kw_args = PyDict_Size(__pyx_kwds);
18806       switch (pos_args) {
18807         case  0:
18808         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
18809         else goto __pyx_L5_argtuple_error;
18810         CYTHON_FALLTHROUGH;
18811         case  1:
18812         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
18813         else {
18814           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(2, 122, __pyx_L3_error)
18815         }
18816         CYTHON_FALLTHROUGH;
18817         case  2:
18818         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
18819         else {
18820           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(2, 122, __pyx_L3_error)
18821         }
18822         CYTHON_FALLTHROUGH;
18823         case  3:
18824         if (kw_args > 0) {
18825           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
18826           if (value) { values[3] = value; kw_args--; }
18827         }
18828         CYTHON_FALLTHROUGH;
18829         case  4:
18830         if (kw_args > 0) {
18831           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
18832           if (value) { values[4] = value; kw_args--; }
18833         }
18834       }
18835       if (unlikely(kw_args > 0)) {
18836         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 122, __pyx_L3_error)
18837       }
18838     } else {
18839       switch (PyTuple_GET_SIZE(__pyx_args)) {
18840         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
18841         CYTHON_FALLTHROUGH;
18842         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18843         CYTHON_FALLTHROUGH;
18844         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18845         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18846         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18847         break;
18848         default: goto __pyx_L5_argtuple_error;
18849       }
18850     }
18851     __pyx_v_shape = ((PyObject*)values[0]);
18852     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 122, __pyx_L3_error)
18853     __pyx_v_format = values[2];
18854     __pyx_v_mode = values[3];
18855     if (values[4]) {
18856       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 123, __pyx_L3_error)
18857     } else {
18858 
18859       /* "View.MemoryView":123
18860  *
18861  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
18862  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
18863  *
18864  *         cdef int idx
18865  */
18866       __pyx_v_allocate_buffer = ((int)1);
18867     }
18868   }
18869   goto __pyx_L4_argument_unpacking_done;
18870   __pyx_L5_argtuple_error:;
18871   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 122, __pyx_L3_error)
18872   __pyx_L3_error:;
18873   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18874   __Pyx_RefNannyFinishContext();
18875   return -1;
18876   __pyx_L4_argument_unpacking_done:;
18877   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(2, 122, __pyx_L1_error)
18878   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
18879     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(2, 122, __pyx_L1_error)
18880   }
18881   __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);
18882 
18883   /* "View.MemoryView":122
18884  *         cdef bint dtype_is_object
18885  *
18886  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
18887  *                   mode="c", bint allocate_buffer=True):
18888  *
18889  */
18890 
18891   /* function exit code */
18892   goto __pyx_L0;
18893   __pyx_L1_error:;
18894   __pyx_r = -1;
18895   __pyx_L0:;
18896   __Pyx_RefNannyFinishContext();
18897   return __pyx_r;
18898 }
18899 
__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)18900 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) {
18901   int __pyx_v_idx;
18902   Py_ssize_t __pyx_v_i;
18903   Py_ssize_t __pyx_v_dim;
18904   PyObject **__pyx_v_p;
18905   char __pyx_v_order;
18906   int __pyx_r;
18907   __Pyx_RefNannyDeclarations
18908   Py_ssize_t __pyx_t_1;
18909   int __pyx_t_2;
18910   PyObject *__pyx_t_3 = NULL;
18911   int __pyx_t_4;
18912   PyObject *__pyx_t_5 = NULL;
18913   PyObject *__pyx_t_6 = NULL;
18914   char *__pyx_t_7;
18915   int __pyx_t_8;
18916   Py_ssize_t __pyx_t_9;
18917   PyObject *__pyx_t_10 = NULL;
18918   Py_ssize_t __pyx_t_11;
18919   __Pyx_RefNannySetupContext("__cinit__", 0);
18920   __Pyx_INCREF(__pyx_v_format);
18921 
18922   /* "View.MemoryView":129
18923  *         cdef PyObject **p
18924  *
18925  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
18926  *         self.itemsize = itemsize
18927  *
18928  */
18929   if (unlikely(__pyx_v_shape == Py_None)) {
18930     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
18931     __PYX_ERR(2, 129, __pyx_L1_error)
18932   }
18933   __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 129, __pyx_L1_error)
18934   __pyx_v_self->ndim = ((int)__pyx_t_1);
18935 
18936   /* "View.MemoryView":130
18937  *
18938  *         self.ndim = <int> len(shape)
18939  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
18940  *
18941  *         if not self.ndim:
18942  */
18943   __pyx_v_self->itemsize = __pyx_v_itemsize;
18944 
18945   /* "View.MemoryView":132
18946  *         self.itemsize = itemsize
18947  *
18948  *         if not self.ndim:             # <<<<<<<<<<<<<<
18949  *             raise ValueError("Empty shape tuple for cython.array")
18950  *
18951  */
18952   __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
18953   if (unlikely(__pyx_t_2)) {
18954 
18955     /* "View.MemoryView":133
18956  *
18957  *         if not self.ndim:
18958  *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
18959  *
18960  *         if itemsize <= 0:
18961  */
18962     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 133, __pyx_L1_error)
18963     __Pyx_GOTREF(__pyx_t_3);
18964     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18965     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18966     __PYX_ERR(2, 133, __pyx_L1_error)
18967 
18968     /* "View.MemoryView":132
18969  *         self.itemsize = itemsize
18970  *
18971  *         if not self.ndim:             # <<<<<<<<<<<<<<
18972  *             raise ValueError("Empty shape tuple for cython.array")
18973  *
18974  */
18975   }
18976 
18977   /* "View.MemoryView":135
18978  *             raise ValueError("Empty shape tuple for cython.array")
18979  *
18980  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
18981  *             raise ValueError("itemsize <= 0 for cython.array")
18982  *
18983  */
18984   __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
18985   if (unlikely(__pyx_t_2)) {
18986 
18987     /* "View.MemoryView":136
18988  *
18989  *         if itemsize <= 0:
18990  *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
18991  *
18992  *         if not isinstance(format, bytes):
18993  */
18994     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 136, __pyx_L1_error)
18995     __Pyx_GOTREF(__pyx_t_3);
18996     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18997     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18998     __PYX_ERR(2, 136, __pyx_L1_error)
18999 
19000     /* "View.MemoryView":135
19001  *             raise ValueError("Empty shape tuple for cython.array")
19002  *
19003  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
19004  *             raise ValueError("itemsize <= 0 for cython.array")
19005  *
19006  */
19007   }
19008 
19009   /* "View.MemoryView":138
19010  *             raise ValueError("itemsize <= 0 for cython.array")
19011  *
19012  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
19013  *             format = format.encode('ASCII')
19014  *         self._format = format  # keep a reference to the byte string
19015  */
19016   __pyx_t_2 = PyBytes_Check(__pyx_v_format);
19017   __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
19018   if (__pyx_t_4) {
19019 
19020     /* "View.MemoryView":139
19021  *
19022  *         if not isinstance(format, bytes):
19023  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
19024  *         self._format = format  # keep a reference to the byte string
19025  *         self.format = self._format
19026  */
19027     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 139, __pyx_L1_error)
19028     __Pyx_GOTREF(__pyx_t_5);
19029     __pyx_t_6 = NULL;
19030     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
19031       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
19032       if (likely(__pyx_t_6)) {
19033         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
19034         __Pyx_INCREF(__pyx_t_6);
19035         __Pyx_INCREF(function);
19036         __Pyx_DECREF_SET(__pyx_t_5, function);
19037       }
19038     }
19039     __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);
19040     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19041     if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 139, __pyx_L1_error)
19042     __Pyx_GOTREF(__pyx_t_3);
19043     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19044     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
19045     __pyx_t_3 = 0;
19046 
19047     /* "View.MemoryView":138
19048  *             raise ValueError("itemsize <= 0 for cython.array")
19049  *
19050  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
19051  *             format = format.encode('ASCII')
19052  *         self._format = format  # keep a reference to the byte string
19053  */
19054   }
19055 
19056   /* "View.MemoryView":140
19057  *         if not isinstance(format, bytes):
19058  *             format = format.encode('ASCII')
19059  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
19060  *         self.format = self._format
19061  *
19062  */
19063   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(2, 140, __pyx_L1_error)
19064   __pyx_t_3 = __pyx_v_format;
19065   __Pyx_INCREF(__pyx_t_3);
19066   __Pyx_GIVEREF(__pyx_t_3);
19067   __Pyx_GOTREF(__pyx_v_self->_format);
19068   __Pyx_DECREF(__pyx_v_self->_format);
19069   __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
19070   __pyx_t_3 = 0;
19071 
19072   /* "View.MemoryView":141
19073  *             format = format.encode('ASCII')
19074  *         self._format = format  # keep a reference to the byte string
19075  *         self.format = self._format             # <<<<<<<<<<<<<<
19076  *
19077  *
19078  */
19079   if (unlikely(__pyx_v_self->_format == Py_None)) {
19080     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
19081     __PYX_ERR(2, 141, __pyx_L1_error)
19082   }
19083   __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 141, __pyx_L1_error)
19084   __pyx_v_self->format = __pyx_t_7;
19085 
19086   /* "View.MemoryView":144
19087  *
19088  *
19089  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
19090  *         self._strides = self._shape + self.ndim
19091  *
19092  */
19093   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
19094 
19095   /* "View.MemoryView":145
19096  *
19097  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
19098  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
19099  *
19100  *         if not self._shape:
19101  */
19102   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
19103 
19104   /* "View.MemoryView":147
19105  *         self._strides = self._shape + self.ndim
19106  *
19107  *         if not self._shape:             # <<<<<<<<<<<<<<
19108  *             raise MemoryError("unable to allocate shape and strides.")
19109  *
19110  */
19111   __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
19112   if (unlikely(__pyx_t_4)) {
19113 
19114     /* "View.MemoryView":148
19115  *
19116  *         if not self._shape:
19117  *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
19118  *
19119  *
19120  */
19121     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 148, __pyx_L1_error)
19122     __Pyx_GOTREF(__pyx_t_3);
19123     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19124     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19125     __PYX_ERR(2, 148, __pyx_L1_error)
19126 
19127     /* "View.MemoryView":147
19128  *         self._strides = self._shape + self.ndim
19129  *
19130  *         if not self._shape:             # <<<<<<<<<<<<<<
19131  *             raise MemoryError("unable to allocate shape and strides.")
19132  *
19133  */
19134   }
19135 
19136   /* "View.MemoryView":151
19137  *
19138  *
19139  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
19140  *             if dim <= 0:
19141  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
19142  */
19143   __pyx_t_8 = 0;
19144   __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
19145   for (;;) {
19146     if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
19147     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19148     __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(2, 151, __pyx_L1_error)
19149     #else
19150     __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 151, __pyx_L1_error)
19151     __Pyx_GOTREF(__pyx_t_5);
19152     #endif
19153     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 151, __pyx_L1_error)
19154     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19155     __pyx_v_dim = __pyx_t_9;
19156     __pyx_v_idx = __pyx_t_8;
19157     __pyx_t_8 = (__pyx_t_8 + 1);
19158 
19159     /* "View.MemoryView":152
19160  *
19161  *         for idx, dim in enumerate(shape):
19162  *             if dim <= 0:             # <<<<<<<<<<<<<<
19163  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
19164  *             self._shape[idx] = dim
19165  */
19166     __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
19167     if (unlikely(__pyx_t_4)) {
19168 
19169       /* "View.MemoryView":153
19170  *         for idx, dim in enumerate(shape):
19171  *             if dim <= 0:
19172  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))             # <<<<<<<<<<<<<<
19173  *             self._shape[idx] = dim
19174  *
19175  */
19176       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 153, __pyx_L1_error)
19177       __Pyx_GOTREF(__pyx_t_5);
19178       __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 153, __pyx_L1_error)
19179       __Pyx_GOTREF(__pyx_t_6);
19180       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 153, __pyx_L1_error)
19181       __Pyx_GOTREF(__pyx_t_10);
19182       __Pyx_GIVEREF(__pyx_t_5);
19183       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
19184       __Pyx_GIVEREF(__pyx_t_6);
19185       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
19186       __pyx_t_5 = 0;
19187       __pyx_t_6 = 0;
19188       __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(2, 153, __pyx_L1_error)
19189       __Pyx_GOTREF(__pyx_t_6);
19190       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19191       __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 153, __pyx_L1_error)
19192       __Pyx_GOTREF(__pyx_t_10);
19193       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19194       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
19195       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19196       __PYX_ERR(2, 153, __pyx_L1_error)
19197 
19198       /* "View.MemoryView":152
19199  *
19200  *         for idx, dim in enumerate(shape):
19201  *             if dim <= 0:             # <<<<<<<<<<<<<<
19202  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
19203  *             self._shape[idx] = dim
19204  */
19205     }
19206 
19207     /* "View.MemoryView":154
19208  *             if dim <= 0:
19209  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
19210  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
19211  *
19212  *         cdef char order
19213  */
19214     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
19215 
19216     /* "View.MemoryView":151
19217  *
19218  *
19219  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
19220  *             if dim <= 0:
19221  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
19222  */
19223   }
19224   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19225 
19226   /* "View.MemoryView":157
19227  *
19228  *         cdef char order
19229  *         if mode == 'fortran':             # <<<<<<<<<<<<<<
19230  *             order = b'F'
19231  *             self.mode = u'fortran'
19232  */
19233   __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 157, __pyx_L1_error)
19234   if (__pyx_t_4) {
19235 
19236     /* "View.MemoryView":158
19237  *         cdef char order
19238  *         if mode == 'fortran':
19239  *             order = b'F'             # <<<<<<<<<<<<<<
19240  *             self.mode = u'fortran'
19241  *         elif mode == 'c':
19242  */
19243     __pyx_v_order = 'F';
19244 
19245     /* "View.MemoryView":159
19246  *         if mode == 'fortran':
19247  *             order = b'F'
19248  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
19249  *         elif mode == 'c':
19250  *             order = b'C'
19251  */
19252     __Pyx_INCREF(__pyx_n_u_fortran);
19253     __Pyx_GIVEREF(__pyx_n_u_fortran);
19254     __Pyx_GOTREF(__pyx_v_self->mode);
19255     __Pyx_DECREF(__pyx_v_self->mode);
19256     __pyx_v_self->mode = __pyx_n_u_fortran;
19257 
19258     /* "View.MemoryView":157
19259  *
19260  *         cdef char order
19261  *         if mode == 'fortran':             # <<<<<<<<<<<<<<
19262  *             order = b'F'
19263  *             self.mode = u'fortran'
19264  */
19265     goto __pyx_L10;
19266   }
19267 
19268   /* "View.MemoryView":160
19269  *             order = b'F'
19270  *             self.mode = u'fortran'
19271  *         elif mode == 'c':             # <<<<<<<<<<<<<<
19272  *             order = b'C'
19273  *             self.mode = u'c'
19274  */
19275   __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 160, __pyx_L1_error)
19276   if (likely(__pyx_t_4)) {
19277 
19278     /* "View.MemoryView":161
19279  *             self.mode = u'fortran'
19280  *         elif mode == 'c':
19281  *             order = b'C'             # <<<<<<<<<<<<<<
19282  *             self.mode = u'c'
19283  *         else:
19284  */
19285     __pyx_v_order = 'C';
19286 
19287     /* "View.MemoryView":162
19288  *         elif mode == 'c':
19289  *             order = b'C'
19290  *             self.mode = u'c'             # <<<<<<<<<<<<<<
19291  *         else:
19292  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
19293  */
19294     __Pyx_INCREF(__pyx_n_u_c);
19295     __Pyx_GIVEREF(__pyx_n_u_c);
19296     __Pyx_GOTREF(__pyx_v_self->mode);
19297     __Pyx_DECREF(__pyx_v_self->mode);
19298     __pyx_v_self->mode = __pyx_n_u_c;
19299 
19300     /* "View.MemoryView":160
19301  *             order = b'F'
19302  *             self.mode = u'fortran'
19303  *         elif mode == 'c':             # <<<<<<<<<<<<<<
19304  *             order = b'C'
19305  *             self.mode = u'c'
19306  */
19307     goto __pyx_L10;
19308   }
19309 
19310   /* "View.MemoryView":164
19311  *             self.mode = u'c'
19312  *         else:
19313  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)             # <<<<<<<<<<<<<<
19314  *
19315  *         self.len = fill_contig_strides_array(self._shape, self._strides,
19316  */
19317   /*else*/ {
19318     __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(2, 164, __pyx_L1_error)
19319     __Pyx_GOTREF(__pyx_t_3);
19320     __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 164, __pyx_L1_error)
19321     __Pyx_GOTREF(__pyx_t_10);
19322     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19323     __Pyx_Raise(__pyx_t_10, 0, 0, 0);
19324     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19325     __PYX_ERR(2, 164, __pyx_L1_error)
19326   }
19327   __pyx_L10:;
19328 
19329   /* "View.MemoryView":166
19330  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
19331  *
19332  *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<
19333  *                                              itemsize, self.ndim, order)
19334  *
19335  */
19336   __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);
19337 
19338   /* "View.MemoryView":169
19339  *                                              itemsize, self.ndim, order)
19340  *
19341  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
19342  *         self.dtype_is_object = format == b'O'
19343  *         if allocate_buffer:
19344  */
19345   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
19346 
19347   /* "View.MemoryView":170
19348  *
19349  *         self.free_data = allocate_buffer
19350  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
19351  *         if allocate_buffer:
19352  *
19353  */
19354   __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(2, 170, __pyx_L1_error)
19355   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 170, __pyx_L1_error)
19356   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19357   __pyx_v_self->dtype_is_object = __pyx_t_4;
19358 
19359   /* "View.MemoryView":171
19360  *         self.free_data = allocate_buffer
19361  *         self.dtype_is_object = format == b'O'
19362  *         if allocate_buffer:             # <<<<<<<<<<<<<<
19363  *
19364  *
19365  */
19366   __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
19367   if (__pyx_t_4) {
19368 
19369     /* "View.MemoryView":174
19370  *
19371  *
19372  *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
19373  *             if not self.data:
19374  *                 raise MemoryError("unable to allocate array data.")
19375  */
19376     __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
19377 
19378     /* "View.MemoryView":175
19379  *
19380  *             self.data = <char *>malloc(self.len)
19381  *             if not self.data:             # <<<<<<<<<<<<<<
19382  *                 raise MemoryError("unable to allocate array data.")
19383  *
19384  */
19385     __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
19386     if (unlikely(__pyx_t_4)) {
19387 
19388       /* "View.MemoryView":176
19389  *             self.data = <char *>malloc(self.len)
19390  *             if not self.data:
19391  *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
19392  *
19393  *             if self.dtype_is_object:
19394  */
19395       __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 176, __pyx_L1_error)
19396       __Pyx_GOTREF(__pyx_t_10);
19397       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
19398       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19399       __PYX_ERR(2, 176, __pyx_L1_error)
19400 
19401       /* "View.MemoryView":175
19402  *
19403  *             self.data = <char *>malloc(self.len)
19404  *             if not self.data:             # <<<<<<<<<<<<<<
19405  *                 raise MemoryError("unable to allocate array data.")
19406  *
19407  */
19408     }
19409 
19410     /* "View.MemoryView":178
19411  *                 raise MemoryError("unable to allocate array data.")
19412  *
19413  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
19414  *                 p = <PyObject **> self.data
19415  *                 for i in range(self.len / itemsize):
19416  */
19417     __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
19418     if (__pyx_t_4) {
19419 
19420       /* "View.MemoryView":179
19421  *
19422  *             if self.dtype_is_object:
19423  *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<
19424  *                 for i in range(self.len / itemsize):
19425  *                     p[i] = Py_None
19426  */
19427       __pyx_v_p = ((PyObject **)__pyx_v_self->data);
19428 
19429       /* "View.MemoryView":180
19430  *             if self.dtype_is_object:
19431  *                 p = <PyObject **> self.data
19432  *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<
19433  *                     p[i] = Py_None
19434  *                     Py_INCREF(Py_None)
19435  */
19436       if (unlikely(__pyx_v_itemsize == 0)) {
19437         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
19438         __PYX_ERR(2, 180, __pyx_L1_error)
19439       }
19440       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))) {
19441         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
19442         __PYX_ERR(2, 180, __pyx_L1_error)
19443       }
19444       __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
19445       __pyx_t_9 = __pyx_t_1;
19446       for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
19447         __pyx_v_i = __pyx_t_11;
19448 
19449         /* "View.MemoryView":181
19450  *                 p = <PyObject **> self.data
19451  *                 for i in range(self.len / itemsize):
19452  *                     p[i] = Py_None             # <<<<<<<<<<<<<<
19453  *                     Py_INCREF(Py_None)
19454  *
19455  */
19456         (__pyx_v_p[__pyx_v_i]) = Py_None;
19457 
19458         /* "View.MemoryView":182
19459  *                 for i in range(self.len / itemsize):
19460  *                     p[i] = Py_None
19461  *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
19462  *
19463  *     @cname('getbuffer')
19464  */
19465         Py_INCREF(Py_None);
19466       }
19467 
19468       /* "View.MemoryView":178
19469  *                 raise MemoryError("unable to allocate array data.")
19470  *
19471  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
19472  *                 p = <PyObject **> self.data
19473  *                 for i in range(self.len / itemsize):
19474  */
19475     }
19476 
19477     /* "View.MemoryView":171
19478  *         self.free_data = allocate_buffer
19479  *         self.dtype_is_object = format == b'O'
19480  *         if allocate_buffer:             # <<<<<<<<<<<<<<
19481  *
19482  *
19483  */
19484   }
19485 
19486   /* "View.MemoryView":122
19487  *         cdef bint dtype_is_object
19488  *
19489  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
19490  *                   mode="c", bint allocate_buffer=True):
19491  *
19492  */
19493 
19494   /* function exit code */
19495   __pyx_r = 0;
19496   goto __pyx_L0;
19497   __pyx_L1_error:;
19498   __Pyx_XDECREF(__pyx_t_3);
19499   __Pyx_XDECREF(__pyx_t_5);
19500   __Pyx_XDECREF(__pyx_t_6);
19501   __Pyx_XDECREF(__pyx_t_10);
19502   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19503   __pyx_r = -1;
19504   __pyx_L0:;
19505   __Pyx_XDECREF(__pyx_v_format);
19506   __Pyx_RefNannyFinishContext();
19507   return __pyx_r;
19508 }
19509 
19510 /* "View.MemoryView":185
19511  *
19512  *     @cname('getbuffer')
19513  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
19514  *         cdef int bufmode = -1
19515  *         if self.mode == u"c":
19516  */
19517 
19518 /* Python wrapper */
19519 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_array_getbuffer(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)19520 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
19521   int __pyx_r;
19522   __Pyx_RefNannyDeclarations
19523   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
19524   __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));
19525 
19526   /* function exit code */
19527   __Pyx_RefNannyFinishContext();
19528   return __pyx_r;
19529 }
19530 
__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)19531 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) {
19532   int __pyx_v_bufmode;
19533   int __pyx_r;
19534   __Pyx_RefNannyDeclarations
19535   int __pyx_t_1;
19536   int __pyx_t_2;
19537   PyObject *__pyx_t_3 = NULL;
19538   char *__pyx_t_4;
19539   Py_ssize_t __pyx_t_5;
19540   int __pyx_t_6;
19541   Py_ssize_t *__pyx_t_7;
19542   if (__pyx_v_info == NULL) {
19543     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
19544     return -1;
19545   }
19546   __Pyx_RefNannySetupContext("__getbuffer__", 0);
19547   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
19548   __Pyx_GIVEREF(__pyx_v_info->obj);
19549 
19550   /* "View.MemoryView":186
19551  *     @cname('getbuffer')
19552  *     def __getbuffer__(self, Py_buffer *info, int flags):
19553  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
19554  *         if self.mode == u"c":
19555  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19556  */
19557   __pyx_v_bufmode = -1;
19558 
19559   /* "View.MemoryView":187
19560  *     def __getbuffer__(self, Py_buffer *info, int flags):
19561  *         cdef int bufmode = -1
19562  *         if self.mode == u"c":             # <<<<<<<<<<<<<<
19563  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19564  *         elif self.mode == u"fortran":
19565  */
19566   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 187, __pyx_L1_error)
19567   __pyx_t_2 = (__pyx_t_1 != 0);
19568   if (__pyx_t_2) {
19569 
19570     /* "View.MemoryView":188
19571  *         cdef int bufmode = -1
19572  *         if self.mode == u"c":
19573  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
19574  *         elif self.mode == u"fortran":
19575  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19576  */
19577     __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
19578 
19579     /* "View.MemoryView":187
19580  *     def __getbuffer__(self, Py_buffer *info, int flags):
19581  *         cdef int bufmode = -1
19582  *         if self.mode == u"c":             # <<<<<<<<<<<<<<
19583  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19584  *         elif self.mode == u"fortran":
19585  */
19586     goto __pyx_L3;
19587   }
19588 
19589   /* "View.MemoryView":189
19590  *         if self.mode == u"c":
19591  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19592  *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
19593  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19594  *         if not (flags & bufmode):
19595  */
19596   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 189, __pyx_L1_error)
19597   __pyx_t_1 = (__pyx_t_2 != 0);
19598   if (__pyx_t_1) {
19599 
19600     /* "View.MemoryView":190
19601  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19602  *         elif self.mode == u"fortran":
19603  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
19604  *         if not (flags & bufmode):
19605  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
19606  */
19607     __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
19608 
19609     /* "View.MemoryView":189
19610  *         if self.mode == u"c":
19611  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19612  *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
19613  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19614  *         if not (flags & bufmode):
19615  */
19616   }
19617   __pyx_L3:;
19618 
19619   /* "View.MemoryView":191
19620  *         elif self.mode == u"fortran":
19621  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19622  *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
19623  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
19624  *         info.buf = self.data
19625  */
19626   __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
19627   if (unlikely(__pyx_t_1)) {
19628 
19629     /* "View.MemoryView":192
19630  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19631  *         if not (flags & bufmode):
19632  *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
19633  *         info.buf = self.data
19634  *         info.len = self.len
19635  */
19636     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 192, __pyx_L1_error)
19637     __Pyx_GOTREF(__pyx_t_3);
19638     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19639     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19640     __PYX_ERR(2, 192, __pyx_L1_error)
19641 
19642     /* "View.MemoryView":191
19643  *         elif self.mode == u"fortran":
19644  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
19645  *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
19646  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
19647  *         info.buf = self.data
19648  */
19649   }
19650 
19651   /* "View.MemoryView":193
19652  *         if not (flags & bufmode):
19653  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
19654  *         info.buf = self.data             # <<<<<<<<<<<<<<
19655  *         info.len = self.len
19656  *         info.ndim = self.ndim
19657  */
19658   __pyx_t_4 = __pyx_v_self->data;
19659   __pyx_v_info->buf = __pyx_t_4;
19660 
19661   /* "View.MemoryView":194
19662  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
19663  *         info.buf = self.data
19664  *         info.len = self.len             # <<<<<<<<<<<<<<
19665  *         info.ndim = self.ndim
19666  *         info.shape = self._shape
19667  */
19668   __pyx_t_5 = __pyx_v_self->len;
19669   __pyx_v_info->len = __pyx_t_5;
19670 
19671   /* "View.MemoryView":195
19672  *         info.buf = self.data
19673  *         info.len = self.len
19674  *         info.ndim = self.ndim             # <<<<<<<<<<<<<<
19675  *         info.shape = self._shape
19676  *         info.strides = self._strides
19677  */
19678   __pyx_t_6 = __pyx_v_self->ndim;
19679   __pyx_v_info->ndim = __pyx_t_6;
19680 
19681   /* "View.MemoryView":196
19682  *         info.len = self.len
19683  *         info.ndim = self.ndim
19684  *         info.shape = self._shape             # <<<<<<<<<<<<<<
19685  *         info.strides = self._strides
19686  *         info.suboffsets = NULL
19687  */
19688   __pyx_t_7 = __pyx_v_self->_shape;
19689   __pyx_v_info->shape = __pyx_t_7;
19690 
19691   /* "View.MemoryView":197
19692  *         info.ndim = self.ndim
19693  *         info.shape = self._shape
19694  *         info.strides = self._strides             # <<<<<<<<<<<<<<
19695  *         info.suboffsets = NULL
19696  *         info.itemsize = self.itemsize
19697  */
19698   __pyx_t_7 = __pyx_v_self->_strides;
19699   __pyx_v_info->strides = __pyx_t_7;
19700 
19701   /* "View.MemoryView":198
19702  *         info.shape = self._shape
19703  *         info.strides = self._strides
19704  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
19705  *         info.itemsize = self.itemsize
19706  *         info.readonly = 0
19707  */
19708   __pyx_v_info->suboffsets = NULL;
19709 
19710   /* "View.MemoryView":199
19711  *         info.strides = self._strides
19712  *         info.suboffsets = NULL
19713  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
19714  *         info.readonly = 0
19715  *
19716  */
19717   __pyx_t_5 = __pyx_v_self->itemsize;
19718   __pyx_v_info->itemsize = __pyx_t_5;
19719 
19720   /* "View.MemoryView":200
19721  *         info.suboffsets = NULL
19722  *         info.itemsize = self.itemsize
19723  *         info.readonly = 0             # <<<<<<<<<<<<<<
19724  *
19725  *         if flags & PyBUF_FORMAT:
19726  */
19727   __pyx_v_info->readonly = 0;
19728 
19729   /* "View.MemoryView":202
19730  *         info.readonly = 0
19731  *
19732  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
19733  *             info.format = self.format
19734  *         else:
19735  */
19736   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
19737   if (__pyx_t_1) {
19738 
19739     /* "View.MemoryView":203
19740  *
19741  *         if flags & PyBUF_FORMAT:
19742  *             info.format = self.format             # <<<<<<<<<<<<<<
19743  *         else:
19744  *             info.format = NULL
19745  */
19746     __pyx_t_4 = __pyx_v_self->format;
19747     __pyx_v_info->format = __pyx_t_4;
19748 
19749     /* "View.MemoryView":202
19750  *         info.readonly = 0
19751  *
19752  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
19753  *             info.format = self.format
19754  *         else:
19755  */
19756     goto __pyx_L5;
19757   }
19758 
19759   /* "View.MemoryView":205
19760  *             info.format = self.format
19761  *         else:
19762  *             info.format = NULL             # <<<<<<<<<<<<<<
19763  *
19764  *         info.obj = self
19765  */
19766   /*else*/ {
19767     __pyx_v_info->format = NULL;
19768   }
19769   __pyx_L5:;
19770 
19771   /* "View.MemoryView":207
19772  *             info.format = NULL
19773  *
19774  *         info.obj = self             # <<<<<<<<<<<<<<
19775  *
19776  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
19777  */
19778   __Pyx_INCREF(((PyObject *)__pyx_v_self));
19779   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
19780   __Pyx_GOTREF(__pyx_v_info->obj);
19781   __Pyx_DECREF(__pyx_v_info->obj);
19782   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
19783 
19784   /* "View.MemoryView":185
19785  *
19786  *     @cname('getbuffer')
19787  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
19788  *         cdef int bufmode = -1
19789  *         if self.mode == u"c":
19790  */
19791 
19792   /* function exit code */
19793   __pyx_r = 0;
19794   goto __pyx_L0;
19795   __pyx_L1_error:;
19796   __Pyx_XDECREF(__pyx_t_3);
19797   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19798   __pyx_r = -1;
19799   if (__pyx_v_info->obj != NULL) {
19800     __Pyx_GOTREF(__pyx_v_info->obj);
19801     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
19802   }
19803   goto __pyx_L2;
19804   __pyx_L0:;
19805   if (__pyx_v_info->obj == Py_None) {
19806     __Pyx_GOTREF(__pyx_v_info->obj);
19807     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
19808   }
19809   __pyx_L2:;
19810   __Pyx_RefNannyFinishContext();
19811   return __pyx_r;
19812 }
19813 
19814 /* "View.MemoryView":211
19815  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
19816  *
19817  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
19818  *         if self.callback_free_data != NULL:
19819  *             self.callback_free_data(self.data)
19820  */
19821 
19822 /* Python wrapper */
19823 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_array___dealloc__(PyObject * __pyx_v_self)19824 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
19825   __Pyx_RefNannyDeclarations
19826   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
19827   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
19828 
19829   /* function exit code */
19830   __Pyx_RefNannyFinishContext();
19831 }
19832 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj * __pyx_v_self)19833 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
19834   __Pyx_RefNannyDeclarations
19835   int __pyx_t_1;
19836   __Pyx_RefNannySetupContext("__dealloc__", 0);
19837 
19838   /* "View.MemoryView":212
19839  *
19840  *     def __dealloc__(array self):
19841  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
19842  *             self.callback_free_data(self.data)
19843  *         elif self.free_data:
19844  */
19845   __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
19846   if (__pyx_t_1) {
19847 
19848     /* "View.MemoryView":213
19849  *     def __dealloc__(array self):
19850  *         if self.callback_free_data != NULL:
19851  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
19852  *         elif self.free_data:
19853  *             if self.dtype_is_object:
19854  */
19855     __pyx_v_self->callback_free_data(__pyx_v_self->data);
19856 
19857     /* "View.MemoryView":212
19858  *
19859  *     def __dealloc__(array self):
19860  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
19861  *             self.callback_free_data(self.data)
19862  *         elif self.free_data:
19863  */
19864     goto __pyx_L3;
19865   }
19866 
19867   /* "View.MemoryView":214
19868  *         if self.callback_free_data != NULL:
19869  *             self.callback_free_data(self.data)
19870  *         elif self.free_data:             # <<<<<<<<<<<<<<
19871  *             if self.dtype_is_object:
19872  *                 refcount_objects_in_slice(self.data, self._shape,
19873  */
19874   __pyx_t_1 = (__pyx_v_self->free_data != 0);
19875   if (__pyx_t_1) {
19876 
19877     /* "View.MemoryView":215
19878  *             self.callback_free_data(self.data)
19879  *         elif self.free_data:
19880  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
19881  *                 refcount_objects_in_slice(self.data, self._shape,
19882  *                                           self._strides, self.ndim, False)
19883  */
19884     __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
19885     if (__pyx_t_1) {
19886 
19887       /* "View.MemoryView":216
19888  *         elif self.free_data:
19889  *             if self.dtype_is_object:
19890  *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<
19891  *                                           self._strides, self.ndim, False)
19892  *             free(self.data)
19893  */
19894       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
19895 
19896       /* "View.MemoryView":215
19897  *             self.callback_free_data(self.data)
19898  *         elif self.free_data:
19899  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
19900  *                 refcount_objects_in_slice(self.data, self._shape,
19901  *                                           self._strides, self.ndim, False)
19902  */
19903     }
19904 
19905     /* "View.MemoryView":218
19906  *                 refcount_objects_in_slice(self.data, self._shape,
19907  *                                           self._strides, self.ndim, False)
19908  *             free(self.data)             # <<<<<<<<<<<<<<
19909  *         PyObject_Free(self._shape)
19910  *
19911  */
19912     free(__pyx_v_self->data);
19913 
19914     /* "View.MemoryView":214
19915  *         if self.callback_free_data != NULL:
19916  *             self.callback_free_data(self.data)
19917  *         elif self.free_data:             # <<<<<<<<<<<<<<
19918  *             if self.dtype_is_object:
19919  *                 refcount_objects_in_slice(self.data, self._shape,
19920  */
19921   }
19922   __pyx_L3:;
19923 
19924   /* "View.MemoryView":219
19925  *                                           self._strides, self.ndim, False)
19926  *             free(self.data)
19927  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
19928  *
19929  *     @property
19930  */
19931   PyObject_Free(__pyx_v_self->_shape);
19932 
19933   /* "View.MemoryView":211
19934  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
19935  *
19936  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
19937  *         if self.callback_free_data != NULL:
19938  *             self.callback_free_data(self.data)
19939  */
19940 
19941   /* function exit code */
19942   __Pyx_RefNannyFinishContext();
19943 }
19944 
19945 /* "View.MemoryView":222
19946  *
19947  *     @property
19948  *     def memview(self):             # <<<<<<<<<<<<<<
19949  *         return self.get_memview()
19950  *
19951  */
19952 
19953 /* Python wrapper */
19954 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject * __pyx_v_self)19955 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
19956   PyObject *__pyx_r = 0;
19957   __Pyx_RefNannyDeclarations
19958   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
19959   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
19960 
19961   /* function exit code */
19962   __Pyx_RefNannyFinishContext();
19963   return __pyx_r;
19964 }
19965 
__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj * __pyx_v_self)19966 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
19967   PyObject *__pyx_r = NULL;
19968   __Pyx_RefNannyDeclarations
19969   PyObject *__pyx_t_1 = NULL;
19970   __Pyx_RefNannySetupContext("__get__", 0);
19971 
19972   /* "View.MemoryView":223
19973  *     @property
19974  *     def memview(self):
19975  *         return self.get_memview()             # <<<<<<<<<<<<<<
19976  *
19977  *     @cname('get_memview')
19978  */
19979   __Pyx_XDECREF(__pyx_r);
19980   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 223, __pyx_L1_error)
19981   __Pyx_GOTREF(__pyx_t_1);
19982   __pyx_r = __pyx_t_1;
19983   __pyx_t_1 = 0;
19984   goto __pyx_L0;
19985 
19986   /* "View.MemoryView":222
19987  *
19988  *     @property
19989  *     def memview(self):             # <<<<<<<<<<<<<<
19990  *         return self.get_memview()
19991  *
19992  */
19993 
19994   /* function exit code */
19995   __pyx_L1_error:;
19996   __Pyx_XDECREF(__pyx_t_1);
19997   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19998   __pyx_r = NULL;
19999   __pyx_L0:;
20000   __Pyx_XGIVEREF(__pyx_r);
20001   __Pyx_RefNannyFinishContext();
20002   return __pyx_r;
20003 }
20004 
20005 /* "View.MemoryView":226
20006  *
20007  *     @cname('get_memview')
20008  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
20009  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
20010  *         return  memoryview(self, flags, self.dtype_is_object)
20011  */
20012 
__pyx_array_get_memview(struct __pyx_array_obj * __pyx_v_self)20013 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
20014   int __pyx_v_flags;
20015   PyObject *__pyx_r = NULL;
20016   __Pyx_RefNannyDeclarations
20017   PyObject *__pyx_t_1 = NULL;
20018   PyObject *__pyx_t_2 = NULL;
20019   PyObject *__pyx_t_3 = NULL;
20020   __Pyx_RefNannySetupContext("get_memview", 0);
20021 
20022   /* "View.MemoryView":227
20023  *     @cname('get_memview')
20024  *     cdef get_memview(self):
20025  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
20026  *         return  memoryview(self, flags, self.dtype_is_object)
20027  *
20028  */
20029   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
20030 
20031   /* "View.MemoryView":228
20032  *     cdef get_memview(self):
20033  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
20034  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
20035  *
20036  *     def __len__(self):
20037  */
20038   __Pyx_XDECREF(__pyx_r);
20039   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 228, __pyx_L1_error)
20040   __Pyx_GOTREF(__pyx_t_1);
20041   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 228, __pyx_L1_error)
20042   __Pyx_GOTREF(__pyx_t_2);
20043   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 228, __pyx_L1_error)
20044   __Pyx_GOTREF(__pyx_t_3);
20045   __Pyx_INCREF(((PyObject *)__pyx_v_self));
20046   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
20047   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
20048   __Pyx_GIVEREF(__pyx_t_1);
20049   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
20050   __Pyx_GIVEREF(__pyx_t_2);
20051   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
20052   __pyx_t_1 = 0;
20053   __pyx_t_2 = 0;
20054   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 228, __pyx_L1_error)
20055   __Pyx_GOTREF(__pyx_t_2);
20056   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20057   __pyx_r = __pyx_t_2;
20058   __pyx_t_2 = 0;
20059   goto __pyx_L0;
20060 
20061   /* "View.MemoryView":226
20062  *
20063  *     @cname('get_memview')
20064  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
20065  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
20066  *         return  memoryview(self, flags, self.dtype_is_object)
20067  */
20068 
20069   /* function exit code */
20070   __pyx_L1_error:;
20071   __Pyx_XDECREF(__pyx_t_1);
20072   __Pyx_XDECREF(__pyx_t_2);
20073   __Pyx_XDECREF(__pyx_t_3);
20074   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
20075   __pyx_r = 0;
20076   __pyx_L0:;
20077   __Pyx_XGIVEREF(__pyx_r);
20078   __Pyx_RefNannyFinishContext();
20079   return __pyx_r;
20080 }
20081 
20082 /* "View.MemoryView":230
20083  *         return  memoryview(self, flags, self.dtype_is_object)
20084  *
20085  *     def __len__(self):             # <<<<<<<<<<<<<<
20086  *         return self._shape[0]
20087  *
20088  */
20089 
20090 /* Python wrapper */
20091 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
__pyx_array___len__(PyObject * __pyx_v_self)20092 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
20093   Py_ssize_t __pyx_r;
20094   __Pyx_RefNannyDeclarations
20095   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
20096   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
20097 
20098   /* function exit code */
20099   __Pyx_RefNannyFinishContext();
20100   return __pyx_r;
20101 }
20102 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj * __pyx_v_self)20103 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
20104   Py_ssize_t __pyx_r;
20105   __Pyx_RefNannyDeclarations
20106   __Pyx_RefNannySetupContext("__len__", 0);
20107 
20108   /* "View.MemoryView":231
20109  *
20110  *     def __len__(self):
20111  *         return self._shape[0]             # <<<<<<<<<<<<<<
20112  *
20113  *     def __getattr__(self, attr):
20114  */
20115   __pyx_r = (__pyx_v_self->_shape[0]);
20116   goto __pyx_L0;
20117 
20118   /* "View.MemoryView":230
20119  *         return  memoryview(self, flags, self.dtype_is_object)
20120  *
20121  *     def __len__(self):             # <<<<<<<<<<<<<<
20122  *         return self._shape[0]
20123  *
20124  */
20125 
20126   /* function exit code */
20127   __pyx_L0:;
20128   __Pyx_RefNannyFinishContext();
20129   return __pyx_r;
20130 }
20131 
20132 /* "View.MemoryView":233
20133  *         return self._shape[0]
20134  *
20135  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
20136  *         return getattr(self.memview, attr)
20137  *
20138  */
20139 
20140 /* Python wrapper */
20141 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
__pyx_array___getattr__(PyObject * __pyx_v_self,PyObject * __pyx_v_attr)20142 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
20143   PyObject *__pyx_r = 0;
20144   __Pyx_RefNannyDeclarations
20145   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
20146   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
20147 
20148   /* function exit code */
20149   __Pyx_RefNannyFinishContext();
20150   return __pyx_r;
20151 }
20152 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_attr)20153 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
20154   PyObject *__pyx_r = NULL;
20155   __Pyx_RefNannyDeclarations
20156   PyObject *__pyx_t_1 = NULL;
20157   PyObject *__pyx_t_2 = NULL;
20158   __Pyx_RefNannySetupContext("__getattr__", 0);
20159 
20160   /* "View.MemoryView":234
20161  *
20162  *     def __getattr__(self, attr):
20163  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
20164  *
20165  *     def __getitem__(self, item):
20166  */
20167   __Pyx_XDECREF(__pyx_r);
20168   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 234, __pyx_L1_error)
20169   __Pyx_GOTREF(__pyx_t_1);
20170   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 234, __pyx_L1_error)
20171   __Pyx_GOTREF(__pyx_t_2);
20172   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20173   __pyx_r = __pyx_t_2;
20174   __pyx_t_2 = 0;
20175   goto __pyx_L0;
20176 
20177   /* "View.MemoryView":233
20178  *         return self._shape[0]
20179  *
20180  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
20181  *         return getattr(self.memview, attr)
20182  *
20183  */
20184 
20185   /* function exit code */
20186   __pyx_L1_error:;
20187   __Pyx_XDECREF(__pyx_t_1);
20188   __Pyx_XDECREF(__pyx_t_2);
20189   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20190   __pyx_r = NULL;
20191   __pyx_L0:;
20192   __Pyx_XGIVEREF(__pyx_r);
20193   __Pyx_RefNannyFinishContext();
20194   return __pyx_r;
20195 }
20196 
20197 /* "View.MemoryView":236
20198  *         return getattr(self.memview, attr)
20199  *
20200  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
20201  *         return self.memview[item]
20202  *
20203  */
20204 
20205 /* Python wrapper */
20206 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
__pyx_array___getitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_item)20207 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
20208   PyObject *__pyx_r = 0;
20209   __Pyx_RefNannyDeclarations
20210   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
20211   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
20212 
20213   /* function exit code */
20214   __Pyx_RefNannyFinishContext();
20215   return __pyx_r;
20216 }
20217 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_item)20218 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
20219   PyObject *__pyx_r = NULL;
20220   __Pyx_RefNannyDeclarations
20221   PyObject *__pyx_t_1 = NULL;
20222   PyObject *__pyx_t_2 = NULL;
20223   __Pyx_RefNannySetupContext("__getitem__", 0);
20224 
20225   /* "View.MemoryView":237
20226  *
20227  *     def __getitem__(self, item):
20228  *         return self.memview[item]             # <<<<<<<<<<<<<<
20229  *
20230  *     def __setitem__(self, item, value):
20231  */
20232   __Pyx_XDECREF(__pyx_r);
20233   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 237, __pyx_L1_error)
20234   __Pyx_GOTREF(__pyx_t_1);
20235   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 237, __pyx_L1_error)
20236   __Pyx_GOTREF(__pyx_t_2);
20237   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20238   __pyx_r = __pyx_t_2;
20239   __pyx_t_2 = 0;
20240   goto __pyx_L0;
20241 
20242   /* "View.MemoryView":236
20243  *         return getattr(self.memview, attr)
20244  *
20245  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
20246  *         return self.memview[item]
20247  *
20248  */
20249 
20250   /* function exit code */
20251   __pyx_L1_error:;
20252   __Pyx_XDECREF(__pyx_t_1);
20253   __Pyx_XDECREF(__pyx_t_2);
20254   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20255   __pyx_r = NULL;
20256   __pyx_L0:;
20257   __Pyx_XGIVEREF(__pyx_r);
20258   __Pyx_RefNannyFinishContext();
20259   return __pyx_r;
20260 }
20261 
20262 /* "View.MemoryView":239
20263  *         return self.memview[item]
20264  *
20265  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
20266  *         self.memview[item] = value
20267  *
20268  */
20269 
20270 /* Python wrapper */
20271 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
__pyx_array___setitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_item,PyObject * __pyx_v_value)20272 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
20273   int __pyx_r;
20274   __Pyx_RefNannyDeclarations
20275   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
20276   __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));
20277 
20278   /* function exit code */
20279   __Pyx_RefNannyFinishContext();
20280   return __pyx_r;
20281 }
20282 
__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)20283 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) {
20284   int __pyx_r;
20285   __Pyx_RefNannyDeclarations
20286   PyObject *__pyx_t_1 = NULL;
20287   __Pyx_RefNannySetupContext("__setitem__", 0);
20288 
20289   /* "View.MemoryView":240
20290  *
20291  *     def __setitem__(self, item, value):
20292  *         self.memview[item] = value             # <<<<<<<<<<<<<<
20293  *
20294  *
20295  */
20296   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 240, __pyx_L1_error)
20297   __Pyx_GOTREF(__pyx_t_1);
20298   if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(2, 240, __pyx_L1_error)
20299   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20300 
20301   /* "View.MemoryView":239
20302  *         return self.memview[item]
20303  *
20304  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
20305  *         self.memview[item] = value
20306  *
20307  */
20308 
20309   /* function exit code */
20310   __pyx_r = 0;
20311   goto __pyx_L0;
20312   __pyx_L1_error:;
20313   __Pyx_XDECREF(__pyx_t_1);
20314   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20315   __pyx_r = -1;
20316   __pyx_L0:;
20317   __Pyx_RefNannyFinishContext();
20318   return __pyx_r;
20319 }
20320 
20321 /* "(tree fragment)":1
20322  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
20323  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20324  * def __setstate_cython__(self, __pyx_state):
20325  */
20326 
20327 /* Python wrapper */
20328 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_array_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)20329 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
20330   PyObject *__pyx_r = 0;
20331   __Pyx_RefNannyDeclarations
20332   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
20333   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
20334 
20335   /* function exit code */
20336   __Pyx_RefNannyFinishContext();
20337   return __pyx_r;
20338 }
20339 
__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj * __pyx_v_self)20340 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
20341   PyObject *__pyx_r = NULL;
20342   __Pyx_RefNannyDeclarations
20343   PyObject *__pyx_t_1 = NULL;
20344   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
20345 
20346   /* "(tree fragment)":2
20347  * def __reduce_cython__(self):
20348  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
20349  * def __setstate_cython__(self, __pyx_state):
20350  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20351  */
20352   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
20353   __Pyx_GOTREF(__pyx_t_1);
20354   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
20355   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20356   __PYX_ERR(2, 2, __pyx_L1_error)
20357 
20358   /* "(tree fragment)":1
20359  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
20360  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20361  * def __setstate_cython__(self, __pyx_state):
20362  */
20363 
20364   /* function exit code */
20365   __pyx_L1_error:;
20366   __Pyx_XDECREF(__pyx_t_1);
20367   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20368   __pyx_r = NULL;
20369   __Pyx_XGIVEREF(__pyx_r);
20370   __Pyx_RefNannyFinishContext();
20371   return __pyx_r;
20372 }
20373 
20374 /* "(tree fragment)":3
20375  * def __reduce_cython__(self):
20376  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20377  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
20378  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20379  */
20380 
20381 /* Python wrapper */
20382 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_array_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)20383 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
20384   PyObject *__pyx_r = 0;
20385   __Pyx_RefNannyDeclarations
20386   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
20387   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
20388 
20389   /* function exit code */
20390   __Pyx_RefNannyFinishContext();
20391   return __pyx_r;
20392 }
20393 
__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)20394 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) {
20395   PyObject *__pyx_r = NULL;
20396   __Pyx_RefNannyDeclarations
20397   PyObject *__pyx_t_1 = NULL;
20398   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
20399 
20400   /* "(tree fragment)":4
20401  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20402  * def __setstate_cython__(self, __pyx_state):
20403  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
20404  */
20405   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
20406   __Pyx_GOTREF(__pyx_t_1);
20407   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
20408   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20409   __PYX_ERR(2, 4, __pyx_L1_error)
20410 
20411   /* "(tree fragment)":3
20412  * def __reduce_cython__(self):
20413  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20414  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
20415  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20416  */
20417 
20418   /* function exit code */
20419   __pyx_L1_error:;
20420   __Pyx_XDECREF(__pyx_t_1);
20421   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20422   __pyx_r = NULL;
20423   __Pyx_XGIVEREF(__pyx_r);
20424   __Pyx_RefNannyFinishContext();
20425   return __pyx_r;
20426 }
20427 
20428 /* "View.MemoryView":244
20429  *
20430  * @cname("__pyx_array_new")
20431  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
20432  *                           char *mode, char *buf):
20433  *     cdef array result
20434  */
20435 
__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)20436 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) {
20437   struct __pyx_array_obj *__pyx_v_result = 0;
20438   struct __pyx_array_obj *__pyx_r = NULL;
20439   __Pyx_RefNannyDeclarations
20440   int __pyx_t_1;
20441   PyObject *__pyx_t_2 = NULL;
20442   PyObject *__pyx_t_3 = NULL;
20443   PyObject *__pyx_t_4 = NULL;
20444   PyObject *__pyx_t_5 = NULL;
20445   __Pyx_RefNannySetupContext("array_cwrapper", 0);
20446 
20447   /* "View.MemoryView":248
20448  *     cdef array result
20449  *
20450  *     if buf == NULL:             # <<<<<<<<<<<<<<
20451  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
20452  *     else:
20453  */
20454   __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
20455   if (__pyx_t_1) {
20456 
20457     /* "View.MemoryView":249
20458  *
20459  *     if buf == NULL:
20460  *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<
20461  *     else:
20462  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
20463  */
20464     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 249, __pyx_L1_error)
20465     __Pyx_GOTREF(__pyx_t_2);
20466     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 249, __pyx_L1_error)
20467     __Pyx_GOTREF(__pyx_t_3);
20468     __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(2, 249, __pyx_L1_error)
20469     __Pyx_GOTREF(__pyx_t_4);
20470     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 249, __pyx_L1_error)
20471     __Pyx_GOTREF(__pyx_t_5);
20472     __Pyx_INCREF(__pyx_v_shape);
20473     __Pyx_GIVEREF(__pyx_v_shape);
20474     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
20475     __Pyx_GIVEREF(__pyx_t_2);
20476     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
20477     __Pyx_GIVEREF(__pyx_t_3);
20478     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
20479     __Pyx_GIVEREF(__pyx_t_4);
20480     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
20481     __pyx_t_2 = 0;
20482     __pyx_t_3 = 0;
20483     __pyx_t_4 = 0;
20484     __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 249, __pyx_L1_error)
20485     __Pyx_GOTREF(__pyx_t_4);
20486     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20487     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
20488     __pyx_t_4 = 0;
20489 
20490     /* "View.MemoryView":248
20491  *     cdef array result
20492  *
20493  *     if buf == NULL:             # <<<<<<<<<<<<<<
20494  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
20495  *     else:
20496  */
20497     goto __pyx_L3;
20498   }
20499 
20500   /* "View.MemoryView":251
20501  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
20502  *     else:
20503  *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
20504  *                        allocate_buffer=False)
20505  *         result.data = buf
20506  */
20507   /*else*/ {
20508     __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 251, __pyx_L1_error)
20509     __Pyx_GOTREF(__pyx_t_4);
20510     __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 251, __pyx_L1_error)
20511     __Pyx_GOTREF(__pyx_t_5);
20512     __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(2, 251, __pyx_L1_error)
20513     __Pyx_GOTREF(__pyx_t_3);
20514     __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 251, __pyx_L1_error)
20515     __Pyx_GOTREF(__pyx_t_2);
20516     __Pyx_INCREF(__pyx_v_shape);
20517     __Pyx_GIVEREF(__pyx_v_shape);
20518     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
20519     __Pyx_GIVEREF(__pyx_t_4);
20520     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
20521     __Pyx_GIVEREF(__pyx_t_5);
20522     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
20523     __Pyx_GIVEREF(__pyx_t_3);
20524     PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
20525     __pyx_t_4 = 0;
20526     __pyx_t_5 = 0;
20527     __pyx_t_3 = 0;
20528 
20529     /* "View.MemoryView":252
20530  *     else:
20531  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
20532  *                        allocate_buffer=False)             # <<<<<<<<<<<<<<
20533  *         result.data = buf
20534  *
20535  */
20536     __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 252, __pyx_L1_error)
20537     __Pyx_GOTREF(__pyx_t_3);
20538     if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(2, 252, __pyx_L1_error)
20539 
20540     /* "View.MemoryView":251
20541  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
20542  *     else:
20543  *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
20544  *                        allocate_buffer=False)
20545  *         result.data = buf
20546  */
20547     __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 251, __pyx_L1_error)
20548     __Pyx_GOTREF(__pyx_t_5);
20549     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20550     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20551     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
20552     __pyx_t_5 = 0;
20553 
20554     /* "View.MemoryView":253
20555  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
20556  *                        allocate_buffer=False)
20557  *         result.data = buf             # <<<<<<<<<<<<<<
20558  *
20559  *     return result
20560  */
20561     __pyx_v_result->data = __pyx_v_buf;
20562   }
20563   __pyx_L3:;
20564 
20565   /* "View.MemoryView":255
20566  *         result.data = buf
20567  *
20568  *     return result             # <<<<<<<<<<<<<<
20569  *
20570  *
20571  */
20572   __Pyx_XDECREF(((PyObject *)__pyx_r));
20573   __Pyx_INCREF(((PyObject *)__pyx_v_result));
20574   __pyx_r = __pyx_v_result;
20575   goto __pyx_L0;
20576 
20577   /* "View.MemoryView":244
20578  *
20579  * @cname("__pyx_array_new")
20580  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
20581  *                           char *mode, char *buf):
20582  *     cdef array result
20583  */
20584 
20585   /* function exit code */
20586   __pyx_L1_error:;
20587   __Pyx_XDECREF(__pyx_t_2);
20588   __Pyx_XDECREF(__pyx_t_3);
20589   __Pyx_XDECREF(__pyx_t_4);
20590   __Pyx_XDECREF(__pyx_t_5);
20591   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
20592   __pyx_r = 0;
20593   __pyx_L0:;
20594   __Pyx_XDECREF((PyObject *)__pyx_v_result);
20595   __Pyx_XGIVEREF((PyObject *)__pyx_r);
20596   __Pyx_RefNannyFinishContext();
20597   return __pyx_r;
20598 }
20599 
20600 /* "View.MemoryView":281
20601  * cdef class Enum(object):
20602  *     cdef object name
20603  *     def __init__(self, name):             # <<<<<<<<<<<<<<
20604  *         self.name = name
20605  *     def __repr__(self):
20606  */
20607 
20608 /* Python wrapper */
20609 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_MemviewEnum___init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)20610 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20611   PyObject *__pyx_v_name = 0;
20612   int __pyx_r;
20613   __Pyx_RefNannyDeclarations
20614   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
20615   {
20616     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
20617     PyObject* values[1] = {0};
20618     if (unlikely(__pyx_kwds)) {
20619       Py_ssize_t kw_args;
20620       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20621       switch (pos_args) {
20622         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20623         CYTHON_FALLTHROUGH;
20624         case  0: break;
20625         default: goto __pyx_L5_argtuple_error;
20626       }
20627       kw_args = PyDict_Size(__pyx_kwds);
20628       switch (pos_args) {
20629         case  0:
20630         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
20631         else goto __pyx_L5_argtuple_error;
20632       }
20633       if (unlikely(kw_args > 0)) {
20634         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 281, __pyx_L3_error)
20635       }
20636     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
20637       goto __pyx_L5_argtuple_error;
20638     } else {
20639       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20640     }
20641     __pyx_v_name = values[0];
20642   }
20643   goto __pyx_L4_argument_unpacking_done;
20644   __pyx_L5_argtuple_error:;
20645   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 281, __pyx_L3_error)
20646   __pyx_L3_error:;
20647   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20648   __Pyx_RefNannyFinishContext();
20649   return -1;
20650   __pyx_L4_argument_unpacking_done:;
20651   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
20652 
20653   /* function exit code */
20654   __Pyx_RefNannyFinishContext();
20655   return __pyx_r;
20656 }
20657 
__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj * __pyx_v_self,PyObject * __pyx_v_name)20658 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
20659   int __pyx_r;
20660   __Pyx_RefNannyDeclarations
20661   __Pyx_RefNannySetupContext("__init__", 0);
20662 
20663   /* "View.MemoryView":282
20664  *     cdef object name
20665  *     def __init__(self, name):
20666  *         self.name = name             # <<<<<<<<<<<<<<
20667  *     def __repr__(self):
20668  *         return self.name
20669  */
20670   __Pyx_INCREF(__pyx_v_name);
20671   __Pyx_GIVEREF(__pyx_v_name);
20672   __Pyx_GOTREF(__pyx_v_self->name);
20673   __Pyx_DECREF(__pyx_v_self->name);
20674   __pyx_v_self->name = __pyx_v_name;
20675 
20676   /* "View.MemoryView":281
20677  * cdef class Enum(object):
20678  *     cdef object name
20679  *     def __init__(self, name):             # <<<<<<<<<<<<<<
20680  *         self.name = name
20681  *     def __repr__(self):
20682  */
20683 
20684   /* function exit code */
20685   __pyx_r = 0;
20686   __Pyx_RefNannyFinishContext();
20687   return __pyx_r;
20688 }
20689 
20690 /* "View.MemoryView":283
20691  *     def __init__(self, name):
20692  *         self.name = name
20693  *     def __repr__(self):             # <<<<<<<<<<<<<<
20694  *         return self.name
20695  *
20696  */
20697 
20698 /* Python wrapper */
20699 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
__pyx_MemviewEnum___repr__(PyObject * __pyx_v_self)20700 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
20701   PyObject *__pyx_r = 0;
20702   __Pyx_RefNannyDeclarations
20703   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
20704   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
20705 
20706   /* function exit code */
20707   __Pyx_RefNannyFinishContext();
20708   return __pyx_r;
20709 }
20710 
__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj * __pyx_v_self)20711 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
20712   PyObject *__pyx_r = NULL;
20713   __Pyx_RefNannyDeclarations
20714   __Pyx_RefNannySetupContext("__repr__", 0);
20715 
20716   /* "View.MemoryView":284
20717  *         self.name = name
20718  *     def __repr__(self):
20719  *         return self.name             # <<<<<<<<<<<<<<
20720  *
20721  * cdef generic = Enum("<strided and direct or indirect>")
20722  */
20723   __Pyx_XDECREF(__pyx_r);
20724   __Pyx_INCREF(__pyx_v_self->name);
20725   __pyx_r = __pyx_v_self->name;
20726   goto __pyx_L0;
20727 
20728   /* "View.MemoryView":283
20729  *     def __init__(self, name):
20730  *         self.name = name
20731  *     def __repr__(self):             # <<<<<<<<<<<<<<
20732  *         return self.name
20733  *
20734  */
20735 
20736   /* function exit code */
20737   __pyx_L0:;
20738   __Pyx_XGIVEREF(__pyx_r);
20739   __Pyx_RefNannyFinishContext();
20740   return __pyx_r;
20741 }
20742 
20743 /* "(tree fragment)":1
20744  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
20745  *     cdef tuple state
20746  *     cdef object _dict
20747  */
20748 
20749 /* Python wrapper */
20750 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)20751 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
20752   PyObject *__pyx_r = 0;
20753   __Pyx_RefNannyDeclarations
20754   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
20755   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
20756 
20757   /* function exit code */
20758   __Pyx_RefNannyFinishContext();
20759   return __pyx_r;
20760 }
20761 
__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj * __pyx_v_self)20762 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
20763   PyObject *__pyx_v_state = 0;
20764   PyObject *__pyx_v__dict = 0;
20765   int __pyx_v_use_setstate;
20766   PyObject *__pyx_r = NULL;
20767   __Pyx_RefNannyDeclarations
20768   PyObject *__pyx_t_1 = NULL;
20769   int __pyx_t_2;
20770   int __pyx_t_3;
20771   PyObject *__pyx_t_4 = NULL;
20772   PyObject *__pyx_t_5 = NULL;
20773   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
20774 
20775   /* "(tree fragment)":5
20776  *     cdef object _dict
20777  *     cdef bint use_setstate
20778  *     state = (self.name,)             # <<<<<<<<<<<<<<
20779  *     _dict = getattr(self, '__dict__', None)
20780  *     if _dict is not None:
20781  */
20782   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
20783   __Pyx_GOTREF(__pyx_t_1);
20784   __Pyx_INCREF(__pyx_v_self->name);
20785   __Pyx_GIVEREF(__pyx_v_self->name);
20786   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
20787   __pyx_v_state = ((PyObject*)__pyx_t_1);
20788   __pyx_t_1 = 0;
20789 
20790   /* "(tree fragment)":6
20791  *     cdef bint use_setstate
20792  *     state = (self.name,)
20793  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
20794  *     if _dict is not None:
20795  *         state += (_dict,)
20796  */
20797   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
20798   __Pyx_GOTREF(__pyx_t_1);
20799   __pyx_v__dict = __pyx_t_1;
20800   __pyx_t_1 = 0;
20801 
20802   /* "(tree fragment)":7
20803  *     state = (self.name,)
20804  *     _dict = getattr(self, '__dict__', None)
20805  *     if _dict is not None:             # <<<<<<<<<<<<<<
20806  *         state += (_dict,)
20807  *         use_setstate = True
20808  */
20809   __pyx_t_2 = (__pyx_v__dict != Py_None);
20810   __pyx_t_3 = (__pyx_t_2 != 0);
20811   if (__pyx_t_3) {
20812 
20813     /* "(tree fragment)":8
20814  *     _dict = getattr(self, '__dict__', None)
20815  *     if _dict is not None:
20816  *         state += (_dict,)             # <<<<<<<<<<<<<<
20817  *         use_setstate = True
20818  *     else:
20819  */
20820     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
20821     __Pyx_GOTREF(__pyx_t_1);
20822     __Pyx_INCREF(__pyx_v__dict);
20823     __Pyx_GIVEREF(__pyx_v__dict);
20824     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
20825     __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
20826     __Pyx_GOTREF(__pyx_t_4);
20827     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20828     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
20829     __pyx_t_4 = 0;
20830 
20831     /* "(tree fragment)":9
20832  *     if _dict is not None:
20833  *         state += (_dict,)
20834  *         use_setstate = True             # <<<<<<<<<<<<<<
20835  *     else:
20836  *         use_setstate = self.name is not None
20837  */
20838     __pyx_v_use_setstate = 1;
20839 
20840     /* "(tree fragment)":7
20841  *     state = (self.name,)
20842  *     _dict = getattr(self, '__dict__', None)
20843  *     if _dict is not None:             # <<<<<<<<<<<<<<
20844  *         state += (_dict,)
20845  *         use_setstate = True
20846  */
20847     goto __pyx_L3;
20848   }
20849 
20850   /* "(tree fragment)":11
20851  *         use_setstate = True
20852  *     else:
20853  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
20854  *     if use_setstate:
20855  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
20856  */
20857   /*else*/ {
20858     __pyx_t_3 = (__pyx_v_self->name != Py_None);
20859     __pyx_v_use_setstate = __pyx_t_3;
20860   }
20861   __pyx_L3:;
20862 
20863   /* "(tree fragment)":12
20864  *     else:
20865  *         use_setstate = self.name is not None
20866  *     if use_setstate:             # <<<<<<<<<<<<<<
20867  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
20868  *     else:
20869  */
20870   __pyx_t_3 = (__pyx_v_use_setstate != 0);
20871   if (__pyx_t_3) {
20872 
20873     /* "(tree fragment)":13
20874  *         use_setstate = self.name is not None
20875  *     if use_setstate:
20876  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<
20877  *     else:
20878  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
20879  */
20880     __Pyx_XDECREF(__pyx_r);
20881     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
20882     __Pyx_GOTREF(__pyx_t_4);
20883     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
20884     __Pyx_GOTREF(__pyx_t_1);
20885     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
20886     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
20887     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
20888     __Pyx_INCREF(__pyx_int_184977713);
20889     __Pyx_GIVEREF(__pyx_int_184977713);
20890     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
20891     __Pyx_INCREF(Py_None);
20892     __Pyx_GIVEREF(Py_None);
20893     PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
20894     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
20895     __Pyx_GOTREF(__pyx_t_5);
20896     __Pyx_GIVEREF(__pyx_t_4);
20897     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
20898     __Pyx_GIVEREF(__pyx_t_1);
20899     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
20900     __Pyx_INCREF(__pyx_v_state);
20901     __Pyx_GIVEREF(__pyx_v_state);
20902     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
20903     __pyx_t_4 = 0;
20904     __pyx_t_1 = 0;
20905     __pyx_r = __pyx_t_5;
20906     __pyx_t_5 = 0;
20907     goto __pyx_L0;
20908 
20909     /* "(tree fragment)":12
20910  *     else:
20911  *         use_setstate = self.name is not None
20912  *     if use_setstate:             # <<<<<<<<<<<<<<
20913  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
20914  *     else:
20915  */
20916   }
20917 
20918   /* "(tree fragment)":15
20919  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
20920  *     else:
20921  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<
20922  * def __setstate_cython__(self, __pyx_state):
20923  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
20924  */
20925   /*else*/ {
20926     __Pyx_XDECREF(__pyx_r);
20927     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error)
20928     __Pyx_GOTREF(__pyx_t_5);
20929     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
20930     __Pyx_GOTREF(__pyx_t_1);
20931     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
20932     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
20933     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
20934     __Pyx_INCREF(__pyx_int_184977713);
20935     __Pyx_GIVEREF(__pyx_int_184977713);
20936     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
20937     __Pyx_INCREF(__pyx_v_state);
20938     __Pyx_GIVEREF(__pyx_v_state);
20939     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
20940     __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
20941     __Pyx_GOTREF(__pyx_t_4);
20942     __Pyx_GIVEREF(__pyx_t_5);
20943     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
20944     __Pyx_GIVEREF(__pyx_t_1);
20945     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
20946     __pyx_t_5 = 0;
20947     __pyx_t_1 = 0;
20948     __pyx_r = __pyx_t_4;
20949     __pyx_t_4 = 0;
20950     goto __pyx_L0;
20951   }
20952 
20953   /* "(tree fragment)":1
20954  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
20955  *     cdef tuple state
20956  *     cdef object _dict
20957  */
20958 
20959   /* function exit code */
20960   __pyx_L1_error:;
20961   __Pyx_XDECREF(__pyx_t_1);
20962   __Pyx_XDECREF(__pyx_t_4);
20963   __Pyx_XDECREF(__pyx_t_5);
20964   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20965   __pyx_r = NULL;
20966   __pyx_L0:;
20967   __Pyx_XDECREF(__pyx_v_state);
20968   __Pyx_XDECREF(__pyx_v__dict);
20969   __Pyx_XGIVEREF(__pyx_r);
20970   __Pyx_RefNannyFinishContext();
20971   return __pyx_r;
20972 }
20973 
20974 /* "(tree fragment)":16
20975  *     else:
20976  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
20977  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
20978  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
20979  */
20980 
20981 /* Python wrapper */
20982 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)20983 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
20984   PyObject *__pyx_r = 0;
20985   __Pyx_RefNannyDeclarations
20986   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
20987   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
20988 
20989   /* function exit code */
20990   __Pyx_RefNannyFinishContext();
20991   return __pyx_r;
20992 }
20993 
__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj * __pyx_v_self,PyObject * __pyx_v___pyx_state)20994 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
20995   PyObject *__pyx_r = NULL;
20996   __Pyx_RefNannyDeclarations
20997   PyObject *__pyx_t_1 = NULL;
20998   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
20999 
21000   /* "(tree fragment)":17
21001  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
21002  * def __setstate_cython__(self, __pyx_state):
21003  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
21004  */
21005   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(2, 17, __pyx_L1_error)
21006   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
21007   __Pyx_GOTREF(__pyx_t_1);
21008   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21009 
21010   /* "(tree fragment)":16
21011  *     else:
21012  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
21013  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
21014  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
21015  */
21016 
21017   /* function exit code */
21018   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21019   goto __pyx_L0;
21020   __pyx_L1_error:;
21021   __Pyx_XDECREF(__pyx_t_1);
21022   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21023   __pyx_r = NULL;
21024   __pyx_L0:;
21025   __Pyx_XGIVEREF(__pyx_r);
21026   __Pyx_RefNannyFinishContext();
21027   return __pyx_r;
21028 }
21029 
21030 /* "View.MemoryView":298
21031  *
21032  * @cname('__pyx_align_pointer')
21033  * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
21034  *     "Align pointer memory on a given boundary"
21035  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
21036  */
21037 
__pyx_align_pointer(void * __pyx_v_memory,size_t __pyx_v_alignment)21038 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
21039   Py_intptr_t __pyx_v_aligned_p;
21040   size_t __pyx_v_offset;
21041   void *__pyx_r;
21042   int __pyx_t_1;
21043 
21044   /* "View.MemoryView":300
21045  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
21046  *     "Align pointer memory on a given boundary"
21047  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<
21048  *     cdef size_t offset
21049  *
21050  */
21051   __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
21052 
21053   /* "View.MemoryView":304
21054  *
21055  *     with cython.cdivision(True):
21056  *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<
21057  *
21058  *     if offset > 0:
21059  */
21060   __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
21061 
21062   /* "View.MemoryView":306
21063  *         offset = aligned_p % alignment
21064  *
21065  *     if offset > 0:             # <<<<<<<<<<<<<<
21066  *         aligned_p += alignment - offset
21067  *
21068  */
21069   __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
21070   if (__pyx_t_1) {
21071 
21072     /* "View.MemoryView":307
21073  *
21074  *     if offset > 0:
21075  *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<
21076  *
21077  *     return <void *> aligned_p
21078  */
21079     __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
21080 
21081     /* "View.MemoryView":306
21082  *         offset = aligned_p % alignment
21083  *
21084  *     if offset > 0:             # <<<<<<<<<<<<<<
21085  *         aligned_p += alignment - offset
21086  *
21087  */
21088   }
21089 
21090   /* "View.MemoryView":309
21091  *         aligned_p += alignment - offset
21092  *
21093  *     return <void *> aligned_p             # <<<<<<<<<<<<<<
21094  *
21095  *
21096  */
21097   __pyx_r = ((void *)__pyx_v_aligned_p);
21098   goto __pyx_L0;
21099 
21100   /* "View.MemoryView":298
21101  *
21102  * @cname('__pyx_align_pointer')
21103  * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
21104  *     "Align pointer memory on a given boundary"
21105  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
21106  */
21107 
21108   /* function exit code */
21109   __pyx_L0:;
21110   return __pyx_r;
21111 }
21112 
21113 /* "View.MemoryView":345
21114  *     cdef __Pyx_TypeInfo *typeinfo
21115  *
21116  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
21117  *         self.obj = obj
21118  *         self.flags = flags
21119  */
21120 
21121 /* Python wrapper */
21122 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_memoryview___cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)21123 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21124   PyObject *__pyx_v_obj = 0;
21125   int __pyx_v_flags;
21126   int __pyx_v_dtype_is_object;
21127   int __pyx_r;
21128   __Pyx_RefNannyDeclarations
21129   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
21130   {
21131     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
21132     PyObject* values[3] = {0,0,0};
21133     if (unlikely(__pyx_kwds)) {
21134       Py_ssize_t kw_args;
21135       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21136       switch (pos_args) {
21137         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21138         CYTHON_FALLTHROUGH;
21139         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21140         CYTHON_FALLTHROUGH;
21141         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21142         CYTHON_FALLTHROUGH;
21143         case  0: break;
21144         default: goto __pyx_L5_argtuple_error;
21145       }
21146       kw_args = PyDict_Size(__pyx_kwds);
21147       switch (pos_args) {
21148         case  0:
21149         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
21150         else goto __pyx_L5_argtuple_error;
21151         CYTHON_FALLTHROUGH;
21152         case  1:
21153         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
21154         else {
21155           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(2, 345, __pyx_L3_error)
21156         }
21157         CYTHON_FALLTHROUGH;
21158         case  2:
21159         if (kw_args > 0) {
21160           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
21161           if (value) { values[2] = value; kw_args--; }
21162         }
21163       }
21164       if (unlikely(kw_args > 0)) {
21165         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 345, __pyx_L3_error)
21166       }
21167     } else {
21168       switch (PyTuple_GET_SIZE(__pyx_args)) {
21169         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21170         CYTHON_FALLTHROUGH;
21171         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21172         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21173         break;
21174         default: goto __pyx_L5_argtuple_error;
21175       }
21176     }
21177     __pyx_v_obj = values[0];
21178     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 345, __pyx_L3_error)
21179     if (values[2]) {
21180       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 345, __pyx_L3_error)
21181     } else {
21182       __pyx_v_dtype_is_object = ((int)0);
21183     }
21184   }
21185   goto __pyx_L4_argument_unpacking_done;
21186   __pyx_L5_argtuple_error:;
21187   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 345, __pyx_L3_error)
21188   __pyx_L3_error:;
21189   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21190   __Pyx_RefNannyFinishContext();
21191   return -1;
21192   __pyx_L4_argument_unpacking_done:;
21193   __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);
21194 
21195   /* function exit code */
21196   __Pyx_RefNannyFinishContext();
21197   return __pyx_r;
21198 }
21199 
__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)21200 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) {
21201   int __pyx_r;
21202   __Pyx_RefNannyDeclarations
21203   int __pyx_t_1;
21204   int __pyx_t_2;
21205   int __pyx_t_3;
21206   int __pyx_t_4;
21207   __Pyx_RefNannySetupContext("__cinit__", 0);
21208 
21209   /* "View.MemoryView":346
21210  *
21211  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
21212  *         self.obj = obj             # <<<<<<<<<<<<<<
21213  *         self.flags = flags
21214  *         if type(self) is memoryview or obj is not None:
21215  */
21216   __Pyx_INCREF(__pyx_v_obj);
21217   __Pyx_GIVEREF(__pyx_v_obj);
21218   __Pyx_GOTREF(__pyx_v_self->obj);
21219   __Pyx_DECREF(__pyx_v_self->obj);
21220   __pyx_v_self->obj = __pyx_v_obj;
21221 
21222   /* "View.MemoryView":347
21223  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
21224  *         self.obj = obj
21225  *         self.flags = flags             # <<<<<<<<<<<<<<
21226  *         if type(self) is memoryview or obj is not None:
21227  *             __Pyx_GetBuffer(obj, &self.view, flags)
21228  */
21229   __pyx_v_self->flags = __pyx_v_flags;
21230 
21231   /* "View.MemoryView":348
21232  *         self.obj = obj
21233  *         self.flags = flags
21234  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
21235  *             __Pyx_GetBuffer(obj, &self.view, flags)
21236  *             if <PyObject *> self.view.obj == NULL:
21237  */
21238   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
21239   __pyx_t_3 = (__pyx_t_2 != 0);
21240   if (!__pyx_t_3) {
21241   } else {
21242     __pyx_t_1 = __pyx_t_3;
21243     goto __pyx_L4_bool_binop_done;
21244   }
21245   __pyx_t_3 = (__pyx_v_obj != Py_None);
21246   __pyx_t_2 = (__pyx_t_3 != 0);
21247   __pyx_t_1 = __pyx_t_2;
21248   __pyx_L4_bool_binop_done:;
21249   if (__pyx_t_1) {
21250 
21251     /* "View.MemoryView":349
21252  *         self.flags = flags
21253  *         if type(self) is memoryview or obj is not None:
21254  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
21255  *             if <PyObject *> self.view.obj == NULL:
21256  *                 (<__pyx_buffer *> &self.view).obj = Py_None
21257  */
21258     __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 349, __pyx_L1_error)
21259 
21260     /* "View.MemoryView":350
21261  *         if type(self) is memoryview or obj is not None:
21262  *             __Pyx_GetBuffer(obj, &self.view, flags)
21263  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
21264  *                 (<__pyx_buffer *> &self.view).obj = Py_None
21265  *                 Py_INCREF(Py_None)
21266  */
21267     __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
21268     if (__pyx_t_1) {
21269 
21270       /* "View.MemoryView":351
21271  *             __Pyx_GetBuffer(obj, &self.view, flags)
21272  *             if <PyObject *> self.view.obj == NULL:
21273  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
21274  *                 Py_INCREF(Py_None)
21275  *
21276  */
21277       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
21278 
21279       /* "View.MemoryView":352
21280  *             if <PyObject *> self.view.obj == NULL:
21281  *                 (<__pyx_buffer *> &self.view).obj = Py_None
21282  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
21283  *
21284  *         global __pyx_memoryview_thread_locks_used
21285  */
21286       Py_INCREF(Py_None);
21287 
21288       /* "View.MemoryView":350
21289  *         if type(self) is memoryview or obj is not None:
21290  *             __Pyx_GetBuffer(obj, &self.view, flags)
21291  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
21292  *                 (<__pyx_buffer *> &self.view).obj = Py_None
21293  *                 Py_INCREF(Py_None)
21294  */
21295     }
21296 
21297     /* "View.MemoryView":348
21298  *         self.obj = obj
21299  *         self.flags = flags
21300  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
21301  *             __Pyx_GetBuffer(obj, &self.view, flags)
21302  *             if <PyObject *> self.view.obj == NULL:
21303  */
21304   }
21305 
21306   /* "View.MemoryView":355
21307  *
21308  *         global __pyx_memoryview_thread_locks_used
21309  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
21310  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
21311  *             __pyx_memoryview_thread_locks_used += 1
21312  */
21313   __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
21314   if (__pyx_t_1) {
21315 
21316     /* "View.MemoryView":356
21317  *         global __pyx_memoryview_thread_locks_used
21318  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
21319  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
21320  *             __pyx_memoryview_thread_locks_used += 1
21321  *         if self.lock is NULL:
21322  */
21323     __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
21324 
21325     /* "View.MemoryView":357
21326  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
21327  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
21328  *             __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
21329  *         if self.lock is NULL:
21330  *             self.lock = PyThread_allocate_lock()
21331  */
21332     __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
21333 
21334     /* "View.MemoryView":355
21335  *
21336  *         global __pyx_memoryview_thread_locks_used
21337  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
21338  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
21339  *             __pyx_memoryview_thread_locks_used += 1
21340  */
21341   }
21342 
21343   /* "View.MemoryView":358
21344  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
21345  *             __pyx_memoryview_thread_locks_used += 1
21346  *         if self.lock is NULL:             # <<<<<<<<<<<<<<
21347  *             self.lock = PyThread_allocate_lock()
21348  *             if self.lock is NULL:
21349  */
21350   __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
21351   if (__pyx_t_1) {
21352 
21353     /* "View.MemoryView":359
21354  *             __pyx_memoryview_thread_locks_used += 1
21355  *         if self.lock is NULL:
21356  *             self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
21357  *             if self.lock is NULL:
21358  *                 raise MemoryError
21359  */
21360     __pyx_v_self->lock = PyThread_allocate_lock();
21361 
21362     /* "View.MemoryView":360
21363  *         if self.lock is NULL:
21364  *             self.lock = PyThread_allocate_lock()
21365  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
21366  *                 raise MemoryError
21367  *
21368  */
21369     __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
21370     if (unlikely(__pyx_t_1)) {
21371 
21372       /* "View.MemoryView":361
21373  *             self.lock = PyThread_allocate_lock()
21374  *             if self.lock is NULL:
21375  *                 raise MemoryError             # <<<<<<<<<<<<<<
21376  *
21377  *         if flags & PyBUF_FORMAT:
21378  */
21379       PyErr_NoMemory(); __PYX_ERR(2, 361, __pyx_L1_error)
21380 
21381       /* "View.MemoryView":360
21382  *         if self.lock is NULL:
21383  *             self.lock = PyThread_allocate_lock()
21384  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
21385  *                 raise MemoryError
21386  *
21387  */
21388     }
21389 
21390     /* "View.MemoryView":358
21391  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
21392  *             __pyx_memoryview_thread_locks_used += 1
21393  *         if self.lock is NULL:             # <<<<<<<<<<<<<<
21394  *             self.lock = PyThread_allocate_lock()
21395  *             if self.lock is NULL:
21396  */
21397   }
21398 
21399   /* "View.MemoryView":363
21400  *                 raise MemoryError
21401  *
21402  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
21403  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
21404  *         else:
21405  */
21406   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
21407   if (__pyx_t_1) {
21408 
21409     /* "View.MemoryView":364
21410  *
21411  *         if flags & PyBUF_FORMAT:
21412  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
21413  *         else:
21414  *             self.dtype_is_object = dtype_is_object
21415  */
21416     __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
21417     if (__pyx_t_2) {
21418     } else {
21419       __pyx_t_1 = __pyx_t_2;
21420       goto __pyx_L11_bool_binop_done;
21421     }
21422     __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
21423     __pyx_t_1 = __pyx_t_2;
21424     __pyx_L11_bool_binop_done:;
21425     __pyx_v_self->dtype_is_object = __pyx_t_1;
21426 
21427     /* "View.MemoryView":363
21428  *                 raise MemoryError
21429  *
21430  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
21431  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
21432  *         else:
21433  */
21434     goto __pyx_L10;
21435   }
21436 
21437   /* "View.MemoryView":366
21438  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
21439  *         else:
21440  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
21441  *
21442  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
21443  */
21444   /*else*/ {
21445     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
21446   }
21447   __pyx_L10:;
21448 
21449   /* "View.MemoryView":368
21450  *             self.dtype_is_object = dtype_is_object
21451  *
21452  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<
21453  *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
21454  *         self.typeinfo = NULL
21455  */
21456   __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
21457 
21458   /* "View.MemoryView":370
21459  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
21460  *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
21461  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
21462  *
21463  *     def __dealloc__(memoryview self):
21464  */
21465   __pyx_v_self->typeinfo = NULL;
21466 
21467   /* "View.MemoryView":345
21468  *     cdef __Pyx_TypeInfo *typeinfo
21469  *
21470  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
21471  *         self.obj = obj
21472  *         self.flags = flags
21473  */
21474 
21475   /* function exit code */
21476   __pyx_r = 0;
21477   goto __pyx_L0;
21478   __pyx_L1_error:;
21479   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21480   __pyx_r = -1;
21481   __pyx_L0:;
21482   __Pyx_RefNannyFinishContext();
21483   return __pyx_r;
21484 }
21485 
21486 /* "View.MemoryView":372
21487  *         self.typeinfo = NULL
21488  *
21489  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
21490  *         if self.obj is not None:
21491  *             __Pyx_ReleaseBuffer(&self.view)
21492  */
21493 
21494 /* Python wrapper */
21495 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___dealloc__(PyObject * __pyx_v_self)21496 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
21497   __Pyx_RefNannyDeclarations
21498   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
21499   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
21500 
21501   /* function exit code */
21502   __Pyx_RefNannyFinishContext();
21503 }
21504 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj * __pyx_v_self)21505 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
21506   int __pyx_v_i;
21507   __Pyx_RefNannyDeclarations
21508   int __pyx_t_1;
21509   int __pyx_t_2;
21510   int __pyx_t_3;
21511   int __pyx_t_4;
21512   int __pyx_t_5;
21513   PyThread_type_lock __pyx_t_6;
21514   PyThread_type_lock __pyx_t_7;
21515   __Pyx_RefNannySetupContext("__dealloc__", 0);
21516 
21517   /* "View.MemoryView":373
21518  *
21519  *     def __dealloc__(memoryview self):
21520  *         if self.obj is not None:             # <<<<<<<<<<<<<<
21521  *             __Pyx_ReleaseBuffer(&self.view)
21522  *
21523  */
21524   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
21525   __pyx_t_2 = (__pyx_t_1 != 0);
21526   if (__pyx_t_2) {
21527 
21528     /* "View.MemoryView":374
21529  *     def __dealloc__(memoryview self):
21530  *         if self.obj is not None:
21531  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
21532  *
21533  *         cdef int i
21534  */
21535     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
21536 
21537     /* "View.MemoryView":373
21538  *
21539  *     def __dealloc__(memoryview self):
21540  *         if self.obj is not None:             # <<<<<<<<<<<<<<
21541  *             __Pyx_ReleaseBuffer(&self.view)
21542  *
21543  */
21544   }
21545 
21546   /* "View.MemoryView":378
21547  *         cdef int i
21548  *         global __pyx_memoryview_thread_locks_used
21549  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
21550  *             for i in range(__pyx_memoryview_thread_locks_used):
21551  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
21552  */
21553   __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
21554   if (__pyx_t_2) {
21555 
21556     /* "View.MemoryView":379
21557  *         global __pyx_memoryview_thread_locks_used
21558  *         if self.lock != NULL:
21559  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
21560  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
21561  *                     __pyx_memoryview_thread_locks_used -= 1
21562  */
21563     __pyx_t_3 = __pyx_memoryview_thread_locks_used;
21564     __pyx_t_4 = __pyx_t_3;
21565     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
21566       __pyx_v_i = __pyx_t_5;
21567 
21568       /* "View.MemoryView":380
21569  *         if self.lock != NULL:
21570  *             for i in range(__pyx_memoryview_thread_locks_used):
21571  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
21572  *                     __pyx_memoryview_thread_locks_used -= 1
21573  *                     if i != __pyx_memoryview_thread_locks_used:
21574  */
21575       __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
21576       if (__pyx_t_2) {
21577 
21578         /* "View.MemoryView":381
21579  *             for i in range(__pyx_memoryview_thread_locks_used):
21580  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
21581  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
21582  *                     if i != __pyx_memoryview_thread_locks_used:
21583  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
21584  */
21585         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
21586 
21587         /* "View.MemoryView":382
21588  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
21589  *                     __pyx_memoryview_thread_locks_used -= 1
21590  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
21591  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
21592  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
21593  */
21594         __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
21595         if (__pyx_t_2) {
21596 
21597           /* "View.MemoryView":384
21598  *                     if i != __pyx_memoryview_thread_locks_used:
21599  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
21600  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
21601  *                     break
21602  *             else:
21603  */
21604           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
21605           __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
21606 
21607           /* "View.MemoryView":383
21608  *                     __pyx_memoryview_thread_locks_used -= 1
21609  *                     if i != __pyx_memoryview_thread_locks_used:
21610  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
21611  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
21612  *                     break
21613  */
21614           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
21615           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
21616 
21617           /* "View.MemoryView":382
21618  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
21619  *                     __pyx_memoryview_thread_locks_used -= 1
21620  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
21621  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
21622  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
21623  */
21624         }
21625 
21626         /* "View.MemoryView":385
21627  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
21628  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
21629  *                     break             # <<<<<<<<<<<<<<
21630  *             else:
21631  *                 PyThread_free_lock(self.lock)
21632  */
21633         goto __pyx_L6_break;
21634 
21635         /* "View.MemoryView":380
21636  *         if self.lock != NULL:
21637  *             for i in range(__pyx_memoryview_thread_locks_used):
21638  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
21639  *                     __pyx_memoryview_thread_locks_used -= 1
21640  *                     if i != __pyx_memoryview_thread_locks_used:
21641  */
21642       }
21643     }
21644     /*else*/ {
21645 
21646       /* "View.MemoryView":387
21647  *                     break
21648  *             else:
21649  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
21650  *
21651  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
21652  */
21653       PyThread_free_lock(__pyx_v_self->lock);
21654     }
21655     __pyx_L6_break:;
21656 
21657     /* "View.MemoryView":378
21658  *         cdef int i
21659  *         global __pyx_memoryview_thread_locks_used
21660  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
21661  *             for i in range(__pyx_memoryview_thread_locks_used):
21662  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
21663  */
21664   }
21665 
21666   /* "View.MemoryView":372
21667  *         self.typeinfo = NULL
21668  *
21669  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
21670  *         if self.obj is not None:
21671  *             __Pyx_ReleaseBuffer(&self.view)
21672  */
21673 
21674   /* function exit code */
21675   __Pyx_RefNannyFinishContext();
21676 }
21677 
21678 /* "View.MemoryView":389
21679  *                 PyThread_free_lock(self.lock)
21680  *
21681  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
21682  *         cdef Py_ssize_t dim
21683  *         cdef char *itemp = <char *> self.view.buf
21684  */
21685 
__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index)21686 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
21687   Py_ssize_t __pyx_v_dim;
21688   char *__pyx_v_itemp;
21689   PyObject *__pyx_v_idx = NULL;
21690   char *__pyx_r;
21691   __Pyx_RefNannyDeclarations
21692   Py_ssize_t __pyx_t_1;
21693   PyObject *__pyx_t_2 = NULL;
21694   Py_ssize_t __pyx_t_3;
21695   PyObject *(*__pyx_t_4)(PyObject *);
21696   PyObject *__pyx_t_5 = NULL;
21697   Py_ssize_t __pyx_t_6;
21698   char *__pyx_t_7;
21699   __Pyx_RefNannySetupContext("get_item_pointer", 0);
21700 
21701   /* "View.MemoryView":391
21702  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
21703  *         cdef Py_ssize_t dim
21704  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
21705  *
21706  *         for dim, idx in enumerate(index):
21707  */
21708   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
21709 
21710   /* "View.MemoryView":393
21711  *         cdef char *itemp = <char *> self.view.buf
21712  *
21713  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
21714  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
21715  *
21716  */
21717   __pyx_t_1 = 0;
21718   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
21719     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
21720     __pyx_t_4 = NULL;
21721   } else {
21722     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 393, __pyx_L1_error)
21723     __Pyx_GOTREF(__pyx_t_2);
21724     __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 393, __pyx_L1_error)
21725   }
21726   for (;;) {
21727     if (likely(!__pyx_t_4)) {
21728       if (likely(PyList_CheckExact(__pyx_t_2))) {
21729         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
21730         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21731         __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(2, 393, __pyx_L1_error)
21732         #else
21733         __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 393, __pyx_L1_error)
21734         __Pyx_GOTREF(__pyx_t_5);
21735         #endif
21736       } else {
21737         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
21738         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21739         __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(2, 393, __pyx_L1_error)
21740         #else
21741         __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 393, __pyx_L1_error)
21742         __Pyx_GOTREF(__pyx_t_5);
21743         #endif
21744       }
21745     } else {
21746       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
21747       if (unlikely(!__pyx_t_5)) {
21748         PyObject* exc_type = PyErr_Occurred();
21749         if (exc_type) {
21750           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21751           else __PYX_ERR(2, 393, __pyx_L1_error)
21752         }
21753         break;
21754       }
21755       __Pyx_GOTREF(__pyx_t_5);
21756     }
21757     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
21758     __pyx_t_5 = 0;
21759     __pyx_v_dim = __pyx_t_1;
21760     __pyx_t_1 = (__pyx_t_1 + 1);
21761 
21762     /* "View.MemoryView":394
21763  *
21764  *         for dim, idx in enumerate(index):
21765  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
21766  *
21767  *         return itemp
21768  */
21769     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 394, __pyx_L1_error)
21770     __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(2, 394, __pyx_L1_error)
21771     __pyx_v_itemp = __pyx_t_7;
21772 
21773     /* "View.MemoryView":393
21774  *         cdef char *itemp = <char *> self.view.buf
21775  *
21776  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
21777  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
21778  *
21779  */
21780   }
21781   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21782 
21783   /* "View.MemoryView":396
21784  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
21785  *
21786  *         return itemp             # <<<<<<<<<<<<<<
21787  *
21788  *
21789  */
21790   __pyx_r = __pyx_v_itemp;
21791   goto __pyx_L0;
21792 
21793   /* "View.MemoryView":389
21794  *                 PyThread_free_lock(self.lock)
21795  *
21796  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
21797  *         cdef Py_ssize_t dim
21798  *         cdef char *itemp = <char *> self.view.buf
21799  */
21800 
21801   /* function exit code */
21802   __pyx_L1_error:;
21803   __Pyx_XDECREF(__pyx_t_2);
21804   __Pyx_XDECREF(__pyx_t_5);
21805   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
21806   __pyx_r = NULL;
21807   __pyx_L0:;
21808   __Pyx_XDECREF(__pyx_v_idx);
21809   __Pyx_RefNannyFinishContext();
21810   return __pyx_r;
21811 }
21812 
21813 /* "View.MemoryView":399
21814  *
21815  *
21816  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
21817  *         if index is Ellipsis:
21818  *             return self
21819  */
21820 
21821 /* Python wrapper */
21822 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
__pyx_memoryview___getitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_index)21823 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
21824   PyObject *__pyx_r = 0;
21825   __Pyx_RefNannyDeclarations
21826   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
21827   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
21828 
21829   /* function exit code */
21830   __Pyx_RefNannyFinishContext();
21831   return __pyx_r;
21832 }
21833 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index)21834 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
21835   PyObject *__pyx_v_have_slices = NULL;
21836   PyObject *__pyx_v_indices = NULL;
21837   char *__pyx_v_itemp;
21838   PyObject *__pyx_r = NULL;
21839   __Pyx_RefNannyDeclarations
21840   int __pyx_t_1;
21841   int __pyx_t_2;
21842   PyObject *__pyx_t_3 = NULL;
21843   PyObject *__pyx_t_4 = NULL;
21844   PyObject *__pyx_t_5 = NULL;
21845   char *__pyx_t_6;
21846   __Pyx_RefNannySetupContext("__getitem__", 0);
21847 
21848   /* "View.MemoryView":400
21849  *
21850  *     def __getitem__(memoryview self, object index):
21851  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
21852  *             return self
21853  *
21854  */
21855   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
21856   __pyx_t_2 = (__pyx_t_1 != 0);
21857   if (__pyx_t_2) {
21858 
21859     /* "View.MemoryView":401
21860  *     def __getitem__(memoryview self, object index):
21861  *         if index is Ellipsis:
21862  *             return self             # <<<<<<<<<<<<<<
21863  *
21864  *         have_slices, indices = _unellipsify(index, self.view.ndim)
21865  */
21866     __Pyx_XDECREF(__pyx_r);
21867     __Pyx_INCREF(((PyObject *)__pyx_v_self));
21868     __pyx_r = ((PyObject *)__pyx_v_self);
21869     goto __pyx_L0;
21870 
21871     /* "View.MemoryView":400
21872  *
21873  *     def __getitem__(memoryview self, object index):
21874  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
21875  *             return self
21876  *
21877  */
21878   }
21879 
21880   /* "View.MemoryView":403
21881  *             return self
21882  *
21883  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
21884  *
21885  *         cdef char *itemp
21886  */
21887   __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 403, __pyx_L1_error)
21888   __Pyx_GOTREF(__pyx_t_3);
21889   if (likely(__pyx_t_3 != Py_None)) {
21890     PyObject* sequence = __pyx_t_3;
21891     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
21892     if (unlikely(size != 2)) {
21893       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
21894       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
21895       __PYX_ERR(2, 403, __pyx_L1_error)
21896     }
21897     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21898     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
21899     __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
21900     __Pyx_INCREF(__pyx_t_4);
21901     __Pyx_INCREF(__pyx_t_5);
21902     #else
21903     __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 403, __pyx_L1_error)
21904     __Pyx_GOTREF(__pyx_t_4);
21905     __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 403, __pyx_L1_error)
21906     __Pyx_GOTREF(__pyx_t_5);
21907     #endif
21908     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21909   } else {
21910     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 403, __pyx_L1_error)
21911   }
21912   __pyx_v_have_slices = __pyx_t_4;
21913   __pyx_t_4 = 0;
21914   __pyx_v_indices = __pyx_t_5;
21915   __pyx_t_5 = 0;
21916 
21917   /* "View.MemoryView":406
21918  *
21919  *         cdef char *itemp
21920  *         if have_slices:             # <<<<<<<<<<<<<<
21921  *             return memview_slice(self, indices)
21922  *         else:
21923  */
21924   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 406, __pyx_L1_error)
21925   if (__pyx_t_2) {
21926 
21927     /* "View.MemoryView":407
21928  *         cdef char *itemp
21929  *         if have_slices:
21930  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
21931  *         else:
21932  *             itemp = self.get_item_pointer(indices)
21933  */
21934     __Pyx_XDECREF(__pyx_r);
21935     __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 407, __pyx_L1_error)
21936     __Pyx_GOTREF(__pyx_t_3);
21937     __pyx_r = __pyx_t_3;
21938     __pyx_t_3 = 0;
21939     goto __pyx_L0;
21940 
21941     /* "View.MemoryView":406
21942  *
21943  *         cdef char *itemp
21944  *         if have_slices:             # <<<<<<<<<<<<<<
21945  *             return memview_slice(self, indices)
21946  *         else:
21947  */
21948   }
21949 
21950   /* "View.MemoryView":409
21951  *             return memview_slice(self, indices)
21952  *         else:
21953  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
21954  *             return self.convert_item_to_object(itemp)
21955  *
21956  */
21957   /*else*/ {
21958     __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(2, 409, __pyx_L1_error)
21959     __pyx_v_itemp = __pyx_t_6;
21960 
21961     /* "View.MemoryView":410
21962  *         else:
21963  *             itemp = self.get_item_pointer(indices)
21964  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
21965  *
21966  *     def __setitem__(memoryview self, object index, object value):
21967  */
21968     __Pyx_XDECREF(__pyx_r);
21969     __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(2, 410, __pyx_L1_error)
21970     __Pyx_GOTREF(__pyx_t_3);
21971     __pyx_r = __pyx_t_3;
21972     __pyx_t_3 = 0;
21973     goto __pyx_L0;
21974   }
21975 
21976   /* "View.MemoryView":399
21977  *
21978  *
21979  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
21980  *         if index is Ellipsis:
21981  *             return self
21982  */
21983 
21984   /* function exit code */
21985   __pyx_L1_error:;
21986   __Pyx_XDECREF(__pyx_t_3);
21987   __Pyx_XDECREF(__pyx_t_4);
21988   __Pyx_XDECREF(__pyx_t_5);
21989   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21990   __pyx_r = NULL;
21991   __pyx_L0:;
21992   __Pyx_XDECREF(__pyx_v_have_slices);
21993   __Pyx_XDECREF(__pyx_v_indices);
21994   __Pyx_XGIVEREF(__pyx_r);
21995   __Pyx_RefNannyFinishContext();
21996   return __pyx_r;
21997 }
21998 
21999 /* "View.MemoryView":412
22000  *             return self.convert_item_to_object(itemp)
22001  *
22002  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
22003  *         if self.view.readonly:
22004  *             raise TypeError("Cannot assign to read-only memoryview")
22005  */
22006 
22007 /* Python wrapper */
22008 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
__pyx_memoryview___setitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_index,PyObject * __pyx_v_value)22009 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
22010   int __pyx_r;
22011   __Pyx_RefNannyDeclarations
22012   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
22013   __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));
22014 
22015   /* function exit code */
22016   __Pyx_RefNannyFinishContext();
22017   return __pyx_r;
22018 }
22019 
__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)22020 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) {
22021   PyObject *__pyx_v_have_slices = NULL;
22022   PyObject *__pyx_v_obj = NULL;
22023   int __pyx_r;
22024   __Pyx_RefNannyDeclarations
22025   int __pyx_t_1;
22026   PyObject *__pyx_t_2 = NULL;
22027   PyObject *__pyx_t_3 = NULL;
22028   PyObject *__pyx_t_4 = NULL;
22029   __Pyx_RefNannySetupContext("__setitem__", 0);
22030   __Pyx_INCREF(__pyx_v_index);
22031 
22032   /* "View.MemoryView":413
22033  *
22034  *     def __setitem__(memoryview self, object index, object value):
22035  *         if self.view.readonly:             # <<<<<<<<<<<<<<
22036  *             raise TypeError("Cannot assign to read-only memoryview")
22037  *
22038  */
22039   __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
22040   if (unlikely(__pyx_t_1)) {
22041 
22042     /* "View.MemoryView":414
22043  *     def __setitem__(memoryview self, object index, object value):
22044  *         if self.view.readonly:
22045  *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
22046  *
22047  *         have_slices, index = _unellipsify(index, self.view.ndim)
22048  */
22049     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 414, __pyx_L1_error)
22050     __Pyx_GOTREF(__pyx_t_2);
22051     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
22052     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22053     __PYX_ERR(2, 414, __pyx_L1_error)
22054 
22055     /* "View.MemoryView":413
22056  *
22057  *     def __setitem__(memoryview self, object index, object value):
22058  *         if self.view.readonly:             # <<<<<<<<<<<<<<
22059  *             raise TypeError("Cannot assign to read-only memoryview")
22060  *
22061  */
22062   }
22063 
22064   /* "View.MemoryView":416
22065  *             raise TypeError("Cannot assign to read-only memoryview")
22066  *
22067  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
22068  *
22069  *         if have_slices:
22070  */
22071   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 416, __pyx_L1_error)
22072   __Pyx_GOTREF(__pyx_t_2);
22073   if (likely(__pyx_t_2 != Py_None)) {
22074     PyObject* sequence = __pyx_t_2;
22075     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
22076     if (unlikely(size != 2)) {
22077       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
22078       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
22079       __PYX_ERR(2, 416, __pyx_L1_error)
22080     }
22081     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22082     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
22083     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
22084     __Pyx_INCREF(__pyx_t_3);
22085     __Pyx_INCREF(__pyx_t_4);
22086     #else
22087     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 416, __pyx_L1_error)
22088     __Pyx_GOTREF(__pyx_t_3);
22089     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 416, __pyx_L1_error)
22090     __Pyx_GOTREF(__pyx_t_4);
22091     #endif
22092     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22093   } else {
22094     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 416, __pyx_L1_error)
22095   }
22096   __pyx_v_have_slices = __pyx_t_3;
22097   __pyx_t_3 = 0;
22098   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
22099   __pyx_t_4 = 0;
22100 
22101   /* "View.MemoryView":418
22102  *         have_slices, index = _unellipsify(index, self.view.ndim)
22103  *
22104  *         if have_slices:             # <<<<<<<<<<<<<<
22105  *             obj = self.is_slice(value)
22106  *             if obj:
22107  */
22108   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 418, __pyx_L1_error)
22109   if (__pyx_t_1) {
22110 
22111     /* "View.MemoryView":419
22112  *
22113  *         if have_slices:
22114  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
22115  *             if obj:
22116  *                 self.setitem_slice_assignment(self[index], obj)
22117  */
22118     __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(2, 419, __pyx_L1_error)
22119     __Pyx_GOTREF(__pyx_t_2);
22120     __pyx_v_obj = __pyx_t_2;
22121     __pyx_t_2 = 0;
22122 
22123     /* "View.MemoryView":420
22124  *         if have_slices:
22125  *             obj = self.is_slice(value)
22126  *             if obj:             # <<<<<<<<<<<<<<
22127  *                 self.setitem_slice_assignment(self[index], obj)
22128  *             else:
22129  */
22130     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 420, __pyx_L1_error)
22131     if (__pyx_t_1) {
22132 
22133       /* "View.MemoryView":421
22134  *             obj = self.is_slice(value)
22135  *             if obj:
22136  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
22137  *             else:
22138  *                 self.setitem_slice_assign_scalar(self[index], value)
22139  */
22140       __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 421, __pyx_L1_error)
22141       __Pyx_GOTREF(__pyx_t_2);
22142       __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(2, 421, __pyx_L1_error)
22143       __Pyx_GOTREF(__pyx_t_4);
22144       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22145       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22146 
22147       /* "View.MemoryView":420
22148  *         if have_slices:
22149  *             obj = self.is_slice(value)
22150  *             if obj:             # <<<<<<<<<<<<<<
22151  *                 self.setitem_slice_assignment(self[index], obj)
22152  *             else:
22153  */
22154       goto __pyx_L5;
22155     }
22156 
22157     /* "View.MemoryView":423
22158  *                 self.setitem_slice_assignment(self[index], obj)
22159  *             else:
22160  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
22161  *         else:
22162  *             self.setitem_indexed(index, value)
22163  */
22164     /*else*/ {
22165       __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 423, __pyx_L1_error)
22166       __Pyx_GOTREF(__pyx_t_4);
22167       if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(2, 423, __pyx_L1_error)
22168       __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(2, 423, __pyx_L1_error)
22169       __Pyx_GOTREF(__pyx_t_2);
22170       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22171       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22172     }
22173     __pyx_L5:;
22174 
22175     /* "View.MemoryView":418
22176  *         have_slices, index = _unellipsify(index, self.view.ndim)
22177  *
22178  *         if have_slices:             # <<<<<<<<<<<<<<
22179  *             obj = self.is_slice(value)
22180  *             if obj:
22181  */
22182     goto __pyx_L4;
22183   }
22184 
22185   /* "View.MemoryView":425
22186  *                 self.setitem_slice_assign_scalar(self[index], value)
22187  *         else:
22188  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
22189  *
22190  *     cdef is_slice(self, obj):
22191  */
22192   /*else*/ {
22193     __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(2, 425, __pyx_L1_error)
22194     __Pyx_GOTREF(__pyx_t_2);
22195     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22196   }
22197   __pyx_L4:;
22198 
22199   /* "View.MemoryView":412
22200  *             return self.convert_item_to_object(itemp)
22201  *
22202  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
22203  *         if self.view.readonly:
22204  *             raise TypeError("Cannot assign to read-only memoryview")
22205  */
22206 
22207   /* function exit code */
22208   __pyx_r = 0;
22209   goto __pyx_L0;
22210   __pyx_L1_error:;
22211   __Pyx_XDECREF(__pyx_t_2);
22212   __Pyx_XDECREF(__pyx_t_3);
22213   __Pyx_XDECREF(__pyx_t_4);
22214   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22215   __pyx_r = -1;
22216   __pyx_L0:;
22217   __Pyx_XDECREF(__pyx_v_have_slices);
22218   __Pyx_XDECREF(__pyx_v_obj);
22219   __Pyx_XDECREF(__pyx_v_index);
22220   __Pyx_RefNannyFinishContext();
22221   return __pyx_r;
22222 }
22223 
22224 /* "View.MemoryView":427
22225  *             self.setitem_indexed(index, value)
22226  *
22227  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
22228  *         if not isinstance(obj, memoryview):
22229  *             try:
22230  */
22231 
__pyx_memoryview_is_slice(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_obj)22232 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
22233   PyObject *__pyx_r = NULL;
22234   __Pyx_RefNannyDeclarations
22235   int __pyx_t_1;
22236   int __pyx_t_2;
22237   PyObject *__pyx_t_3 = NULL;
22238   PyObject *__pyx_t_4 = NULL;
22239   PyObject *__pyx_t_5 = NULL;
22240   PyObject *__pyx_t_6 = NULL;
22241   PyObject *__pyx_t_7 = NULL;
22242   PyObject *__pyx_t_8 = NULL;
22243   int __pyx_t_9;
22244   __Pyx_RefNannySetupContext("is_slice", 0);
22245   __Pyx_INCREF(__pyx_v_obj);
22246 
22247   /* "View.MemoryView":428
22248  *
22249  *     cdef is_slice(self, obj):
22250  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
22251  *             try:
22252  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22253  */
22254   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
22255   __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
22256   if (__pyx_t_2) {
22257 
22258     /* "View.MemoryView":429
22259  *     cdef is_slice(self, obj):
22260  *         if not isinstance(obj, memoryview):
22261  *             try:             # <<<<<<<<<<<<<<
22262  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22263  *                                  self.dtype_is_object)
22264  */
22265     {
22266       __Pyx_PyThreadState_declare
22267       __Pyx_PyThreadState_assign
22268       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
22269       __Pyx_XGOTREF(__pyx_t_3);
22270       __Pyx_XGOTREF(__pyx_t_4);
22271       __Pyx_XGOTREF(__pyx_t_5);
22272       /*try:*/ {
22273 
22274         /* "View.MemoryView":430
22275  *         if not isinstance(obj, memoryview):
22276  *             try:
22277  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
22278  *                                  self.dtype_is_object)
22279  *             except TypeError:
22280  */
22281         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 430, __pyx_L4_error)
22282         __Pyx_GOTREF(__pyx_t_6);
22283 
22284         /* "View.MemoryView":431
22285  *             try:
22286  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22287  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
22288  *             except TypeError:
22289  *                 return None
22290  */
22291         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 431, __pyx_L4_error)
22292         __Pyx_GOTREF(__pyx_t_7);
22293 
22294         /* "View.MemoryView":430
22295  *         if not isinstance(obj, memoryview):
22296  *             try:
22297  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
22298  *                                  self.dtype_is_object)
22299  *             except TypeError:
22300  */
22301         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 430, __pyx_L4_error)
22302         __Pyx_GOTREF(__pyx_t_8);
22303         __Pyx_INCREF(__pyx_v_obj);
22304         __Pyx_GIVEREF(__pyx_v_obj);
22305         PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
22306         __Pyx_GIVEREF(__pyx_t_6);
22307         PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
22308         __Pyx_GIVEREF(__pyx_t_7);
22309         PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
22310         __pyx_t_6 = 0;
22311         __pyx_t_7 = 0;
22312         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 430, __pyx_L4_error)
22313         __Pyx_GOTREF(__pyx_t_7);
22314         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22315         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
22316         __pyx_t_7 = 0;
22317 
22318         /* "View.MemoryView":429
22319  *     cdef is_slice(self, obj):
22320  *         if not isinstance(obj, memoryview):
22321  *             try:             # <<<<<<<<<<<<<<
22322  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22323  *                                  self.dtype_is_object)
22324  */
22325       }
22326       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
22327       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22328       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
22329       goto __pyx_L9_try_end;
22330       __pyx_L4_error:;
22331       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
22332       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
22333       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
22334 
22335       /* "View.MemoryView":432
22336  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22337  *                                  self.dtype_is_object)
22338  *             except TypeError:             # <<<<<<<<<<<<<<
22339  *                 return None
22340  *
22341  */
22342       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
22343       if (__pyx_t_9) {
22344         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
22345         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(2, 432, __pyx_L6_except_error)
22346         __Pyx_GOTREF(__pyx_t_7);
22347         __Pyx_GOTREF(__pyx_t_8);
22348         __Pyx_GOTREF(__pyx_t_6);
22349 
22350         /* "View.MemoryView":433
22351  *                                  self.dtype_is_object)
22352  *             except TypeError:
22353  *                 return None             # <<<<<<<<<<<<<<
22354  *
22355  *         return obj
22356  */
22357         __Pyx_XDECREF(__pyx_r);
22358         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22359         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22360         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22361         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22362         goto __pyx_L7_except_return;
22363       }
22364       goto __pyx_L6_except_error;
22365       __pyx_L6_except_error:;
22366 
22367       /* "View.MemoryView":429
22368  *     cdef is_slice(self, obj):
22369  *         if not isinstance(obj, memoryview):
22370  *             try:             # <<<<<<<<<<<<<<
22371  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22372  *                                  self.dtype_is_object)
22373  */
22374       __Pyx_XGIVEREF(__pyx_t_3);
22375       __Pyx_XGIVEREF(__pyx_t_4);
22376       __Pyx_XGIVEREF(__pyx_t_5);
22377       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
22378       goto __pyx_L1_error;
22379       __pyx_L7_except_return:;
22380       __Pyx_XGIVEREF(__pyx_t_3);
22381       __Pyx_XGIVEREF(__pyx_t_4);
22382       __Pyx_XGIVEREF(__pyx_t_5);
22383       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
22384       goto __pyx_L0;
22385       __pyx_L9_try_end:;
22386     }
22387 
22388     /* "View.MemoryView":428
22389  *
22390  *     cdef is_slice(self, obj):
22391  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
22392  *             try:
22393  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
22394  */
22395   }
22396 
22397   /* "View.MemoryView":435
22398  *                 return None
22399  *
22400  *         return obj             # <<<<<<<<<<<<<<
22401  *
22402  *     cdef setitem_slice_assignment(self, dst, src):
22403  */
22404   __Pyx_XDECREF(__pyx_r);
22405   __Pyx_INCREF(__pyx_v_obj);
22406   __pyx_r = __pyx_v_obj;
22407   goto __pyx_L0;
22408 
22409   /* "View.MemoryView":427
22410  *             self.setitem_indexed(index, value)
22411  *
22412  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
22413  *         if not isinstance(obj, memoryview):
22414  *             try:
22415  */
22416 
22417   /* function exit code */
22418   __pyx_L1_error:;
22419   __Pyx_XDECREF(__pyx_t_6);
22420   __Pyx_XDECREF(__pyx_t_7);
22421   __Pyx_XDECREF(__pyx_t_8);
22422   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
22423   __pyx_r = 0;
22424   __pyx_L0:;
22425   __Pyx_XDECREF(__pyx_v_obj);
22426   __Pyx_XGIVEREF(__pyx_r);
22427   __Pyx_RefNannyFinishContext();
22428   return __pyx_r;
22429 }
22430 
22431 /* "View.MemoryView":437
22432  *         return obj
22433  *
22434  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
22435  *         cdef __Pyx_memviewslice dst_slice
22436  *         cdef __Pyx_memviewslice src_slice
22437  */
22438 
__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_dst,PyObject * __pyx_v_src)22439 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
22440   __Pyx_memviewslice __pyx_v_dst_slice;
22441   __Pyx_memviewslice __pyx_v_src_slice;
22442   PyObject *__pyx_r = NULL;
22443   __Pyx_RefNannyDeclarations
22444   PyObject *__pyx_t_1 = NULL;
22445   int __pyx_t_2;
22446   int __pyx_t_3;
22447   int __pyx_t_4;
22448   __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
22449 
22450   /* "View.MemoryView":441
22451  *         cdef __Pyx_memviewslice src_slice
22452  *
22453  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
22454  *                                  get_slice_from_memview(dst, &dst_slice)[0],
22455  *                                  src.ndim, dst.ndim, self.dtype_is_object)
22456  */
22457   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(2, 441, __pyx_L1_error)
22458 
22459   /* "View.MemoryView":442
22460  *
22461  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
22462  *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<
22463  *                                  src.ndim, dst.ndim, self.dtype_is_object)
22464  *
22465  */
22466   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(2, 442, __pyx_L1_error)
22467 
22468   /* "View.MemoryView":443
22469  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
22470  *                                  get_slice_from_memview(dst, &dst_slice)[0],
22471  *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
22472  *
22473  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
22474  */
22475   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 443, __pyx_L1_error)
22476   __Pyx_GOTREF(__pyx_t_1);
22477   __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 443, __pyx_L1_error)
22478   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22479   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 443, __pyx_L1_error)
22480   __Pyx_GOTREF(__pyx_t_1);
22481   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 443, __pyx_L1_error)
22482   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22483 
22484   /* "View.MemoryView":441
22485  *         cdef __Pyx_memviewslice src_slice
22486  *
22487  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
22488  *                                  get_slice_from_memview(dst, &dst_slice)[0],
22489  *                                  src.ndim, dst.ndim, self.dtype_is_object)
22490  */
22491   __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 441, __pyx_L1_error)
22492 
22493   /* "View.MemoryView":437
22494  *         return obj
22495  *
22496  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
22497  *         cdef __Pyx_memviewslice dst_slice
22498  *         cdef __Pyx_memviewslice src_slice
22499  */
22500 
22501   /* function exit code */
22502   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22503   goto __pyx_L0;
22504   __pyx_L1_error:;
22505   __Pyx_XDECREF(__pyx_t_1);
22506   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
22507   __pyx_r = 0;
22508   __pyx_L0:;
22509   __Pyx_XGIVEREF(__pyx_r);
22510   __Pyx_RefNannyFinishContext();
22511   return __pyx_r;
22512 }
22513 
22514 /* "View.MemoryView":445
22515  *                                  src.ndim, dst.ndim, self.dtype_is_object)
22516  *
22517  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
22518  *         cdef int array[128]
22519  *         cdef void *tmp = NULL
22520  */
22521 
__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj * __pyx_v_self,struct __pyx_memoryview_obj * __pyx_v_dst,PyObject * __pyx_v_value)22522 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) {
22523   int __pyx_v_array[0x80];
22524   void *__pyx_v_tmp;
22525   void *__pyx_v_item;
22526   __Pyx_memviewslice *__pyx_v_dst_slice;
22527   __Pyx_memviewslice __pyx_v_tmp_slice;
22528   PyObject *__pyx_r = NULL;
22529   __Pyx_RefNannyDeclarations
22530   int __pyx_t_1;
22531   PyObject *__pyx_t_2 = NULL;
22532   int __pyx_t_3;
22533   int __pyx_t_4;
22534   char const *__pyx_t_5;
22535   PyObject *__pyx_t_6 = NULL;
22536   PyObject *__pyx_t_7 = NULL;
22537   PyObject *__pyx_t_8 = NULL;
22538   PyObject *__pyx_t_9 = NULL;
22539   PyObject *__pyx_t_10 = NULL;
22540   PyObject *__pyx_t_11 = NULL;
22541   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
22542 
22543   /* "View.MemoryView":447
22544  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
22545  *         cdef int array[128]
22546  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
22547  *         cdef void *item
22548  *
22549  */
22550   __pyx_v_tmp = NULL;
22551 
22552   /* "View.MemoryView":452
22553  *         cdef __Pyx_memviewslice *dst_slice
22554  *         cdef __Pyx_memviewslice tmp_slice
22555  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
22556  *
22557  *         if <size_t>self.view.itemsize > sizeof(array):
22558  */
22559   __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice));
22560 
22561   /* "View.MemoryView":454
22562  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
22563  *
22564  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
22565  *             tmp = PyMem_Malloc(self.view.itemsize)
22566  *             if tmp == NULL:
22567  */
22568   __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
22569   if (__pyx_t_1) {
22570 
22571     /* "View.MemoryView":455
22572  *
22573  *         if <size_t>self.view.itemsize > sizeof(array):
22574  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
22575  *             if tmp == NULL:
22576  *                 raise MemoryError
22577  */
22578     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
22579 
22580     /* "View.MemoryView":456
22581  *         if <size_t>self.view.itemsize > sizeof(array):
22582  *             tmp = PyMem_Malloc(self.view.itemsize)
22583  *             if tmp == NULL:             # <<<<<<<<<<<<<<
22584  *                 raise MemoryError
22585  *             item = tmp
22586  */
22587     __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0);
22588     if (unlikely(__pyx_t_1)) {
22589 
22590       /* "View.MemoryView":457
22591  *             tmp = PyMem_Malloc(self.view.itemsize)
22592  *             if tmp == NULL:
22593  *                 raise MemoryError             # <<<<<<<<<<<<<<
22594  *             item = tmp
22595  *         else:
22596  */
22597       PyErr_NoMemory(); __PYX_ERR(2, 457, __pyx_L1_error)
22598 
22599       /* "View.MemoryView":456
22600  *         if <size_t>self.view.itemsize > sizeof(array):
22601  *             tmp = PyMem_Malloc(self.view.itemsize)
22602  *             if tmp == NULL:             # <<<<<<<<<<<<<<
22603  *                 raise MemoryError
22604  *             item = tmp
22605  */
22606     }
22607 
22608     /* "View.MemoryView":458
22609  *             if tmp == NULL:
22610  *                 raise MemoryError
22611  *             item = tmp             # <<<<<<<<<<<<<<
22612  *         else:
22613  *             item = <void *> array
22614  */
22615     __pyx_v_item = __pyx_v_tmp;
22616 
22617     /* "View.MemoryView":454
22618  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
22619  *
22620  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
22621  *             tmp = PyMem_Malloc(self.view.itemsize)
22622  *             if tmp == NULL:
22623  */
22624     goto __pyx_L3;
22625   }
22626 
22627   /* "View.MemoryView":460
22628  *             item = tmp
22629  *         else:
22630  *             item = <void *> array             # <<<<<<<<<<<<<<
22631  *
22632  *         try:
22633  */
22634   /*else*/ {
22635     __pyx_v_item = ((void *)__pyx_v_array);
22636   }
22637   __pyx_L3:;
22638 
22639   /* "View.MemoryView":462
22640  *             item = <void *> array
22641  *
22642  *         try:             # <<<<<<<<<<<<<<
22643  *             if self.dtype_is_object:
22644  *                 (<PyObject **> item)[0] = <PyObject *> value
22645  */
22646   /*try:*/ {
22647 
22648     /* "View.MemoryView":463
22649  *
22650  *         try:
22651  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
22652  *                 (<PyObject **> item)[0] = <PyObject *> value
22653  *             else:
22654  */
22655     __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
22656     if (__pyx_t_1) {
22657 
22658       /* "View.MemoryView":464
22659  *         try:
22660  *             if self.dtype_is_object:
22661  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
22662  *             else:
22663  *                 self.assign_item_from_object(<char *> item, value)
22664  */
22665       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
22666 
22667       /* "View.MemoryView":463
22668  *
22669  *         try:
22670  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
22671  *                 (<PyObject **> item)[0] = <PyObject *> value
22672  *             else:
22673  */
22674       goto __pyx_L8;
22675     }
22676 
22677     /* "View.MemoryView":466
22678  *                 (<PyObject **> item)[0] = <PyObject *> value
22679  *             else:
22680  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
22681  *
22682  *
22683  */
22684     /*else*/ {
22685       __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 466, __pyx_L6_error)
22686       __Pyx_GOTREF(__pyx_t_2);
22687       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22688     }
22689     __pyx_L8:;
22690 
22691     /* "View.MemoryView":470
22692  *
22693  *
22694  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
22695  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
22696  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
22697  */
22698     __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
22699     if (__pyx_t_1) {
22700 
22701       /* "View.MemoryView":471
22702  *
22703  *             if self.view.suboffsets != NULL:
22704  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
22705  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
22706  *                                 item, self.dtype_is_object)
22707  */
22708       __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 471, __pyx_L6_error)
22709       __Pyx_GOTREF(__pyx_t_2);
22710       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22711 
22712       /* "View.MemoryView":470
22713  *
22714  *
22715  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
22716  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
22717  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
22718  */
22719     }
22720 
22721     /* "View.MemoryView":472
22722  *             if self.view.suboffsets != NULL:
22723  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
22724  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
22725  *                                 item, self.dtype_is_object)
22726  *         finally:
22727  */
22728     __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);
22729   }
22730 
22731   /* "View.MemoryView":475
22732  *                                 item, self.dtype_is_object)
22733  *         finally:
22734  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
22735  *
22736  *     cdef setitem_indexed(self, index, value):
22737  */
22738   /*finally:*/ {
22739     /*normal exit:*/{
22740       PyMem_Free(__pyx_v_tmp);
22741       goto __pyx_L7;
22742     }
22743     __pyx_L6_error:;
22744     /*exception exit:*/{
22745       __Pyx_PyThreadState_declare
22746       __Pyx_PyThreadState_assign
22747       __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
22748       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
22749       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
22750       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
22751       __Pyx_XGOTREF(__pyx_t_6);
22752       __Pyx_XGOTREF(__pyx_t_7);
22753       __Pyx_XGOTREF(__pyx_t_8);
22754       __Pyx_XGOTREF(__pyx_t_9);
22755       __Pyx_XGOTREF(__pyx_t_10);
22756       __Pyx_XGOTREF(__pyx_t_11);
22757       __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
22758       {
22759         PyMem_Free(__pyx_v_tmp);
22760       }
22761       if (PY_MAJOR_VERSION >= 3) {
22762         __Pyx_XGIVEREF(__pyx_t_9);
22763         __Pyx_XGIVEREF(__pyx_t_10);
22764         __Pyx_XGIVEREF(__pyx_t_11);
22765         __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
22766       }
22767       __Pyx_XGIVEREF(__pyx_t_6);
22768       __Pyx_XGIVEREF(__pyx_t_7);
22769       __Pyx_XGIVEREF(__pyx_t_8);
22770       __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
22771       __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
22772       __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
22773       goto __pyx_L1_error;
22774     }
22775     __pyx_L7:;
22776   }
22777 
22778   /* "View.MemoryView":445
22779  *                                  src.ndim, dst.ndim, self.dtype_is_object)
22780  *
22781  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
22782  *         cdef int array[128]
22783  *         cdef void *tmp = NULL
22784  */
22785 
22786   /* function exit code */
22787   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22788   goto __pyx_L0;
22789   __pyx_L1_error:;
22790   __Pyx_XDECREF(__pyx_t_2);
22791   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
22792   __pyx_r = 0;
22793   __pyx_L0:;
22794   __Pyx_XGIVEREF(__pyx_r);
22795   __Pyx_RefNannyFinishContext();
22796   return __pyx_r;
22797 }
22798 
22799 /* "View.MemoryView":477
22800  *             PyMem_Free(tmp)
22801  *
22802  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
22803  *         cdef char *itemp = self.get_item_pointer(index)
22804  *         self.assign_item_from_object(itemp, value)
22805  */
22806 
__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index,PyObject * __pyx_v_value)22807 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
22808   char *__pyx_v_itemp;
22809   PyObject *__pyx_r = NULL;
22810   __Pyx_RefNannyDeclarations
22811   char *__pyx_t_1;
22812   PyObject *__pyx_t_2 = NULL;
22813   __Pyx_RefNannySetupContext("setitem_indexed", 0);
22814 
22815   /* "View.MemoryView":478
22816  *
22817  *     cdef setitem_indexed(self, index, value):
22818  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
22819  *         self.assign_item_from_object(itemp, value)
22820  *
22821  */
22822   __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(2, 478, __pyx_L1_error)
22823   __pyx_v_itemp = __pyx_t_1;
22824 
22825   /* "View.MemoryView":479
22826  *     cdef setitem_indexed(self, index, value):
22827  *         cdef char *itemp = self.get_item_pointer(index)
22828  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
22829  *
22830  *     cdef convert_item_to_object(self, char *itemp):
22831  */
22832   __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(2, 479, __pyx_L1_error)
22833   __Pyx_GOTREF(__pyx_t_2);
22834   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22835 
22836   /* "View.MemoryView":477
22837  *             PyMem_Free(tmp)
22838  *
22839  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
22840  *         cdef char *itemp = self.get_item_pointer(index)
22841  *         self.assign_item_from_object(itemp, value)
22842  */
22843 
22844   /* function exit code */
22845   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22846   goto __pyx_L0;
22847   __pyx_L1_error:;
22848   __Pyx_XDECREF(__pyx_t_2);
22849   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
22850   __pyx_r = 0;
22851   __pyx_L0:;
22852   __Pyx_XGIVEREF(__pyx_r);
22853   __Pyx_RefNannyFinishContext();
22854   return __pyx_r;
22855 }
22856 
22857 /* "View.MemoryView":481
22858  *         self.assign_item_from_object(itemp, value)
22859  *
22860  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
22861  *         """Only used if instantiated manually by the user, or if Cython doesn't
22862  *         know how to convert the type"""
22863  */
22864 
__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj * __pyx_v_self,char * __pyx_v_itemp)22865 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
22866   PyObject *__pyx_v_struct = NULL;
22867   PyObject *__pyx_v_bytesitem = 0;
22868   PyObject *__pyx_v_result = NULL;
22869   PyObject *__pyx_r = NULL;
22870   __Pyx_RefNannyDeclarations
22871   PyObject *__pyx_t_1 = NULL;
22872   PyObject *__pyx_t_2 = NULL;
22873   PyObject *__pyx_t_3 = NULL;
22874   PyObject *__pyx_t_4 = NULL;
22875   PyObject *__pyx_t_5 = NULL;
22876   PyObject *__pyx_t_6 = NULL;
22877   PyObject *__pyx_t_7 = NULL;
22878   int __pyx_t_8;
22879   PyObject *__pyx_t_9 = NULL;
22880   size_t __pyx_t_10;
22881   int __pyx_t_11;
22882   __Pyx_RefNannySetupContext("convert_item_to_object", 0);
22883 
22884   /* "View.MemoryView":484
22885  *         """Only used if instantiated manually by the user, or if Cython doesn't
22886  *         know how to convert the type"""
22887  *         import struct             # <<<<<<<<<<<<<<
22888  *         cdef bytes bytesitem
22889  *
22890  */
22891   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 484, __pyx_L1_error)
22892   __Pyx_GOTREF(__pyx_t_1);
22893   __pyx_v_struct = __pyx_t_1;
22894   __pyx_t_1 = 0;
22895 
22896   /* "View.MemoryView":487
22897  *         cdef bytes bytesitem
22898  *
22899  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
22900  *         try:
22901  *             result = struct.unpack(self.view.format, bytesitem)
22902  */
22903   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 487, __pyx_L1_error)
22904   __Pyx_GOTREF(__pyx_t_1);
22905   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
22906   __pyx_t_1 = 0;
22907 
22908   /* "View.MemoryView":488
22909  *
22910  *         bytesitem = itemp[:self.view.itemsize]
22911  *         try:             # <<<<<<<<<<<<<<
22912  *             result = struct.unpack(self.view.format, bytesitem)
22913  *         except struct.error:
22914  */
22915   {
22916     __Pyx_PyThreadState_declare
22917     __Pyx_PyThreadState_assign
22918     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
22919     __Pyx_XGOTREF(__pyx_t_2);
22920     __Pyx_XGOTREF(__pyx_t_3);
22921     __Pyx_XGOTREF(__pyx_t_4);
22922     /*try:*/ {
22923 
22924       /* "View.MemoryView":489
22925  *         bytesitem = itemp[:self.view.itemsize]
22926  *         try:
22927  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
22928  *         except struct.error:
22929  *             raise ValueError("Unable to convert item to object")
22930  */
22931       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 489, __pyx_L3_error)
22932       __Pyx_GOTREF(__pyx_t_5);
22933       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 489, __pyx_L3_error)
22934       __Pyx_GOTREF(__pyx_t_6);
22935       __pyx_t_7 = NULL;
22936       __pyx_t_8 = 0;
22937       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
22938         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
22939         if (likely(__pyx_t_7)) {
22940           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
22941           __Pyx_INCREF(__pyx_t_7);
22942           __Pyx_INCREF(function);
22943           __Pyx_DECREF_SET(__pyx_t_5, function);
22944           __pyx_t_8 = 1;
22945         }
22946       }
22947       #if CYTHON_FAST_PYCALL
22948       if (PyFunction_Check(__pyx_t_5)) {
22949         PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
22950         __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(2, 489, __pyx_L3_error)
22951         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
22952         __Pyx_GOTREF(__pyx_t_1);
22953         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22954       } else
22955       #endif
22956       #if CYTHON_FAST_PYCCALL
22957       if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
22958         PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
22959         __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(2, 489, __pyx_L3_error)
22960         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
22961         __Pyx_GOTREF(__pyx_t_1);
22962         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22963       } else
22964       #endif
22965       {
22966         __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 489, __pyx_L3_error)
22967         __Pyx_GOTREF(__pyx_t_9);
22968         if (__pyx_t_7) {
22969           __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
22970         }
22971         __Pyx_GIVEREF(__pyx_t_6);
22972         PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
22973         __Pyx_INCREF(__pyx_v_bytesitem);
22974         __Pyx_GIVEREF(__pyx_v_bytesitem);
22975         PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
22976         __pyx_t_6 = 0;
22977         __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 489, __pyx_L3_error)
22978         __Pyx_GOTREF(__pyx_t_1);
22979         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
22980       }
22981       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22982       __pyx_v_result = __pyx_t_1;
22983       __pyx_t_1 = 0;
22984 
22985       /* "View.MemoryView":488
22986  *
22987  *         bytesitem = itemp[:self.view.itemsize]
22988  *         try:             # <<<<<<<<<<<<<<
22989  *             result = struct.unpack(self.view.format, bytesitem)
22990  *         except struct.error:
22991  */
22992     }
22993 
22994     /* "View.MemoryView":493
22995  *             raise ValueError("Unable to convert item to object")
22996  *         else:
22997  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
22998  *                 return result[0]
22999  *             return result
23000  */
23001     /*else:*/ {
23002       __pyx_t_10 = strlen(__pyx_v_self->view.format);
23003       __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
23004       if (__pyx_t_11) {
23005 
23006         /* "View.MemoryView":494
23007  *         else:
23008  *             if len(self.view.format) == 1:
23009  *                 return result[0]             # <<<<<<<<<<<<<<
23010  *             return result
23011  *
23012  */
23013         __Pyx_XDECREF(__pyx_r);
23014         __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(2, 494, __pyx_L5_except_error)
23015         __Pyx_GOTREF(__pyx_t_1);
23016         __pyx_r = __pyx_t_1;
23017         __pyx_t_1 = 0;
23018         goto __pyx_L6_except_return;
23019 
23020         /* "View.MemoryView":493
23021  *             raise ValueError("Unable to convert item to object")
23022  *         else:
23023  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
23024  *                 return result[0]
23025  *             return result
23026  */
23027       }
23028 
23029       /* "View.MemoryView":495
23030  *             if len(self.view.format) == 1:
23031  *                 return result[0]
23032  *             return result             # <<<<<<<<<<<<<<
23033  *
23034  *     cdef assign_item_from_object(self, char *itemp, object value):
23035  */
23036       __Pyx_XDECREF(__pyx_r);
23037       __Pyx_INCREF(__pyx_v_result);
23038       __pyx_r = __pyx_v_result;
23039       goto __pyx_L6_except_return;
23040     }
23041     __pyx_L3_error:;
23042     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
23043     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23044     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
23045     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
23046     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
23047 
23048     /* "View.MemoryView":490
23049  *         try:
23050  *             result = struct.unpack(self.view.format, bytesitem)
23051  *         except struct.error:             # <<<<<<<<<<<<<<
23052  *             raise ValueError("Unable to convert item to object")
23053  *         else:
23054  */
23055     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
23056     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 490, __pyx_L5_except_error)
23057     __Pyx_GOTREF(__pyx_t_6);
23058     __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
23059     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23060     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
23061     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
23062     if (__pyx_t_8) {
23063       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
23064       if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(2, 490, __pyx_L5_except_error)
23065       __Pyx_GOTREF(__pyx_t_9);
23066       __Pyx_GOTREF(__pyx_t_5);
23067       __Pyx_GOTREF(__pyx_t_1);
23068 
23069       /* "View.MemoryView":491
23070  *             result = struct.unpack(self.view.format, bytesitem)
23071  *         except struct.error:
23072  *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
23073  *         else:
23074  *             if len(self.view.format) == 1:
23075  */
23076       __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 491, __pyx_L5_except_error)
23077       __Pyx_GOTREF(__pyx_t_6);
23078       __Pyx_Raise(__pyx_t_6, 0, 0, 0);
23079       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23080       __PYX_ERR(2, 491, __pyx_L5_except_error)
23081     }
23082     goto __pyx_L5_except_error;
23083     __pyx_L5_except_error:;
23084 
23085     /* "View.MemoryView":488
23086  *
23087  *         bytesitem = itemp[:self.view.itemsize]
23088  *         try:             # <<<<<<<<<<<<<<
23089  *             result = struct.unpack(self.view.format, bytesitem)
23090  *         except struct.error:
23091  */
23092     __Pyx_XGIVEREF(__pyx_t_2);
23093     __Pyx_XGIVEREF(__pyx_t_3);
23094     __Pyx_XGIVEREF(__pyx_t_4);
23095     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
23096     goto __pyx_L1_error;
23097     __pyx_L6_except_return:;
23098     __Pyx_XGIVEREF(__pyx_t_2);
23099     __Pyx_XGIVEREF(__pyx_t_3);
23100     __Pyx_XGIVEREF(__pyx_t_4);
23101     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
23102     goto __pyx_L0;
23103   }
23104 
23105   /* "View.MemoryView":481
23106  *         self.assign_item_from_object(itemp, value)
23107  *
23108  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
23109  *         """Only used if instantiated manually by the user, or if Cython doesn't
23110  *         know how to convert the type"""
23111  */
23112 
23113   /* function exit code */
23114   __pyx_L1_error:;
23115   __Pyx_XDECREF(__pyx_t_1);
23116   __Pyx_XDECREF(__pyx_t_5);
23117   __Pyx_XDECREF(__pyx_t_6);
23118   __Pyx_XDECREF(__pyx_t_7);
23119   __Pyx_XDECREF(__pyx_t_9);
23120   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
23121   __pyx_r = 0;
23122   __pyx_L0:;
23123   __Pyx_XDECREF(__pyx_v_struct);
23124   __Pyx_XDECREF(__pyx_v_bytesitem);
23125   __Pyx_XDECREF(__pyx_v_result);
23126   __Pyx_XGIVEREF(__pyx_r);
23127   __Pyx_RefNannyFinishContext();
23128   return __pyx_r;
23129 }
23130 
23131 /* "View.MemoryView":497
23132  *             return result
23133  *
23134  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
23135  *         """Only used if instantiated manually by the user, or if Cython doesn't
23136  *         know how to convert the type"""
23137  */
23138 
__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj * __pyx_v_self,char * __pyx_v_itemp,PyObject * __pyx_v_value)23139 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
23140   PyObject *__pyx_v_struct = NULL;
23141   char __pyx_v_c;
23142   PyObject *__pyx_v_bytesvalue = 0;
23143   Py_ssize_t __pyx_v_i;
23144   PyObject *__pyx_r = NULL;
23145   __Pyx_RefNannyDeclarations
23146   PyObject *__pyx_t_1 = NULL;
23147   int __pyx_t_2;
23148   int __pyx_t_3;
23149   PyObject *__pyx_t_4 = NULL;
23150   PyObject *__pyx_t_5 = NULL;
23151   PyObject *__pyx_t_6 = NULL;
23152   int __pyx_t_7;
23153   PyObject *__pyx_t_8 = NULL;
23154   Py_ssize_t __pyx_t_9;
23155   PyObject *__pyx_t_10 = NULL;
23156   char *__pyx_t_11;
23157   char *__pyx_t_12;
23158   char *__pyx_t_13;
23159   char *__pyx_t_14;
23160   __Pyx_RefNannySetupContext("assign_item_from_object", 0);
23161 
23162   /* "View.MemoryView":500
23163  *         """Only used if instantiated manually by the user, or if Cython doesn't
23164  *         know how to convert the type"""
23165  *         import struct             # <<<<<<<<<<<<<<
23166  *         cdef char c
23167  *         cdef bytes bytesvalue
23168  */
23169   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 500, __pyx_L1_error)
23170   __Pyx_GOTREF(__pyx_t_1);
23171   __pyx_v_struct = __pyx_t_1;
23172   __pyx_t_1 = 0;
23173 
23174   /* "View.MemoryView":505
23175  *         cdef Py_ssize_t i
23176  *
23177  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
23178  *             bytesvalue = struct.pack(self.view.format, *value)
23179  *         else:
23180  */
23181   __pyx_t_2 = PyTuple_Check(__pyx_v_value);
23182   __pyx_t_3 = (__pyx_t_2 != 0);
23183   if (__pyx_t_3) {
23184 
23185     /* "View.MemoryView":506
23186  *
23187  *         if isinstance(value, tuple):
23188  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
23189  *         else:
23190  *             bytesvalue = struct.pack(self.view.format, value)
23191  */
23192     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 506, __pyx_L1_error)
23193     __Pyx_GOTREF(__pyx_t_1);
23194     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 506, __pyx_L1_error)
23195     __Pyx_GOTREF(__pyx_t_4);
23196     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 506, __pyx_L1_error)
23197     __Pyx_GOTREF(__pyx_t_5);
23198     __Pyx_GIVEREF(__pyx_t_4);
23199     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
23200     __pyx_t_4 = 0;
23201     __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 506, __pyx_L1_error)
23202     __Pyx_GOTREF(__pyx_t_4);
23203     __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 506, __pyx_L1_error)
23204     __Pyx_GOTREF(__pyx_t_6);
23205     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23206     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23207     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 506, __pyx_L1_error)
23208     __Pyx_GOTREF(__pyx_t_4);
23209     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23210     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23211     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(2, 506, __pyx_L1_error)
23212     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
23213     __pyx_t_4 = 0;
23214 
23215     /* "View.MemoryView":505
23216  *         cdef Py_ssize_t i
23217  *
23218  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
23219  *             bytesvalue = struct.pack(self.view.format, *value)
23220  *         else:
23221  */
23222     goto __pyx_L3;
23223   }
23224 
23225   /* "View.MemoryView":508
23226  *             bytesvalue = struct.pack(self.view.format, *value)
23227  *         else:
23228  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
23229  *
23230  *         for i, c in enumerate(bytesvalue):
23231  */
23232   /*else*/ {
23233     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 508, __pyx_L1_error)
23234     __Pyx_GOTREF(__pyx_t_6);
23235     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 508, __pyx_L1_error)
23236     __Pyx_GOTREF(__pyx_t_1);
23237     __pyx_t_5 = NULL;
23238     __pyx_t_7 = 0;
23239     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
23240       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
23241       if (likely(__pyx_t_5)) {
23242         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
23243         __Pyx_INCREF(__pyx_t_5);
23244         __Pyx_INCREF(function);
23245         __Pyx_DECREF_SET(__pyx_t_6, function);
23246         __pyx_t_7 = 1;
23247       }
23248     }
23249     #if CYTHON_FAST_PYCALL
23250     if (PyFunction_Check(__pyx_t_6)) {
23251       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
23252       __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(2, 508, __pyx_L1_error)
23253       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23254       __Pyx_GOTREF(__pyx_t_4);
23255       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23256     } else
23257     #endif
23258     #if CYTHON_FAST_PYCCALL
23259     if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
23260       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
23261       __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(2, 508, __pyx_L1_error)
23262       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23263       __Pyx_GOTREF(__pyx_t_4);
23264       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23265     } else
23266     #endif
23267     {
23268       __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 508, __pyx_L1_error)
23269       __Pyx_GOTREF(__pyx_t_8);
23270       if (__pyx_t_5) {
23271         __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
23272       }
23273       __Pyx_GIVEREF(__pyx_t_1);
23274       PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
23275       __Pyx_INCREF(__pyx_v_value);
23276       __Pyx_GIVEREF(__pyx_v_value);
23277       PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
23278       __pyx_t_1 = 0;
23279       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 508, __pyx_L1_error)
23280       __Pyx_GOTREF(__pyx_t_4);
23281       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23282     }
23283     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23284     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(2, 508, __pyx_L1_error)
23285     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
23286     __pyx_t_4 = 0;
23287   }
23288   __pyx_L3:;
23289 
23290   /* "View.MemoryView":510
23291  *             bytesvalue = struct.pack(self.view.format, value)
23292  *
23293  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
23294  *             itemp[i] = c
23295  *
23296  */
23297   __pyx_t_9 = 0;
23298   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
23299     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
23300     __PYX_ERR(2, 510, __pyx_L1_error)
23301   }
23302   __Pyx_INCREF(__pyx_v_bytesvalue);
23303   __pyx_t_10 = __pyx_v_bytesvalue;
23304   __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
23305   __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
23306   for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
23307     __pyx_t_11 = __pyx_t_14;
23308     __pyx_v_c = (__pyx_t_11[0]);
23309 
23310     /* "View.MemoryView":511
23311  *
23312  *         for i, c in enumerate(bytesvalue):
23313  *             itemp[i] = c             # <<<<<<<<<<<<<<
23314  *
23315  *     @cname('getbuffer')
23316  */
23317     __pyx_v_i = __pyx_t_9;
23318 
23319     /* "View.MemoryView":510
23320  *             bytesvalue = struct.pack(self.view.format, value)
23321  *
23322  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
23323  *             itemp[i] = c
23324  *
23325  */
23326     __pyx_t_9 = (__pyx_t_9 + 1);
23327 
23328     /* "View.MemoryView":511
23329  *
23330  *         for i, c in enumerate(bytesvalue):
23331  *             itemp[i] = c             # <<<<<<<<<<<<<<
23332  *
23333  *     @cname('getbuffer')
23334  */
23335     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
23336   }
23337   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23338 
23339   /* "View.MemoryView":497
23340  *             return result
23341  *
23342  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
23343  *         """Only used if instantiated manually by the user, or if Cython doesn't
23344  *         know how to convert the type"""
23345  */
23346 
23347   /* function exit code */
23348   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23349   goto __pyx_L0;
23350   __pyx_L1_error:;
23351   __Pyx_XDECREF(__pyx_t_1);
23352   __Pyx_XDECREF(__pyx_t_4);
23353   __Pyx_XDECREF(__pyx_t_5);
23354   __Pyx_XDECREF(__pyx_t_6);
23355   __Pyx_XDECREF(__pyx_t_8);
23356   __Pyx_XDECREF(__pyx_t_10);
23357   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
23358   __pyx_r = 0;
23359   __pyx_L0:;
23360   __Pyx_XDECREF(__pyx_v_struct);
23361   __Pyx_XDECREF(__pyx_v_bytesvalue);
23362   __Pyx_XGIVEREF(__pyx_r);
23363   __Pyx_RefNannyFinishContext();
23364   return __pyx_r;
23365 }
23366 
23367 /* "View.MemoryView":514
23368  *
23369  *     @cname('getbuffer')
23370  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
23371  *         if flags & PyBUF_WRITABLE and self.view.readonly:
23372  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
23373  */
23374 
23375 /* Python wrapper */
23376 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_memoryview_getbuffer(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)23377 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
23378   int __pyx_r;
23379   __Pyx_RefNannyDeclarations
23380   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
23381   __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));
23382 
23383   /* function exit code */
23384   __Pyx_RefNannyFinishContext();
23385   return __pyx_r;
23386 }
23387 
__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)23388 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) {
23389   int __pyx_r;
23390   __Pyx_RefNannyDeclarations
23391   int __pyx_t_1;
23392   int __pyx_t_2;
23393   PyObject *__pyx_t_3 = NULL;
23394   Py_ssize_t *__pyx_t_4;
23395   char *__pyx_t_5;
23396   void *__pyx_t_6;
23397   int __pyx_t_7;
23398   Py_ssize_t __pyx_t_8;
23399   if (__pyx_v_info == NULL) {
23400     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
23401     return -1;
23402   }
23403   __Pyx_RefNannySetupContext("__getbuffer__", 0);
23404   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
23405   __Pyx_GIVEREF(__pyx_v_info->obj);
23406 
23407   /* "View.MemoryView":515
23408  *     @cname('getbuffer')
23409  *     def __getbuffer__(self, Py_buffer *info, int flags):
23410  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
23411  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
23412  *
23413  */
23414   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
23415   if (__pyx_t_2) {
23416   } else {
23417     __pyx_t_1 = __pyx_t_2;
23418     goto __pyx_L4_bool_binop_done;
23419   }
23420   __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
23421   __pyx_t_1 = __pyx_t_2;
23422   __pyx_L4_bool_binop_done:;
23423   if (unlikely(__pyx_t_1)) {
23424 
23425     /* "View.MemoryView":516
23426  *     def __getbuffer__(self, Py_buffer *info, int flags):
23427  *         if flags & PyBUF_WRITABLE and self.view.readonly:
23428  *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
23429  *
23430  *         if flags & PyBUF_ND:
23431  */
23432     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 516, __pyx_L1_error)
23433     __Pyx_GOTREF(__pyx_t_3);
23434     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
23435     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23436     __PYX_ERR(2, 516, __pyx_L1_error)
23437 
23438     /* "View.MemoryView":515
23439  *     @cname('getbuffer')
23440  *     def __getbuffer__(self, Py_buffer *info, int flags):
23441  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
23442  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
23443  *
23444  */
23445   }
23446 
23447   /* "View.MemoryView":518
23448  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
23449  *
23450  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
23451  *             info.shape = self.view.shape
23452  *         else:
23453  */
23454   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
23455   if (__pyx_t_1) {
23456 
23457     /* "View.MemoryView":519
23458  *
23459  *         if flags & PyBUF_ND:
23460  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
23461  *         else:
23462  *             info.shape = NULL
23463  */
23464     __pyx_t_4 = __pyx_v_self->view.shape;
23465     __pyx_v_info->shape = __pyx_t_4;
23466 
23467     /* "View.MemoryView":518
23468  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
23469  *
23470  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
23471  *             info.shape = self.view.shape
23472  *         else:
23473  */
23474     goto __pyx_L6;
23475   }
23476 
23477   /* "View.MemoryView":521
23478  *             info.shape = self.view.shape
23479  *         else:
23480  *             info.shape = NULL             # <<<<<<<<<<<<<<
23481  *
23482  *         if flags & PyBUF_STRIDES:
23483  */
23484   /*else*/ {
23485     __pyx_v_info->shape = NULL;
23486   }
23487   __pyx_L6:;
23488 
23489   /* "View.MemoryView":523
23490  *             info.shape = NULL
23491  *
23492  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
23493  *             info.strides = self.view.strides
23494  *         else:
23495  */
23496   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
23497   if (__pyx_t_1) {
23498 
23499     /* "View.MemoryView":524
23500  *
23501  *         if flags & PyBUF_STRIDES:
23502  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
23503  *         else:
23504  *             info.strides = NULL
23505  */
23506     __pyx_t_4 = __pyx_v_self->view.strides;
23507     __pyx_v_info->strides = __pyx_t_4;
23508 
23509     /* "View.MemoryView":523
23510  *             info.shape = NULL
23511  *
23512  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
23513  *             info.strides = self.view.strides
23514  *         else:
23515  */
23516     goto __pyx_L7;
23517   }
23518 
23519   /* "View.MemoryView":526
23520  *             info.strides = self.view.strides
23521  *         else:
23522  *             info.strides = NULL             # <<<<<<<<<<<<<<
23523  *
23524  *         if flags & PyBUF_INDIRECT:
23525  */
23526   /*else*/ {
23527     __pyx_v_info->strides = NULL;
23528   }
23529   __pyx_L7:;
23530 
23531   /* "View.MemoryView":528
23532  *             info.strides = NULL
23533  *
23534  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
23535  *             info.suboffsets = self.view.suboffsets
23536  *         else:
23537  */
23538   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
23539   if (__pyx_t_1) {
23540 
23541     /* "View.MemoryView":529
23542  *
23543  *         if flags & PyBUF_INDIRECT:
23544  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
23545  *         else:
23546  *             info.suboffsets = NULL
23547  */
23548     __pyx_t_4 = __pyx_v_self->view.suboffsets;
23549     __pyx_v_info->suboffsets = __pyx_t_4;
23550 
23551     /* "View.MemoryView":528
23552  *             info.strides = NULL
23553  *
23554  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
23555  *             info.suboffsets = self.view.suboffsets
23556  *         else:
23557  */
23558     goto __pyx_L8;
23559   }
23560 
23561   /* "View.MemoryView":531
23562  *             info.suboffsets = self.view.suboffsets
23563  *         else:
23564  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
23565  *
23566  *         if flags & PyBUF_FORMAT:
23567  */
23568   /*else*/ {
23569     __pyx_v_info->suboffsets = NULL;
23570   }
23571   __pyx_L8:;
23572 
23573   /* "View.MemoryView":533
23574  *             info.suboffsets = NULL
23575  *
23576  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
23577  *             info.format = self.view.format
23578  *         else:
23579  */
23580   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
23581   if (__pyx_t_1) {
23582 
23583     /* "View.MemoryView":534
23584  *
23585  *         if flags & PyBUF_FORMAT:
23586  *             info.format = self.view.format             # <<<<<<<<<<<<<<
23587  *         else:
23588  *             info.format = NULL
23589  */
23590     __pyx_t_5 = __pyx_v_self->view.format;
23591     __pyx_v_info->format = __pyx_t_5;
23592 
23593     /* "View.MemoryView":533
23594  *             info.suboffsets = NULL
23595  *
23596  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
23597  *             info.format = self.view.format
23598  *         else:
23599  */
23600     goto __pyx_L9;
23601   }
23602 
23603   /* "View.MemoryView":536
23604  *             info.format = self.view.format
23605  *         else:
23606  *             info.format = NULL             # <<<<<<<<<<<<<<
23607  *
23608  *         info.buf = self.view.buf
23609  */
23610   /*else*/ {
23611     __pyx_v_info->format = NULL;
23612   }
23613   __pyx_L9:;
23614 
23615   /* "View.MemoryView":538
23616  *             info.format = NULL
23617  *
23618  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
23619  *         info.ndim = self.view.ndim
23620  *         info.itemsize = self.view.itemsize
23621  */
23622   __pyx_t_6 = __pyx_v_self->view.buf;
23623   __pyx_v_info->buf = __pyx_t_6;
23624 
23625   /* "View.MemoryView":539
23626  *
23627  *         info.buf = self.view.buf
23628  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
23629  *         info.itemsize = self.view.itemsize
23630  *         info.len = self.view.len
23631  */
23632   __pyx_t_7 = __pyx_v_self->view.ndim;
23633   __pyx_v_info->ndim = __pyx_t_7;
23634 
23635   /* "View.MemoryView":540
23636  *         info.buf = self.view.buf
23637  *         info.ndim = self.view.ndim
23638  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
23639  *         info.len = self.view.len
23640  *         info.readonly = self.view.readonly
23641  */
23642   __pyx_t_8 = __pyx_v_self->view.itemsize;
23643   __pyx_v_info->itemsize = __pyx_t_8;
23644 
23645   /* "View.MemoryView":541
23646  *         info.ndim = self.view.ndim
23647  *         info.itemsize = self.view.itemsize
23648  *         info.len = self.view.len             # <<<<<<<<<<<<<<
23649  *         info.readonly = self.view.readonly
23650  *         info.obj = self
23651  */
23652   __pyx_t_8 = __pyx_v_self->view.len;
23653   __pyx_v_info->len = __pyx_t_8;
23654 
23655   /* "View.MemoryView":542
23656  *         info.itemsize = self.view.itemsize
23657  *         info.len = self.view.len
23658  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
23659  *         info.obj = self
23660  *
23661  */
23662   __pyx_t_1 = __pyx_v_self->view.readonly;
23663   __pyx_v_info->readonly = __pyx_t_1;
23664 
23665   /* "View.MemoryView":543
23666  *         info.len = self.view.len
23667  *         info.readonly = self.view.readonly
23668  *         info.obj = self             # <<<<<<<<<<<<<<
23669  *
23670  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
23671  */
23672   __Pyx_INCREF(((PyObject *)__pyx_v_self));
23673   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
23674   __Pyx_GOTREF(__pyx_v_info->obj);
23675   __Pyx_DECREF(__pyx_v_info->obj);
23676   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
23677 
23678   /* "View.MemoryView":514
23679  *
23680  *     @cname('getbuffer')
23681  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
23682  *         if flags & PyBUF_WRITABLE and self.view.readonly:
23683  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
23684  */
23685 
23686   /* function exit code */
23687   __pyx_r = 0;
23688   goto __pyx_L0;
23689   __pyx_L1_error:;
23690   __Pyx_XDECREF(__pyx_t_3);
23691   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23692   __pyx_r = -1;
23693   if (__pyx_v_info->obj != NULL) {
23694     __Pyx_GOTREF(__pyx_v_info->obj);
23695     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
23696   }
23697   goto __pyx_L2;
23698   __pyx_L0:;
23699   if (__pyx_v_info->obj == Py_None) {
23700     __Pyx_GOTREF(__pyx_v_info->obj);
23701     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
23702   }
23703   __pyx_L2:;
23704   __Pyx_RefNannyFinishContext();
23705   return __pyx_r;
23706 }
23707 
23708 /* "View.MemoryView":549
23709  *
23710  *     @property
23711  *     def T(self):             # <<<<<<<<<<<<<<
23712  *         cdef _memoryviewslice result = memoryview_copy(self)
23713  *         transpose_memslice(&result.from_slice)
23714  */
23715 
23716 /* Python wrapper */
23717 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject * __pyx_v_self)23718 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
23719   PyObject *__pyx_r = 0;
23720   __Pyx_RefNannyDeclarations
23721   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
23722   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
23723 
23724   /* function exit code */
23725   __Pyx_RefNannyFinishContext();
23726   return __pyx_r;
23727 }
23728 
__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj * __pyx_v_self)23729 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
23730   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
23731   PyObject *__pyx_r = NULL;
23732   __Pyx_RefNannyDeclarations
23733   PyObject *__pyx_t_1 = NULL;
23734   int __pyx_t_2;
23735   __Pyx_RefNannySetupContext("__get__", 0);
23736 
23737   /* "View.MemoryView":550
23738  *     @property
23739  *     def T(self):
23740  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
23741  *         transpose_memslice(&result.from_slice)
23742  *         return result
23743  */
23744   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 550, __pyx_L1_error)
23745   __Pyx_GOTREF(__pyx_t_1);
23746   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(2, 550, __pyx_L1_error)
23747   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
23748   __pyx_t_1 = 0;
23749 
23750   /* "View.MemoryView":551
23751  *     def T(self):
23752  *         cdef _memoryviewslice result = memoryview_copy(self)
23753  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
23754  *         return result
23755  *
23756  */
23757   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 551, __pyx_L1_error)
23758 
23759   /* "View.MemoryView":552
23760  *         cdef _memoryviewslice result = memoryview_copy(self)
23761  *         transpose_memslice(&result.from_slice)
23762  *         return result             # <<<<<<<<<<<<<<
23763  *
23764  *     @property
23765  */
23766   __Pyx_XDECREF(__pyx_r);
23767   __Pyx_INCREF(((PyObject *)__pyx_v_result));
23768   __pyx_r = ((PyObject *)__pyx_v_result);
23769   goto __pyx_L0;
23770 
23771   /* "View.MemoryView":549
23772  *
23773  *     @property
23774  *     def T(self):             # <<<<<<<<<<<<<<
23775  *         cdef _memoryviewslice result = memoryview_copy(self)
23776  *         transpose_memslice(&result.from_slice)
23777  */
23778 
23779   /* function exit code */
23780   __pyx_L1_error:;
23781   __Pyx_XDECREF(__pyx_t_1);
23782   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23783   __pyx_r = NULL;
23784   __pyx_L0:;
23785   __Pyx_XDECREF((PyObject *)__pyx_v_result);
23786   __Pyx_XGIVEREF(__pyx_r);
23787   __Pyx_RefNannyFinishContext();
23788   return __pyx_r;
23789 }
23790 
23791 /* "View.MemoryView":555
23792  *
23793  *     @property
23794  *     def base(self):             # <<<<<<<<<<<<<<
23795  *         return self.obj
23796  *
23797  */
23798 
23799 /* Python wrapper */
23800 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject * __pyx_v_self)23801 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
23802   PyObject *__pyx_r = 0;
23803   __Pyx_RefNannyDeclarations
23804   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
23805   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
23806 
23807   /* function exit code */
23808   __Pyx_RefNannyFinishContext();
23809   return __pyx_r;
23810 }
23811 
__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj * __pyx_v_self)23812 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
23813   PyObject *__pyx_r = NULL;
23814   __Pyx_RefNannyDeclarations
23815   __Pyx_RefNannySetupContext("__get__", 0);
23816 
23817   /* "View.MemoryView":556
23818  *     @property
23819  *     def base(self):
23820  *         return self.obj             # <<<<<<<<<<<<<<
23821  *
23822  *     @property
23823  */
23824   __Pyx_XDECREF(__pyx_r);
23825   __Pyx_INCREF(__pyx_v_self->obj);
23826   __pyx_r = __pyx_v_self->obj;
23827   goto __pyx_L0;
23828 
23829   /* "View.MemoryView":555
23830  *
23831  *     @property
23832  *     def base(self):             # <<<<<<<<<<<<<<
23833  *         return self.obj
23834  *
23835  */
23836 
23837   /* function exit code */
23838   __pyx_L0:;
23839   __Pyx_XGIVEREF(__pyx_r);
23840   __Pyx_RefNannyFinishContext();
23841   return __pyx_r;
23842 }
23843 
23844 /* "View.MemoryView":559
23845  *
23846  *     @property
23847  *     def shape(self):             # <<<<<<<<<<<<<<
23848  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
23849  *
23850  */
23851 
23852 /* Python wrapper */
23853 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject * __pyx_v_self)23854 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
23855   PyObject *__pyx_r = 0;
23856   __Pyx_RefNannyDeclarations
23857   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
23858   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
23859 
23860   /* function exit code */
23861   __Pyx_RefNannyFinishContext();
23862   return __pyx_r;
23863 }
23864 
__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj * __pyx_v_self)23865 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
23866   Py_ssize_t __pyx_v_length;
23867   PyObject *__pyx_r = NULL;
23868   __Pyx_RefNannyDeclarations
23869   PyObject *__pyx_t_1 = NULL;
23870   Py_ssize_t *__pyx_t_2;
23871   Py_ssize_t *__pyx_t_3;
23872   Py_ssize_t *__pyx_t_4;
23873   PyObject *__pyx_t_5 = NULL;
23874   __Pyx_RefNannySetupContext("__get__", 0);
23875 
23876   /* "View.MemoryView":560
23877  *     @property
23878  *     def shape(self):
23879  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
23880  *
23881  *     @property
23882  */
23883   __Pyx_XDECREF(__pyx_r);
23884   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 560, __pyx_L1_error)
23885   __Pyx_GOTREF(__pyx_t_1);
23886   __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
23887   for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
23888     __pyx_t_2 = __pyx_t_4;
23889     __pyx_v_length = (__pyx_t_2[0]);
23890     __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 560, __pyx_L1_error)
23891     __Pyx_GOTREF(__pyx_t_5);
23892     if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(2, 560, __pyx_L1_error)
23893     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23894   }
23895   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 560, __pyx_L1_error)
23896   __Pyx_GOTREF(__pyx_t_5);
23897   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23898   __pyx_r = __pyx_t_5;
23899   __pyx_t_5 = 0;
23900   goto __pyx_L0;
23901 
23902   /* "View.MemoryView":559
23903  *
23904  *     @property
23905  *     def shape(self):             # <<<<<<<<<<<<<<
23906  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
23907  *
23908  */
23909 
23910   /* function exit code */
23911   __pyx_L1_error:;
23912   __Pyx_XDECREF(__pyx_t_1);
23913   __Pyx_XDECREF(__pyx_t_5);
23914   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23915   __pyx_r = NULL;
23916   __pyx_L0:;
23917   __Pyx_XGIVEREF(__pyx_r);
23918   __Pyx_RefNannyFinishContext();
23919   return __pyx_r;
23920 }
23921 
23922 /* "View.MemoryView":563
23923  *
23924  *     @property
23925  *     def strides(self):             # <<<<<<<<<<<<<<
23926  *         if self.view.strides == NULL:
23927  *
23928  */
23929 
23930 /* Python wrapper */
23931 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject * __pyx_v_self)23932 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
23933   PyObject *__pyx_r = 0;
23934   __Pyx_RefNannyDeclarations
23935   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
23936   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
23937 
23938   /* function exit code */
23939   __Pyx_RefNannyFinishContext();
23940   return __pyx_r;
23941 }
23942 
__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj * __pyx_v_self)23943 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
23944   Py_ssize_t __pyx_v_stride;
23945   PyObject *__pyx_r = NULL;
23946   __Pyx_RefNannyDeclarations
23947   int __pyx_t_1;
23948   PyObject *__pyx_t_2 = NULL;
23949   Py_ssize_t *__pyx_t_3;
23950   Py_ssize_t *__pyx_t_4;
23951   Py_ssize_t *__pyx_t_5;
23952   PyObject *__pyx_t_6 = NULL;
23953   __Pyx_RefNannySetupContext("__get__", 0);
23954 
23955   /* "View.MemoryView":564
23956  *     @property
23957  *     def strides(self):
23958  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
23959  *
23960  *             raise ValueError("Buffer view does not expose strides")
23961  */
23962   __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
23963   if (unlikely(__pyx_t_1)) {
23964 
23965     /* "View.MemoryView":566
23966  *         if self.view.strides == NULL:
23967  *
23968  *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
23969  *
23970  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
23971  */
23972     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 566, __pyx_L1_error)
23973     __Pyx_GOTREF(__pyx_t_2);
23974     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23975     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23976     __PYX_ERR(2, 566, __pyx_L1_error)
23977 
23978     /* "View.MemoryView":564
23979  *     @property
23980  *     def strides(self):
23981  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
23982  *
23983  *             raise ValueError("Buffer view does not expose strides")
23984  */
23985   }
23986 
23987   /* "View.MemoryView":568
23988  *             raise ValueError("Buffer view does not expose strides")
23989  *
23990  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
23991  *
23992  *     @property
23993  */
23994   __Pyx_XDECREF(__pyx_r);
23995   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 568, __pyx_L1_error)
23996   __Pyx_GOTREF(__pyx_t_2);
23997   __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
23998   for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
23999     __pyx_t_3 = __pyx_t_5;
24000     __pyx_v_stride = (__pyx_t_3[0]);
24001     __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 568, __pyx_L1_error)
24002     __Pyx_GOTREF(__pyx_t_6);
24003     if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(2, 568, __pyx_L1_error)
24004     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24005   }
24006   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 568, __pyx_L1_error)
24007   __Pyx_GOTREF(__pyx_t_6);
24008   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24009   __pyx_r = __pyx_t_6;
24010   __pyx_t_6 = 0;
24011   goto __pyx_L0;
24012 
24013   /* "View.MemoryView":563
24014  *
24015  *     @property
24016  *     def strides(self):             # <<<<<<<<<<<<<<
24017  *         if self.view.strides == NULL:
24018  *
24019  */
24020 
24021   /* function exit code */
24022   __pyx_L1_error:;
24023   __Pyx_XDECREF(__pyx_t_2);
24024   __Pyx_XDECREF(__pyx_t_6);
24025   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24026   __pyx_r = NULL;
24027   __pyx_L0:;
24028   __Pyx_XGIVEREF(__pyx_r);
24029   __Pyx_RefNannyFinishContext();
24030   return __pyx_r;
24031 }
24032 
24033 /* "View.MemoryView":571
24034  *
24035  *     @property
24036  *     def suboffsets(self):             # <<<<<<<<<<<<<<
24037  *         if self.view.suboffsets == NULL:
24038  *             return (-1,) * self.view.ndim
24039  */
24040 
24041 /* Python wrapper */
24042 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject * __pyx_v_self)24043 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
24044   PyObject *__pyx_r = 0;
24045   __Pyx_RefNannyDeclarations
24046   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24047   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24048 
24049   /* function exit code */
24050   __Pyx_RefNannyFinishContext();
24051   return __pyx_r;
24052 }
24053 
__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj * __pyx_v_self)24054 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
24055   Py_ssize_t __pyx_v_suboffset;
24056   PyObject *__pyx_r = NULL;
24057   __Pyx_RefNannyDeclarations
24058   int __pyx_t_1;
24059   PyObject *__pyx_t_2 = NULL;
24060   PyObject *__pyx_t_3 = NULL;
24061   Py_ssize_t *__pyx_t_4;
24062   Py_ssize_t *__pyx_t_5;
24063   Py_ssize_t *__pyx_t_6;
24064   __Pyx_RefNannySetupContext("__get__", 0);
24065 
24066   /* "View.MemoryView":572
24067  *     @property
24068  *     def suboffsets(self):
24069  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
24070  *             return (-1,) * self.view.ndim
24071  *
24072  */
24073   __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
24074   if (__pyx_t_1) {
24075 
24076     /* "View.MemoryView":573
24077  *     def suboffsets(self):
24078  *         if self.view.suboffsets == NULL:
24079  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
24080  *
24081  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
24082  */
24083     __Pyx_XDECREF(__pyx_r);
24084     __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 573, __pyx_L1_error)
24085     __Pyx_GOTREF(__pyx_t_2);
24086     __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__42, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 573, __pyx_L1_error)
24087     __Pyx_GOTREF(__pyx_t_3);
24088     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24089     __pyx_r = __pyx_t_3;
24090     __pyx_t_3 = 0;
24091     goto __pyx_L0;
24092 
24093     /* "View.MemoryView":572
24094  *     @property
24095  *     def suboffsets(self):
24096  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
24097  *             return (-1,) * self.view.ndim
24098  *
24099  */
24100   }
24101 
24102   /* "View.MemoryView":575
24103  *             return (-1,) * self.view.ndim
24104  *
24105  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
24106  *
24107  *     @property
24108  */
24109   __Pyx_XDECREF(__pyx_r);
24110   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 575, __pyx_L1_error)
24111   __Pyx_GOTREF(__pyx_t_3);
24112   __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
24113   for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
24114     __pyx_t_4 = __pyx_t_6;
24115     __pyx_v_suboffset = (__pyx_t_4[0]);
24116     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 575, __pyx_L1_error)
24117     __Pyx_GOTREF(__pyx_t_2);
24118     if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(2, 575, __pyx_L1_error)
24119     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24120   }
24121   __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 575, __pyx_L1_error)
24122   __Pyx_GOTREF(__pyx_t_2);
24123   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24124   __pyx_r = __pyx_t_2;
24125   __pyx_t_2 = 0;
24126   goto __pyx_L0;
24127 
24128   /* "View.MemoryView":571
24129  *
24130  *     @property
24131  *     def suboffsets(self):             # <<<<<<<<<<<<<<
24132  *         if self.view.suboffsets == NULL:
24133  *             return (-1,) * self.view.ndim
24134  */
24135 
24136   /* function exit code */
24137   __pyx_L1_error:;
24138   __Pyx_XDECREF(__pyx_t_2);
24139   __Pyx_XDECREF(__pyx_t_3);
24140   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24141   __pyx_r = NULL;
24142   __pyx_L0:;
24143   __Pyx_XGIVEREF(__pyx_r);
24144   __Pyx_RefNannyFinishContext();
24145   return __pyx_r;
24146 }
24147 
24148 /* "View.MemoryView":578
24149  *
24150  *     @property
24151  *     def ndim(self):             # <<<<<<<<<<<<<<
24152  *         return self.view.ndim
24153  *
24154  */
24155 
24156 /* Python wrapper */
24157 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject * __pyx_v_self)24158 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
24159   PyObject *__pyx_r = 0;
24160   __Pyx_RefNannyDeclarations
24161   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24162   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24163 
24164   /* function exit code */
24165   __Pyx_RefNannyFinishContext();
24166   return __pyx_r;
24167 }
24168 
__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj * __pyx_v_self)24169 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
24170   PyObject *__pyx_r = NULL;
24171   __Pyx_RefNannyDeclarations
24172   PyObject *__pyx_t_1 = NULL;
24173   __Pyx_RefNannySetupContext("__get__", 0);
24174 
24175   /* "View.MemoryView":579
24176  *     @property
24177  *     def ndim(self):
24178  *         return self.view.ndim             # <<<<<<<<<<<<<<
24179  *
24180  *     @property
24181  */
24182   __Pyx_XDECREF(__pyx_r);
24183   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 579, __pyx_L1_error)
24184   __Pyx_GOTREF(__pyx_t_1);
24185   __pyx_r = __pyx_t_1;
24186   __pyx_t_1 = 0;
24187   goto __pyx_L0;
24188 
24189   /* "View.MemoryView":578
24190  *
24191  *     @property
24192  *     def ndim(self):             # <<<<<<<<<<<<<<
24193  *         return self.view.ndim
24194  *
24195  */
24196 
24197   /* function exit code */
24198   __pyx_L1_error:;
24199   __Pyx_XDECREF(__pyx_t_1);
24200   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24201   __pyx_r = NULL;
24202   __pyx_L0:;
24203   __Pyx_XGIVEREF(__pyx_r);
24204   __Pyx_RefNannyFinishContext();
24205   return __pyx_r;
24206 }
24207 
24208 /* "View.MemoryView":582
24209  *
24210  *     @property
24211  *     def itemsize(self):             # <<<<<<<<<<<<<<
24212  *         return self.view.itemsize
24213  *
24214  */
24215 
24216 /* Python wrapper */
24217 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject * __pyx_v_self)24218 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
24219   PyObject *__pyx_r = 0;
24220   __Pyx_RefNannyDeclarations
24221   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24222   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24223 
24224   /* function exit code */
24225   __Pyx_RefNannyFinishContext();
24226   return __pyx_r;
24227 }
24228 
__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj * __pyx_v_self)24229 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
24230   PyObject *__pyx_r = NULL;
24231   __Pyx_RefNannyDeclarations
24232   PyObject *__pyx_t_1 = NULL;
24233   __Pyx_RefNannySetupContext("__get__", 0);
24234 
24235   /* "View.MemoryView":583
24236  *     @property
24237  *     def itemsize(self):
24238  *         return self.view.itemsize             # <<<<<<<<<<<<<<
24239  *
24240  *     @property
24241  */
24242   __Pyx_XDECREF(__pyx_r);
24243   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 583, __pyx_L1_error)
24244   __Pyx_GOTREF(__pyx_t_1);
24245   __pyx_r = __pyx_t_1;
24246   __pyx_t_1 = 0;
24247   goto __pyx_L0;
24248 
24249   /* "View.MemoryView":582
24250  *
24251  *     @property
24252  *     def itemsize(self):             # <<<<<<<<<<<<<<
24253  *         return self.view.itemsize
24254  *
24255  */
24256 
24257   /* function exit code */
24258   __pyx_L1_error:;
24259   __Pyx_XDECREF(__pyx_t_1);
24260   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24261   __pyx_r = NULL;
24262   __pyx_L0:;
24263   __Pyx_XGIVEREF(__pyx_r);
24264   __Pyx_RefNannyFinishContext();
24265   return __pyx_r;
24266 }
24267 
24268 /* "View.MemoryView":586
24269  *
24270  *     @property
24271  *     def nbytes(self):             # <<<<<<<<<<<<<<
24272  *         return self.size * self.view.itemsize
24273  *
24274  */
24275 
24276 /* Python wrapper */
24277 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject * __pyx_v_self)24278 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
24279   PyObject *__pyx_r = 0;
24280   __Pyx_RefNannyDeclarations
24281   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24282   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24283 
24284   /* function exit code */
24285   __Pyx_RefNannyFinishContext();
24286   return __pyx_r;
24287 }
24288 
__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj * __pyx_v_self)24289 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
24290   PyObject *__pyx_r = NULL;
24291   __Pyx_RefNannyDeclarations
24292   PyObject *__pyx_t_1 = NULL;
24293   PyObject *__pyx_t_2 = NULL;
24294   PyObject *__pyx_t_3 = NULL;
24295   __Pyx_RefNannySetupContext("__get__", 0);
24296 
24297   /* "View.MemoryView":587
24298  *     @property
24299  *     def nbytes(self):
24300  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
24301  *
24302  *     @property
24303  */
24304   __Pyx_XDECREF(__pyx_r);
24305   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 587, __pyx_L1_error)
24306   __Pyx_GOTREF(__pyx_t_1);
24307   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 587, __pyx_L1_error)
24308   __Pyx_GOTREF(__pyx_t_2);
24309   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 587, __pyx_L1_error)
24310   __Pyx_GOTREF(__pyx_t_3);
24311   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24312   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24313   __pyx_r = __pyx_t_3;
24314   __pyx_t_3 = 0;
24315   goto __pyx_L0;
24316 
24317   /* "View.MemoryView":586
24318  *
24319  *     @property
24320  *     def nbytes(self):             # <<<<<<<<<<<<<<
24321  *         return self.size * self.view.itemsize
24322  *
24323  */
24324 
24325   /* function exit code */
24326   __pyx_L1_error:;
24327   __Pyx_XDECREF(__pyx_t_1);
24328   __Pyx_XDECREF(__pyx_t_2);
24329   __Pyx_XDECREF(__pyx_t_3);
24330   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24331   __pyx_r = NULL;
24332   __pyx_L0:;
24333   __Pyx_XGIVEREF(__pyx_r);
24334   __Pyx_RefNannyFinishContext();
24335   return __pyx_r;
24336 }
24337 
24338 /* "View.MemoryView":590
24339  *
24340  *     @property
24341  *     def size(self):             # <<<<<<<<<<<<<<
24342  *         if self._size is None:
24343  *             result = 1
24344  */
24345 
24346 /* Python wrapper */
24347 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject * __pyx_v_self)24348 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
24349   PyObject *__pyx_r = 0;
24350   __Pyx_RefNannyDeclarations
24351   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24352   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24353 
24354   /* function exit code */
24355   __Pyx_RefNannyFinishContext();
24356   return __pyx_r;
24357 }
24358 
__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj * __pyx_v_self)24359 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
24360   PyObject *__pyx_v_result = NULL;
24361   PyObject *__pyx_v_length = NULL;
24362   PyObject *__pyx_r = NULL;
24363   __Pyx_RefNannyDeclarations
24364   int __pyx_t_1;
24365   int __pyx_t_2;
24366   Py_ssize_t *__pyx_t_3;
24367   Py_ssize_t *__pyx_t_4;
24368   Py_ssize_t *__pyx_t_5;
24369   PyObject *__pyx_t_6 = NULL;
24370   __Pyx_RefNannySetupContext("__get__", 0);
24371 
24372   /* "View.MemoryView":591
24373  *     @property
24374  *     def size(self):
24375  *         if self._size is None:             # <<<<<<<<<<<<<<
24376  *             result = 1
24377  *
24378  */
24379   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
24380   __pyx_t_2 = (__pyx_t_1 != 0);
24381   if (__pyx_t_2) {
24382 
24383     /* "View.MemoryView":592
24384  *     def size(self):
24385  *         if self._size is None:
24386  *             result = 1             # <<<<<<<<<<<<<<
24387  *
24388  *             for length in self.view.shape[:self.view.ndim]:
24389  */
24390     __Pyx_INCREF(__pyx_int_1);
24391     __pyx_v_result = __pyx_int_1;
24392 
24393     /* "View.MemoryView":594
24394  *             result = 1
24395  *
24396  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
24397  *                 result *= length
24398  *
24399  */
24400     __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
24401     for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
24402       __pyx_t_3 = __pyx_t_5;
24403       __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 594, __pyx_L1_error)
24404       __Pyx_GOTREF(__pyx_t_6);
24405       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
24406       __pyx_t_6 = 0;
24407 
24408       /* "View.MemoryView":595
24409  *
24410  *             for length in self.view.shape[:self.view.ndim]:
24411  *                 result *= length             # <<<<<<<<<<<<<<
24412  *
24413  *             self._size = result
24414  */
24415       __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 595, __pyx_L1_error)
24416       __Pyx_GOTREF(__pyx_t_6);
24417       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
24418       __pyx_t_6 = 0;
24419     }
24420 
24421     /* "View.MemoryView":597
24422  *                 result *= length
24423  *
24424  *             self._size = result             # <<<<<<<<<<<<<<
24425  *
24426  *         return self._size
24427  */
24428     __Pyx_INCREF(__pyx_v_result);
24429     __Pyx_GIVEREF(__pyx_v_result);
24430     __Pyx_GOTREF(__pyx_v_self->_size);
24431     __Pyx_DECREF(__pyx_v_self->_size);
24432     __pyx_v_self->_size = __pyx_v_result;
24433 
24434     /* "View.MemoryView":591
24435  *     @property
24436  *     def size(self):
24437  *         if self._size is None:             # <<<<<<<<<<<<<<
24438  *             result = 1
24439  *
24440  */
24441   }
24442 
24443   /* "View.MemoryView":599
24444  *             self._size = result
24445  *
24446  *         return self._size             # <<<<<<<<<<<<<<
24447  *
24448  *     def __len__(self):
24449  */
24450   __Pyx_XDECREF(__pyx_r);
24451   __Pyx_INCREF(__pyx_v_self->_size);
24452   __pyx_r = __pyx_v_self->_size;
24453   goto __pyx_L0;
24454 
24455   /* "View.MemoryView":590
24456  *
24457  *     @property
24458  *     def size(self):             # <<<<<<<<<<<<<<
24459  *         if self._size is None:
24460  *             result = 1
24461  */
24462 
24463   /* function exit code */
24464   __pyx_L1_error:;
24465   __Pyx_XDECREF(__pyx_t_6);
24466   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24467   __pyx_r = NULL;
24468   __pyx_L0:;
24469   __Pyx_XDECREF(__pyx_v_result);
24470   __Pyx_XDECREF(__pyx_v_length);
24471   __Pyx_XGIVEREF(__pyx_r);
24472   __Pyx_RefNannyFinishContext();
24473   return __pyx_r;
24474 }
24475 
24476 /* "View.MemoryView":601
24477  *         return self._size
24478  *
24479  *     def __len__(self):             # <<<<<<<<<<<<<<
24480  *         if self.view.ndim >= 1:
24481  *             return self.view.shape[0]
24482  */
24483 
24484 /* Python wrapper */
24485 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___len__(PyObject * __pyx_v_self)24486 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
24487   Py_ssize_t __pyx_r;
24488   __Pyx_RefNannyDeclarations
24489   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
24490   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24491 
24492   /* function exit code */
24493   __Pyx_RefNannyFinishContext();
24494   return __pyx_r;
24495 }
24496 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj * __pyx_v_self)24497 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
24498   Py_ssize_t __pyx_r;
24499   __Pyx_RefNannyDeclarations
24500   int __pyx_t_1;
24501   __Pyx_RefNannySetupContext("__len__", 0);
24502 
24503   /* "View.MemoryView":602
24504  *
24505  *     def __len__(self):
24506  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
24507  *             return self.view.shape[0]
24508  *
24509  */
24510   __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
24511   if (__pyx_t_1) {
24512 
24513     /* "View.MemoryView":603
24514  *     def __len__(self):
24515  *         if self.view.ndim >= 1:
24516  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
24517  *
24518  *         return 0
24519  */
24520     __pyx_r = (__pyx_v_self->view.shape[0]);
24521     goto __pyx_L0;
24522 
24523     /* "View.MemoryView":602
24524  *
24525  *     def __len__(self):
24526  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
24527  *             return self.view.shape[0]
24528  *
24529  */
24530   }
24531 
24532   /* "View.MemoryView":605
24533  *             return self.view.shape[0]
24534  *
24535  *         return 0             # <<<<<<<<<<<<<<
24536  *
24537  *     def __repr__(self):
24538  */
24539   __pyx_r = 0;
24540   goto __pyx_L0;
24541 
24542   /* "View.MemoryView":601
24543  *         return self._size
24544  *
24545  *     def __len__(self):             # <<<<<<<<<<<<<<
24546  *         if self.view.ndim >= 1:
24547  *             return self.view.shape[0]
24548  */
24549 
24550   /* function exit code */
24551   __pyx_L0:;
24552   __Pyx_RefNannyFinishContext();
24553   return __pyx_r;
24554 }
24555 
24556 /* "View.MemoryView":607
24557  *         return 0
24558  *
24559  *     def __repr__(self):             # <<<<<<<<<<<<<<
24560  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
24561  *                                                id(self))
24562  */
24563 
24564 /* Python wrapper */
24565 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___repr__(PyObject * __pyx_v_self)24566 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
24567   PyObject *__pyx_r = 0;
24568   __Pyx_RefNannyDeclarations
24569   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
24570   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24571 
24572   /* function exit code */
24573   __Pyx_RefNannyFinishContext();
24574   return __pyx_r;
24575 }
24576 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj * __pyx_v_self)24577 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
24578   PyObject *__pyx_r = NULL;
24579   __Pyx_RefNannyDeclarations
24580   PyObject *__pyx_t_1 = NULL;
24581   PyObject *__pyx_t_2 = NULL;
24582   PyObject *__pyx_t_3 = NULL;
24583   __Pyx_RefNannySetupContext("__repr__", 0);
24584 
24585   /* "View.MemoryView":608
24586  *
24587  *     def __repr__(self):
24588  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
24589  *                                                id(self))
24590  *
24591  */
24592   __Pyx_XDECREF(__pyx_r);
24593   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 608, __pyx_L1_error)
24594   __Pyx_GOTREF(__pyx_t_1);
24595   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 608, __pyx_L1_error)
24596   __Pyx_GOTREF(__pyx_t_2);
24597   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24598   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 608, __pyx_L1_error)
24599   __Pyx_GOTREF(__pyx_t_1);
24600   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24601 
24602   /* "View.MemoryView":609
24603  *     def __repr__(self):
24604  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
24605  *                                                id(self))             # <<<<<<<<<<<<<<
24606  *
24607  *     def __str__(self):
24608  */
24609   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 609, __pyx_L1_error)
24610   __Pyx_GOTREF(__pyx_t_2);
24611 
24612   /* "View.MemoryView":608
24613  *
24614  *     def __repr__(self):
24615  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
24616  *                                                id(self))
24617  *
24618  */
24619   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 608, __pyx_L1_error)
24620   __Pyx_GOTREF(__pyx_t_3);
24621   __Pyx_GIVEREF(__pyx_t_1);
24622   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
24623   __Pyx_GIVEREF(__pyx_t_2);
24624   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
24625   __pyx_t_1 = 0;
24626   __pyx_t_2 = 0;
24627   __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(2, 608, __pyx_L1_error)
24628   __Pyx_GOTREF(__pyx_t_2);
24629   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24630   __pyx_r = __pyx_t_2;
24631   __pyx_t_2 = 0;
24632   goto __pyx_L0;
24633 
24634   /* "View.MemoryView":607
24635  *         return 0
24636  *
24637  *     def __repr__(self):             # <<<<<<<<<<<<<<
24638  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
24639  *                                                id(self))
24640  */
24641 
24642   /* function exit code */
24643   __pyx_L1_error:;
24644   __Pyx_XDECREF(__pyx_t_1);
24645   __Pyx_XDECREF(__pyx_t_2);
24646   __Pyx_XDECREF(__pyx_t_3);
24647   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24648   __pyx_r = NULL;
24649   __pyx_L0:;
24650   __Pyx_XGIVEREF(__pyx_r);
24651   __Pyx_RefNannyFinishContext();
24652   return __pyx_r;
24653 }
24654 
24655 /* "View.MemoryView":611
24656  *                                                id(self))
24657  *
24658  *     def __str__(self):             # <<<<<<<<<<<<<<
24659  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
24660  *
24661  */
24662 
24663 /* Python wrapper */
24664 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___str__(PyObject * __pyx_v_self)24665 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
24666   PyObject *__pyx_r = 0;
24667   __Pyx_RefNannyDeclarations
24668   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
24669   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
24670 
24671   /* function exit code */
24672   __Pyx_RefNannyFinishContext();
24673   return __pyx_r;
24674 }
24675 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj * __pyx_v_self)24676 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
24677   PyObject *__pyx_r = NULL;
24678   __Pyx_RefNannyDeclarations
24679   PyObject *__pyx_t_1 = NULL;
24680   PyObject *__pyx_t_2 = NULL;
24681   __Pyx_RefNannySetupContext("__str__", 0);
24682 
24683   /* "View.MemoryView":612
24684  *
24685  *     def __str__(self):
24686  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
24687  *
24688  *
24689  */
24690   __Pyx_XDECREF(__pyx_r);
24691   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 612, __pyx_L1_error)
24692   __Pyx_GOTREF(__pyx_t_1);
24693   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 612, __pyx_L1_error)
24694   __Pyx_GOTREF(__pyx_t_2);
24695   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24696   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 612, __pyx_L1_error)
24697   __Pyx_GOTREF(__pyx_t_1);
24698   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24699   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 612, __pyx_L1_error)
24700   __Pyx_GOTREF(__pyx_t_2);
24701   __Pyx_GIVEREF(__pyx_t_1);
24702   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
24703   __pyx_t_1 = 0;
24704   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 612, __pyx_L1_error)
24705   __Pyx_GOTREF(__pyx_t_1);
24706   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24707   __pyx_r = __pyx_t_1;
24708   __pyx_t_1 = 0;
24709   goto __pyx_L0;
24710 
24711   /* "View.MemoryView":611
24712  *                                                id(self))
24713  *
24714  *     def __str__(self):             # <<<<<<<<<<<<<<
24715  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
24716  *
24717  */
24718 
24719   /* function exit code */
24720   __pyx_L1_error:;
24721   __Pyx_XDECREF(__pyx_t_1);
24722   __Pyx_XDECREF(__pyx_t_2);
24723   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24724   __pyx_r = NULL;
24725   __pyx_L0:;
24726   __Pyx_XGIVEREF(__pyx_r);
24727   __Pyx_RefNannyFinishContext();
24728   return __pyx_r;
24729 }
24730 
24731 /* "View.MemoryView":615
24732  *
24733  *
24734  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
24735  *         cdef __Pyx_memviewslice *mslice
24736  *         cdef __Pyx_memviewslice tmp
24737  */
24738 
24739 /* Python wrapper */
24740 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_is_c_contig(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24741 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24742   PyObject *__pyx_r = 0;
24743   __Pyx_RefNannyDeclarations
24744   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
24745   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
24746 
24747   /* function exit code */
24748   __Pyx_RefNannyFinishContext();
24749   return __pyx_r;
24750 }
24751 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj * __pyx_v_self)24752 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
24753   __Pyx_memviewslice *__pyx_v_mslice;
24754   __Pyx_memviewslice __pyx_v_tmp;
24755   PyObject *__pyx_r = NULL;
24756   __Pyx_RefNannyDeclarations
24757   PyObject *__pyx_t_1 = NULL;
24758   __Pyx_RefNannySetupContext("is_c_contig", 0);
24759 
24760   /* "View.MemoryView":618
24761  *         cdef __Pyx_memviewslice *mslice
24762  *         cdef __Pyx_memviewslice tmp
24763  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
24764  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
24765  *
24766  */
24767   __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
24768 
24769   /* "View.MemoryView":619
24770  *         cdef __Pyx_memviewslice tmp
24771  *         mslice = get_slice_from_memview(self, &tmp)
24772  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
24773  *
24774  *     def is_f_contig(self):
24775  */
24776   __Pyx_XDECREF(__pyx_r);
24777   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 619, __pyx_L1_error)
24778   __Pyx_GOTREF(__pyx_t_1);
24779   __pyx_r = __pyx_t_1;
24780   __pyx_t_1 = 0;
24781   goto __pyx_L0;
24782 
24783   /* "View.MemoryView":615
24784  *
24785  *
24786  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
24787  *         cdef __Pyx_memviewslice *mslice
24788  *         cdef __Pyx_memviewslice tmp
24789  */
24790 
24791   /* function exit code */
24792   __pyx_L1_error:;
24793   __Pyx_XDECREF(__pyx_t_1);
24794   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
24795   __pyx_r = NULL;
24796   __pyx_L0:;
24797   __Pyx_XGIVEREF(__pyx_r);
24798   __Pyx_RefNannyFinishContext();
24799   return __pyx_r;
24800 }
24801 
24802 /* "View.MemoryView":621
24803  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
24804  *
24805  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
24806  *         cdef __Pyx_memviewslice *mslice
24807  *         cdef __Pyx_memviewslice tmp
24808  */
24809 
24810 /* Python wrapper */
24811 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_is_f_contig(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24812 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24813   PyObject *__pyx_r = 0;
24814   __Pyx_RefNannyDeclarations
24815   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
24816   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
24817 
24818   /* function exit code */
24819   __Pyx_RefNannyFinishContext();
24820   return __pyx_r;
24821 }
24822 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj * __pyx_v_self)24823 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
24824   __Pyx_memviewslice *__pyx_v_mslice;
24825   __Pyx_memviewslice __pyx_v_tmp;
24826   PyObject *__pyx_r = NULL;
24827   __Pyx_RefNannyDeclarations
24828   PyObject *__pyx_t_1 = NULL;
24829   __Pyx_RefNannySetupContext("is_f_contig", 0);
24830 
24831   /* "View.MemoryView":624
24832  *         cdef __Pyx_memviewslice *mslice
24833  *         cdef __Pyx_memviewslice tmp
24834  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
24835  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
24836  *
24837  */
24838   __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
24839 
24840   /* "View.MemoryView":625
24841  *         cdef __Pyx_memviewslice tmp
24842  *         mslice = get_slice_from_memview(self, &tmp)
24843  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
24844  *
24845  *     def copy(self):
24846  */
24847   __Pyx_XDECREF(__pyx_r);
24848   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 625, __pyx_L1_error)
24849   __Pyx_GOTREF(__pyx_t_1);
24850   __pyx_r = __pyx_t_1;
24851   __pyx_t_1 = 0;
24852   goto __pyx_L0;
24853 
24854   /* "View.MemoryView":621
24855  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
24856  *
24857  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
24858  *         cdef __Pyx_memviewslice *mslice
24859  *         cdef __Pyx_memviewslice tmp
24860  */
24861 
24862   /* function exit code */
24863   __pyx_L1_error:;
24864   __Pyx_XDECREF(__pyx_t_1);
24865   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
24866   __pyx_r = NULL;
24867   __pyx_L0:;
24868   __Pyx_XGIVEREF(__pyx_r);
24869   __Pyx_RefNannyFinishContext();
24870   return __pyx_r;
24871 }
24872 
24873 /* "View.MemoryView":627
24874  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
24875  *
24876  *     def copy(self):             # <<<<<<<<<<<<<<
24877  *         cdef __Pyx_memviewslice mslice
24878  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
24879  */
24880 
24881 /* Python wrapper */
24882 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_copy(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24883 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24884   PyObject *__pyx_r = 0;
24885   __Pyx_RefNannyDeclarations
24886   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
24887   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
24888 
24889   /* function exit code */
24890   __Pyx_RefNannyFinishContext();
24891   return __pyx_r;
24892 }
24893 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj * __pyx_v_self)24894 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
24895   __Pyx_memviewslice __pyx_v_mslice;
24896   int __pyx_v_flags;
24897   PyObject *__pyx_r = NULL;
24898   __Pyx_RefNannyDeclarations
24899   __Pyx_memviewslice __pyx_t_1;
24900   PyObject *__pyx_t_2 = NULL;
24901   __Pyx_RefNannySetupContext("copy", 0);
24902 
24903   /* "View.MemoryView":629
24904  *     def copy(self):
24905  *         cdef __Pyx_memviewslice mslice
24906  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
24907  *
24908  *         slice_copy(self, &mslice)
24909  */
24910   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
24911 
24912   /* "View.MemoryView":631
24913  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
24914  *
24915  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
24916  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
24917  *                                    self.view.itemsize,
24918  */
24919   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
24920 
24921   /* "View.MemoryView":632
24922  *
24923  *         slice_copy(self, &mslice)
24924  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
24925  *                                    self.view.itemsize,
24926  *                                    flags|PyBUF_C_CONTIGUOUS,
24927  */
24928   __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(2, 632, __pyx_L1_error)
24929   __pyx_v_mslice = __pyx_t_1;
24930 
24931   /* "View.MemoryView":637
24932  *                                    self.dtype_is_object)
24933  *
24934  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
24935  *
24936  *     def copy_fortran(self):
24937  */
24938   __Pyx_XDECREF(__pyx_r);
24939   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 637, __pyx_L1_error)
24940   __Pyx_GOTREF(__pyx_t_2);
24941   __pyx_r = __pyx_t_2;
24942   __pyx_t_2 = 0;
24943   goto __pyx_L0;
24944 
24945   /* "View.MemoryView":627
24946  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
24947  *
24948  *     def copy(self):             # <<<<<<<<<<<<<<
24949  *         cdef __Pyx_memviewslice mslice
24950  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
24951  */
24952 
24953   /* function exit code */
24954   __pyx_L1_error:;
24955   __Pyx_XDECREF(__pyx_t_2);
24956   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
24957   __pyx_r = NULL;
24958   __pyx_L0:;
24959   __Pyx_XGIVEREF(__pyx_r);
24960   __Pyx_RefNannyFinishContext();
24961   return __pyx_r;
24962 }
24963 
24964 /* "View.MemoryView":639
24965  *         return memoryview_copy_from_slice(self, &mslice)
24966  *
24967  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
24968  *         cdef __Pyx_memviewslice src, dst
24969  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
24970  */
24971 
24972 /* Python wrapper */
24973 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_copy_fortran(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24974 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24975   PyObject *__pyx_r = 0;
24976   __Pyx_RefNannyDeclarations
24977   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
24978   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
24979 
24980   /* function exit code */
24981   __Pyx_RefNannyFinishContext();
24982   return __pyx_r;
24983 }
24984 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj * __pyx_v_self)24985 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
24986   __Pyx_memviewslice __pyx_v_src;
24987   __Pyx_memviewslice __pyx_v_dst;
24988   int __pyx_v_flags;
24989   PyObject *__pyx_r = NULL;
24990   __Pyx_RefNannyDeclarations
24991   __Pyx_memviewslice __pyx_t_1;
24992   PyObject *__pyx_t_2 = NULL;
24993   __Pyx_RefNannySetupContext("copy_fortran", 0);
24994 
24995   /* "View.MemoryView":641
24996  *     def copy_fortran(self):
24997  *         cdef __Pyx_memviewslice src, dst
24998  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
24999  *
25000  *         slice_copy(self, &src)
25001  */
25002   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
25003 
25004   /* "View.MemoryView":643
25005  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
25006  *
25007  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
25008  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
25009  *                                 self.view.itemsize,
25010  */
25011   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
25012 
25013   /* "View.MemoryView":644
25014  *
25015  *         slice_copy(self, &src)
25016  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
25017  *                                 self.view.itemsize,
25018  *                                 flags|PyBUF_F_CONTIGUOUS,
25019  */
25020   __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(2, 644, __pyx_L1_error)
25021   __pyx_v_dst = __pyx_t_1;
25022 
25023   /* "View.MemoryView":649
25024  *                                 self.dtype_is_object)
25025  *
25026  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
25027  *
25028  *
25029  */
25030   __Pyx_XDECREF(__pyx_r);
25031   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 649, __pyx_L1_error)
25032   __Pyx_GOTREF(__pyx_t_2);
25033   __pyx_r = __pyx_t_2;
25034   __pyx_t_2 = 0;
25035   goto __pyx_L0;
25036 
25037   /* "View.MemoryView":639
25038  *         return memoryview_copy_from_slice(self, &mslice)
25039  *
25040  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
25041  *         cdef __Pyx_memviewslice src, dst
25042  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
25043  */
25044 
25045   /* function exit code */
25046   __pyx_L1_error:;
25047   __Pyx_XDECREF(__pyx_t_2);
25048   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
25049   __pyx_r = NULL;
25050   __pyx_L0:;
25051   __Pyx_XGIVEREF(__pyx_r);
25052   __Pyx_RefNannyFinishContext();
25053   return __pyx_r;
25054 }
25055 
25056 /* "(tree fragment)":1
25057  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
25058  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25059  * def __setstate_cython__(self, __pyx_state):
25060  */
25061 
25062 /* Python wrapper */
25063 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)25064 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
25065   PyObject *__pyx_r = 0;
25066   __Pyx_RefNannyDeclarations
25067   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
25068   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25069 
25070   /* function exit code */
25071   __Pyx_RefNannyFinishContext();
25072   return __pyx_r;
25073 }
25074 
__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj * __pyx_v_self)25075 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
25076   PyObject *__pyx_r = NULL;
25077   __Pyx_RefNannyDeclarations
25078   PyObject *__pyx_t_1 = NULL;
25079   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
25080 
25081   /* "(tree fragment)":2
25082  * def __reduce_cython__(self):
25083  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
25084  * def __setstate_cython__(self, __pyx_state):
25085  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25086  */
25087   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
25088   __Pyx_GOTREF(__pyx_t_1);
25089   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
25090   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25091   __PYX_ERR(2, 2, __pyx_L1_error)
25092 
25093   /* "(tree fragment)":1
25094  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
25095  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25096  * def __setstate_cython__(self, __pyx_state):
25097  */
25098 
25099   /* function exit code */
25100   __pyx_L1_error:;
25101   __Pyx_XDECREF(__pyx_t_1);
25102   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25103   __pyx_r = NULL;
25104   __Pyx_XGIVEREF(__pyx_r);
25105   __Pyx_RefNannyFinishContext();
25106   return __pyx_r;
25107 }
25108 
25109 /* "(tree fragment)":3
25110  * def __reduce_cython__(self):
25111  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25112  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
25113  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25114  */
25115 
25116 /* Python wrapper */
25117 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)25118 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
25119   PyObject *__pyx_r = 0;
25120   __Pyx_RefNannyDeclarations
25121   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
25122   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
25123 
25124   /* function exit code */
25125   __Pyx_RefNannyFinishContext();
25126   return __pyx_r;
25127 }
25128 
__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)25129 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) {
25130   PyObject *__pyx_r = NULL;
25131   __Pyx_RefNannyDeclarations
25132   PyObject *__pyx_t_1 = NULL;
25133   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
25134 
25135   /* "(tree fragment)":4
25136  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25137  * def __setstate_cython__(self, __pyx_state):
25138  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
25139  */
25140   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
25141   __Pyx_GOTREF(__pyx_t_1);
25142   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
25143   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25144   __PYX_ERR(2, 4, __pyx_L1_error)
25145 
25146   /* "(tree fragment)":3
25147  * def __reduce_cython__(self):
25148  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25149  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
25150  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
25151  */
25152 
25153   /* function exit code */
25154   __pyx_L1_error:;
25155   __Pyx_XDECREF(__pyx_t_1);
25156   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25157   __pyx_r = NULL;
25158   __Pyx_XGIVEREF(__pyx_r);
25159   __Pyx_RefNannyFinishContext();
25160   return __pyx_r;
25161 }
25162 
25163 /* "View.MemoryView":653
25164  *
25165  * @cname('__pyx_memoryview_new')
25166  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
25167  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
25168  *     result.typeinfo = typeinfo
25169  */
25170 
__pyx_memoryview_new(PyObject * __pyx_v_o,int __pyx_v_flags,int __pyx_v_dtype_is_object,__Pyx_TypeInfo * __pyx_v_typeinfo)25171 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
25172   struct __pyx_memoryview_obj *__pyx_v_result = 0;
25173   PyObject *__pyx_r = NULL;
25174   __Pyx_RefNannyDeclarations
25175   PyObject *__pyx_t_1 = NULL;
25176   PyObject *__pyx_t_2 = NULL;
25177   PyObject *__pyx_t_3 = NULL;
25178   __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
25179 
25180   /* "View.MemoryView":654
25181  * @cname('__pyx_memoryview_new')
25182  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
25183  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
25184  *     result.typeinfo = typeinfo
25185  *     return result
25186  */
25187   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 654, __pyx_L1_error)
25188   __Pyx_GOTREF(__pyx_t_1);
25189   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 654, __pyx_L1_error)
25190   __Pyx_GOTREF(__pyx_t_2);
25191   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 654, __pyx_L1_error)
25192   __Pyx_GOTREF(__pyx_t_3);
25193   __Pyx_INCREF(__pyx_v_o);
25194   __Pyx_GIVEREF(__pyx_v_o);
25195   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
25196   __Pyx_GIVEREF(__pyx_t_1);
25197   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
25198   __Pyx_GIVEREF(__pyx_t_2);
25199   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
25200   __pyx_t_1 = 0;
25201   __pyx_t_2 = 0;
25202   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 654, __pyx_L1_error)
25203   __Pyx_GOTREF(__pyx_t_2);
25204   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25205   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
25206   __pyx_t_2 = 0;
25207 
25208   /* "View.MemoryView":655
25209  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
25210  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
25211  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
25212  *     return result
25213  *
25214  */
25215   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
25216 
25217   /* "View.MemoryView":656
25218  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
25219  *     result.typeinfo = typeinfo
25220  *     return result             # <<<<<<<<<<<<<<
25221  *
25222  * @cname('__pyx_memoryview_check')
25223  */
25224   __Pyx_XDECREF(__pyx_r);
25225   __Pyx_INCREF(((PyObject *)__pyx_v_result));
25226   __pyx_r = ((PyObject *)__pyx_v_result);
25227   goto __pyx_L0;
25228 
25229   /* "View.MemoryView":653
25230  *
25231  * @cname('__pyx_memoryview_new')
25232  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
25233  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
25234  *     result.typeinfo = typeinfo
25235  */
25236 
25237   /* function exit code */
25238   __pyx_L1_error:;
25239   __Pyx_XDECREF(__pyx_t_1);
25240   __Pyx_XDECREF(__pyx_t_2);
25241   __Pyx_XDECREF(__pyx_t_3);
25242   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
25243   __pyx_r = 0;
25244   __pyx_L0:;
25245   __Pyx_XDECREF((PyObject *)__pyx_v_result);
25246   __Pyx_XGIVEREF(__pyx_r);
25247   __Pyx_RefNannyFinishContext();
25248   return __pyx_r;
25249 }
25250 
25251 /* "View.MemoryView":659
25252  *
25253  * @cname('__pyx_memoryview_check')
25254  * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
25255  *     return isinstance(o, memoryview)
25256  *
25257  */
25258 
__pyx_memoryview_check(PyObject * __pyx_v_o)25259 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
25260   int __pyx_r;
25261   __Pyx_RefNannyDeclarations
25262   int __pyx_t_1;
25263   __Pyx_RefNannySetupContext("memoryview_check", 0);
25264 
25265   /* "View.MemoryView":660
25266  * @cname('__pyx_memoryview_check')
25267  * cdef inline bint memoryview_check(object o):
25268  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
25269  *
25270  * cdef tuple _unellipsify(object index, int ndim):
25271  */
25272   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
25273   __pyx_r = __pyx_t_1;
25274   goto __pyx_L0;
25275 
25276   /* "View.MemoryView":659
25277  *
25278  * @cname('__pyx_memoryview_check')
25279  * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
25280  *     return isinstance(o, memoryview)
25281  *
25282  */
25283 
25284   /* function exit code */
25285   __pyx_L0:;
25286   __Pyx_RefNannyFinishContext();
25287   return __pyx_r;
25288 }
25289 
25290 /* "View.MemoryView":662
25291  *     return isinstance(o, memoryview)
25292  *
25293  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
25294  *     """
25295  *     Replace all ellipses with full slices and fill incomplete indices with
25296  */
25297 
_unellipsify(PyObject * __pyx_v_index,int __pyx_v_ndim)25298 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
25299   PyObject *__pyx_v_tup = NULL;
25300   PyObject *__pyx_v_result = NULL;
25301   int __pyx_v_have_slices;
25302   int __pyx_v_seen_ellipsis;
25303   CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
25304   PyObject *__pyx_v_item = NULL;
25305   Py_ssize_t __pyx_v_nslices;
25306   PyObject *__pyx_r = NULL;
25307   __Pyx_RefNannyDeclarations
25308   int __pyx_t_1;
25309   int __pyx_t_2;
25310   PyObject *__pyx_t_3 = NULL;
25311   PyObject *__pyx_t_4 = NULL;
25312   Py_ssize_t __pyx_t_5;
25313   PyObject *(*__pyx_t_6)(PyObject *);
25314   PyObject *__pyx_t_7 = NULL;
25315   Py_ssize_t __pyx_t_8;
25316   int __pyx_t_9;
25317   int __pyx_t_10;
25318   PyObject *__pyx_t_11 = NULL;
25319   __Pyx_RefNannySetupContext("_unellipsify", 0);
25320 
25321   /* "View.MemoryView":667
25322  *     full slices.
25323  *     """
25324  *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
25325  *         tup = (index,)
25326  *     else:
25327  */
25328   __pyx_t_1 = PyTuple_Check(__pyx_v_index);
25329   __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
25330   if (__pyx_t_2) {
25331 
25332     /* "View.MemoryView":668
25333  *     """
25334  *     if not isinstance(index, tuple):
25335  *         tup = (index,)             # <<<<<<<<<<<<<<
25336  *     else:
25337  *         tup = index
25338  */
25339     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 668, __pyx_L1_error)
25340     __Pyx_GOTREF(__pyx_t_3);
25341     __Pyx_INCREF(__pyx_v_index);
25342     __Pyx_GIVEREF(__pyx_v_index);
25343     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
25344     __pyx_v_tup = __pyx_t_3;
25345     __pyx_t_3 = 0;
25346 
25347     /* "View.MemoryView":667
25348  *     full slices.
25349  *     """
25350  *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
25351  *         tup = (index,)
25352  *     else:
25353  */
25354     goto __pyx_L3;
25355   }
25356 
25357   /* "View.MemoryView":670
25358  *         tup = (index,)
25359  *     else:
25360  *         tup = index             # <<<<<<<<<<<<<<
25361  *
25362  *     result = []
25363  */
25364   /*else*/ {
25365     __Pyx_INCREF(__pyx_v_index);
25366     __pyx_v_tup = __pyx_v_index;
25367   }
25368   __pyx_L3:;
25369 
25370   /* "View.MemoryView":672
25371  *         tup = index
25372  *
25373  *     result = []             # <<<<<<<<<<<<<<
25374  *     have_slices = False
25375  *     seen_ellipsis = False
25376  */
25377   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 672, __pyx_L1_error)
25378   __Pyx_GOTREF(__pyx_t_3);
25379   __pyx_v_result = ((PyObject*)__pyx_t_3);
25380   __pyx_t_3 = 0;
25381 
25382   /* "View.MemoryView":673
25383  *
25384  *     result = []
25385  *     have_slices = False             # <<<<<<<<<<<<<<
25386  *     seen_ellipsis = False
25387  *     for idx, item in enumerate(tup):
25388  */
25389   __pyx_v_have_slices = 0;
25390 
25391   /* "View.MemoryView":674
25392  *     result = []
25393  *     have_slices = False
25394  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
25395  *     for idx, item in enumerate(tup):
25396  *         if item is Ellipsis:
25397  */
25398   __pyx_v_seen_ellipsis = 0;
25399 
25400   /* "View.MemoryView":675
25401  *     have_slices = False
25402  *     seen_ellipsis = False
25403  *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
25404  *         if item is Ellipsis:
25405  *             if not seen_ellipsis:
25406  */
25407   __Pyx_INCREF(__pyx_int_0);
25408   __pyx_t_3 = __pyx_int_0;
25409   if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
25410     __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
25411     __pyx_t_6 = NULL;
25412   } else {
25413     __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 675, __pyx_L1_error)
25414     __Pyx_GOTREF(__pyx_t_4);
25415     __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 675, __pyx_L1_error)
25416   }
25417   for (;;) {
25418     if (likely(!__pyx_t_6)) {
25419       if (likely(PyList_CheckExact(__pyx_t_4))) {
25420         if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
25421         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25422         __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(2, 675, __pyx_L1_error)
25423         #else
25424         __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 675, __pyx_L1_error)
25425         __Pyx_GOTREF(__pyx_t_7);
25426         #endif
25427       } else {
25428         if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
25429         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25430         __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(2, 675, __pyx_L1_error)
25431         #else
25432         __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 675, __pyx_L1_error)
25433         __Pyx_GOTREF(__pyx_t_7);
25434         #endif
25435       }
25436     } else {
25437       __pyx_t_7 = __pyx_t_6(__pyx_t_4);
25438       if (unlikely(!__pyx_t_7)) {
25439         PyObject* exc_type = PyErr_Occurred();
25440         if (exc_type) {
25441           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
25442           else __PYX_ERR(2, 675, __pyx_L1_error)
25443         }
25444         break;
25445       }
25446       __Pyx_GOTREF(__pyx_t_7);
25447     }
25448     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
25449     __pyx_t_7 = 0;
25450     __Pyx_INCREF(__pyx_t_3);
25451     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
25452     __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 675, __pyx_L1_error)
25453     __Pyx_GOTREF(__pyx_t_7);
25454     __Pyx_DECREF(__pyx_t_3);
25455     __pyx_t_3 = __pyx_t_7;
25456     __pyx_t_7 = 0;
25457 
25458     /* "View.MemoryView":676
25459  *     seen_ellipsis = False
25460  *     for idx, item in enumerate(tup):
25461  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
25462  *             if not seen_ellipsis:
25463  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
25464  */
25465     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
25466     __pyx_t_1 = (__pyx_t_2 != 0);
25467     if (__pyx_t_1) {
25468 
25469       /* "View.MemoryView":677
25470  *     for idx, item in enumerate(tup):
25471  *         if item is Ellipsis:
25472  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
25473  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
25474  *                 seen_ellipsis = True
25475  */
25476       __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
25477       if (__pyx_t_1) {
25478 
25479         /* "View.MemoryView":678
25480  *         if item is Ellipsis:
25481  *             if not seen_ellipsis:
25482  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
25483  *                 seen_ellipsis = True
25484  *             else:
25485  */
25486         __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(2, 678, __pyx_L1_error)
25487         __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(2, 678, __pyx_L1_error)
25488         __Pyx_GOTREF(__pyx_t_7);
25489         { Py_ssize_t __pyx_temp;
25490           for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
25491             __Pyx_INCREF(__pyx_slice__45);
25492             __Pyx_GIVEREF(__pyx_slice__45);
25493             PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__45);
25494           }
25495         }
25496         __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 678, __pyx_L1_error)
25497         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25498 
25499         /* "View.MemoryView":679
25500  *             if not seen_ellipsis:
25501  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
25502  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
25503  *             else:
25504  *                 result.append(slice(None))
25505  */
25506         __pyx_v_seen_ellipsis = 1;
25507 
25508         /* "View.MemoryView":677
25509  *     for idx, item in enumerate(tup):
25510  *         if item is Ellipsis:
25511  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
25512  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
25513  *                 seen_ellipsis = True
25514  */
25515         goto __pyx_L7;
25516       }
25517 
25518       /* "View.MemoryView":681
25519  *                 seen_ellipsis = True
25520  *             else:
25521  *                 result.append(slice(None))             # <<<<<<<<<<<<<<
25522  *             have_slices = True
25523  *         else:
25524  */
25525       /*else*/ {
25526         __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__45); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 681, __pyx_L1_error)
25527       }
25528       __pyx_L7:;
25529 
25530       /* "View.MemoryView":682
25531  *             else:
25532  *                 result.append(slice(None))
25533  *             have_slices = True             # <<<<<<<<<<<<<<
25534  *         else:
25535  *             if not isinstance(item, slice) and not PyIndex_Check(item):
25536  */
25537       __pyx_v_have_slices = 1;
25538 
25539       /* "View.MemoryView":676
25540  *     seen_ellipsis = False
25541  *     for idx, item in enumerate(tup):
25542  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
25543  *             if not seen_ellipsis:
25544  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
25545  */
25546       goto __pyx_L6;
25547     }
25548 
25549     /* "View.MemoryView":684
25550  *             have_slices = True
25551  *         else:
25552  *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
25553  *                 raise TypeError("Cannot index with type '%s'" % type(item))
25554  *
25555  */
25556     /*else*/ {
25557       __pyx_t_2 = PySlice_Check(__pyx_v_item);
25558       __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
25559       if (__pyx_t_10) {
25560       } else {
25561         __pyx_t_1 = __pyx_t_10;
25562         goto __pyx_L9_bool_binop_done;
25563       }
25564       __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
25565       __pyx_t_1 = __pyx_t_10;
25566       __pyx_L9_bool_binop_done:;
25567       if (unlikely(__pyx_t_1)) {
25568 
25569         /* "View.MemoryView":685
25570  *         else:
25571  *             if not isinstance(item, slice) and not PyIndex_Check(item):
25572  *                 raise TypeError("Cannot index with type '%s'" % type(item))             # <<<<<<<<<<<<<<
25573  *
25574  *             have_slices = have_slices or isinstance(item, slice)
25575  */
25576         __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(2, 685, __pyx_L1_error)
25577         __Pyx_GOTREF(__pyx_t_7);
25578         __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 685, __pyx_L1_error)
25579         __Pyx_GOTREF(__pyx_t_11);
25580         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25581         __Pyx_Raise(__pyx_t_11, 0, 0, 0);
25582         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
25583         __PYX_ERR(2, 685, __pyx_L1_error)
25584 
25585         /* "View.MemoryView":684
25586  *             have_slices = True
25587  *         else:
25588  *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
25589  *                 raise TypeError("Cannot index with type '%s'" % type(item))
25590  *
25591  */
25592       }
25593 
25594       /* "View.MemoryView":687
25595  *                 raise TypeError("Cannot index with type '%s'" % type(item))
25596  *
25597  *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<
25598  *             result.append(item)
25599  *
25600  */
25601       __pyx_t_10 = (__pyx_v_have_slices != 0);
25602       if (!__pyx_t_10) {
25603       } else {
25604         __pyx_t_1 = __pyx_t_10;
25605         goto __pyx_L11_bool_binop_done;
25606       }
25607       __pyx_t_10 = PySlice_Check(__pyx_v_item);
25608       __pyx_t_2 = (__pyx_t_10 != 0);
25609       __pyx_t_1 = __pyx_t_2;
25610       __pyx_L11_bool_binop_done:;
25611       __pyx_v_have_slices = __pyx_t_1;
25612 
25613       /* "View.MemoryView":688
25614  *
25615  *             have_slices = have_slices or isinstance(item, slice)
25616  *             result.append(item)             # <<<<<<<<<<<<<<
25617  *
25618  *     nslices = ndim - len(result)
25619  */
25620       __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 688, __pyx_L1_error)
25621     }
25622     __pyx_L6:;
25623 
25624     /* "View.MemoryView":675
25625  *     have_slices = False
25626  *     seen_ellipsis = False
25627  *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
25628  *         if item is Ellipsis:
25629  *             if not seen_ellipsis:
25630  */
25631   }
25632   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25633   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25634 
25635   /* "View.MemoryView":690
25636  *             result.append(item)
25637  *
25638  *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<
25639  *     if nslices:
25640  *         result.extend([slice(None)] * nslices)
25641  */
25642   __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(2, 690, __pyx_L1_error)
25643   __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
25644 
25645   /* "View.MemoryView":691
25646  *
25647  *     nslices = ndim - len(result)
25648  *     if nslices:             # <<<<<<<<<<<<<<
25649  *         result.extend([slice(None)] * nslices)
25650  *
25651  */
25652   __pyx_t_1 = (__pyx_v_nslices != 0);
25653   if (__pyx_t_1) {
25654 
25655     /* "View.MemoryView":692
25656  *     nslices = ndim - len(result)
25657  *     if nslices:
25658  *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<
25659  *
25660  *     return have_slices or nslices, tuple(result)
25661  */
25662     __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 692, __pyx_L1_error)
25663     __Pyx_GOTREF(__pyx_t_3);
25664     { Py_ssize_t __pyx_temp;
25665       for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
25666         __Pyx_INCREF(__pyx_slice__45);
25667         __Pyx_GIVEREF(__pyx_slice__45);
25668         PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__45);
25669       }
25670     }
25671     __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 692, __pyx_L1_error)
25672     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25673 
25674     /* "View.MemoryView":691
25675  *
25676  *     nslices = ndim - len(result)
25677  *     if nslices:             # <<<<<<<<<<<<<<
25678  *         result.extend([slice(None)] * nslices)
25679  *
25680  */
25681   }
25682 
25683   /* "View.MemoryView":694
25684  *         result.extend([slice(None)] * nslices)
25685  *
25686  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
25687  *
25688  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
25689  */
25690   __Pyx_XDECREF(__pyx_r);
25691   if (!__pyx_v_have_slices) {
25692   } else {
25693     __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 694, __pyx_L1_error)
25694     __Pyx_GOTREF(__pyx_t_4);
25695     __pyx_t_3 = __pyx_t_4;
25696     __pyx_t_4 = 0;
25697     goto __pyx_L14_bool_binop_done;
25698   }
25699   __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 694, __pyx_L1_error)
25700   __Pyx_GOTREF(__pyx_t_4);
25701   __pyx_t_3 = __pyx_t_4;
25702   __pyx_t_4 = 0;
25703   __pyx_L14_bool_binop_done:;
25704   __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 694, __pyx_L1_error)
25705   __Pyx_GOTREF(__pyx_t_4);
25706   __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 694, __pyx_L1_error)
25707   __Pyx_GOTREF(__pyx_t_11);
25708   __Pyx_GIVEREF(__pyx_t_3);
25709   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
25710   __Pyx_GIVEREF(__pyx_t_4);
25711   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
25712   __pyx_t_3 = 0;
25713   __pyx_t_4 = 0;
25714   __pyx_r = ((PyObject*)__pyx_t_11);
25715   __pyx_t_11 = 0;
25716   goto __pyx_L0;
25717 
25718   /* "View.MemoryView":662
25719  *     return isinstance(o, memoryview)
25720  *
25721  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
25722  *     """
25723  *     Replace all ellipses with full slices and fill incomplete indices with
25724  */
25725 
25726   /* function exit code */
25727   __pyx_L1_error:;
25728   __Pyx_XDECREF(__pyx_t_3);
25729   __Pyx_XDECREF(__pyx_t_4);
25730   __Pyx_XDECREF(__pyx_t_7);
25731   __Pyx_XDECREF(__pyx_t_11);
25732   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
25733   __pyx_r = 0;
25734   __pyx_L0:;
25735   __Pyx_XDECREF(__pyx_v_tup);
25736   __Pyx_XDECREF(__pyx_v_result);
25737   __Pyx_XDECREF(__pyx_v_idx);
25738   __Pyx_XDECREF(__pyx_v_item);
25739   __Pyx_XGIVEREF(__pyx_r);
25740   __Pyx_RefNannyFinishContext();
25741   return __pyx_r;
25742 }
25743 
25744 /* "View.MemoryView":696
25745  *     return have_slices or nslices, tuple(result)
25746  *
25747  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
25748  *     for suboffset in suboffsets[:ndim]:
25749  *         if suboffset >= 0:
25750  */
25751 
assert_direct_dimensions(Py_ssize_t * __pyx_v_suboffsets,int __pyx_v_ndim)25752 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
25753   Py_ssize_t __pyx_v_suboffset;
25754   PyObject *__pyx_r = NULL;
25755   __Pyx_RefNannyDeclarations
25756   Py_ssize_t *__pyx_t_1;
25757   Py_ssize_t *__pyx_t_2;
25758   Py_ssize_t *__pyx_t_3;
25759   int __pyx_t_4;
25760   PyObject *__pyx_t_5 = NULL;
25761   __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
25762 
25763   /* "View.MemoryView":697
25764  *
25765  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
25766  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
25767  *         if suboffset >= 0:
25768  *             raise ValueError("Indirect dimensions not supported")
25769  */
25770   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
25771   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
25772     __pyx_t_1 = __pyx_t_3;
25773     __pyx_v_suboffset = (__pyx_t_1[0]);
25774 
25775     /* "View.MemoryView":698
25776  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
25777  *     for suboffset in suboffsets[:ndim]:
25778  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
25779  *             raise ValueError("Indirect dimensions not supported")
25780  *
25781  */
25782     __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
25783     if (unlikely(__pyx_t_4)) {
25784 
25785       /* "View.MemoryView":699
25786  *     for suboffset in suboffsets[:ndim]:
25787  *         if suboffset >= 0:
25788  *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
25789  *
25790  *
25791  */
25792       __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 699, __pyx_L1_error)
25793       __Pyx_GOTREF(__pyx_t_5);
25794       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
25795       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25796       __PYX_ERR(2, 699, __pyx_L1_error)
25797 
25798       /* "View.MemoryView":698
25799  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
25800  *     for suboffset in suboffsets[:ndim]:
25801  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
25802  *             raise ValueError("Indirect dimensions not supported")
25803  *
25804  */
25805     }
25806   }
25807 
25808   /* "View.MemoryView":696
25809  *     return have_slices or nslices, tuple(result)
25810  *
25811  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
25812  *     for suboffset in suboffsets[:ndim]:
25813  *         if suboffset >= 0:
25814  */
25815 
25816   /* function exit code */
25817   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25818   goto __pyx_L0;
25819   __pyx_L1_error:;
25820   __Pyx_XDECREF(__pyx_t_5);
25821   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
25822   __pyx_r = 0;
25823   __pyx_L0:;
25824   __Pyx_XGIVEREF(__pyx_r);
25825   __Pyx_RefNannyFinishContext();
25826   return __pyx_r;
25827 }
25828 
25829 /* "View.MemoryView":706
25830  *
25831  * @cname('__pyx_memview_slice')
25832  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
25833  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
25834  *     cdef bint negative_step
25835  */
25836 
__pyx_memview_slice(struct __pyx_memoryview_obj * __pyx_v_memview,PyObject * __pyx_v_indices)25837 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
25838   int __pyx_v_new_ndim;
25839   int __pyx_v_suboffset_dim;
25840   int __pyx_v_dim;
25841   __Pyx_memviewslice __pyx_v_src;
25842   __Pyx_memviewslice __pyx_v_dst;
25843   __Pyx_memviewslice *__pyx_v_p_src;
25844   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
25845   __Pyx_memviewslice *__pyx_v_p_dst;
25846   int *__pyx_v_p_suboffset_dim;
25847   Py_ssize_t __pyx_v_start;
25848   Py_ssize_t __pyx_v_stop;
25849   Py_ssize_t __pyx_v_step;
25850   int __pyx_v_have_start;
25851   int __pyx_v_have_stop;
25852   int __pyx_v_have_step;
25853   PyObject *__pyx_v_index = NULL;
25854   struct __pyx_memoryview_obj *__pyx_r = NULL;
25855   __Pyx_RefNannyDeclarations
25856   int __pyx_t_1;
25857   int __pyx_t_2;
25858   PyObject *__pyx_t_3 = NULL;
25859   struct __pyx_memoryview_obj *__pyx_t_4;
25860   char *__pyx_t_5;
25861   int __pyx_t_6;
25862   Py_ssize_t __pyx_t_7;
25863   PyObject *(*__pyx_t_8)(PyObject *);
25864   PyObject *__pyx_t_9 = NULL;
25865   Py_ssize_t __pyx_t_10;
25866   int __pyx_t_11;
25867   Py_ssize_t __pyx_t_12;
25868   __Pyx_RefNannySetupContext("memview_slice", 0);
25869 
25870   /* "View.MemoryView":707
25871  * @cname('__pyx_memview_slice')
25872  * cdef memoryview memview_slice(memoryview memview, object indices):
25873  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
25874  *     cdef bint negative_step
25875  *     cdef __Pyx_memviewslice src, dst
25876  */
25877   __pyx_v_new_ndim = 0;
25878   __pyx_v_suboffset_dim = -1;
25879 
25880   /* "View.MemoryView":714
25881  *
25882  *
25883  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
25884  *
25885  *     cdef _memoryviewslice memviewsliceobj
25886  */
25887   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
25888 
25889   /* "View.MemoryView":718
25890  *     cdef _memoryviewslice memviewsliceobj
25891  *
25892  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
25893  *
25894  *     if isinstance(memview, _memoryviewslice):
25895  */
25896   #ifndef CYTHON_WITHOUT_ASSERTIONS
25897   if (unlikely(!Py_OptimizeFlag)) {
25898     if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
25899       PyErr_SetNone(PyExc_AssertionError);
25900       __PYX_ERR(2, 718, __pyx_L1_error)
25901     }
25902   }
25903   #endif
25904 
25905   /* "View.MemoryView":720
25906  *     assert memview.view.ndim > 0
25907  *
25908  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
25909  *         memviewsliceobj = memview
25910  *         p_src = &memviewsliceobj.from_slice
25911  */
25912   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
25913   __pyx_t_2 = (__pyx_t_1 != 0);
25914   if (__pyx_t_2) {
25915 
25916     /* "View.MemoryView":721
25917  *
25918  *     if isinstance(memview, _memoryviewslice):
25919  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
25920  *         p_src = &memviewsliceobj.from_slice
25921  *     else:
25922  */
25923     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 721, __pyx_L1_error)
25924     __pyx_t_3 = ((PyObject *)__pyx_v_memview);
25925     __Pyx_INCREF(__pyx_t_3);
25926     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
25927     __pyx_t_3 = 0;
25928 
25929     /* "View.MemoryView":722
25930  *     if isinstance(memview, _memoryviewslice):
25931  *         memviewsliceobj = memview
25932  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
25933  *     else:
25934  *         slice_copy(memview, &src)
25935  */
25936     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
25937 
25938     /* "View.MemoryView":720
25939  *     assert memview.view.ndim > 0
25940  *
25941  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
25942  *         memviewsliceobj = memview
25943  *         p_src = &memviewsliceobj.from_slice
25944  */
25945     goto __pyx_L3;
25946   }
25947 
25948   /* "View.MemoryView":724
25949  *         p_src = &memviewsliceobj.from_slice
25950  *     else:
25951  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
25952  *         p_src = &src
25953  *
25954  */
25955   /*else*/ {
25956     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
25957 
25958     /* "View.MemoryView":725
25959  *     else:
25960  *         slice_copy(memview, &src)
25961  *         p_src = &src             # <<<<<<<<<<<<<<
25962  *
25963  *
25964  */
25965     __pyx_v_p_src = (&__pyx_v_src);
25966   }
25967   __pyx_L3:;
25968 
25969   /* "View.MemoryView":731
25970  *
25971  *
25972  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
25973  *     dst.data = p_src.data
25974  *
25975  */
25976   __pyx_t_4 = __pyx_v_p_src->memview;
25977   __pyx_v_dst.memview = __pyx_t_4;
25978 
25979   /* "View.MemoryView":732
25980  *
25981  *     dst.memview = p_src.memview
25982  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
25983  *
25984  *
25985  */
25986   __pyx_t_5 = __pyx_v_p_src->data;
25987   __pyx_v_dst.data = __pyx_t_5;
25988 
25989   /* "View.MemoryView":737
25990  *
25991  *
25992  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
25993  *     cdef int *p_suboffset_dim = &suboffset_dim
25994  *     cdef Py_ssize_t start, stop, step
25995  */
25996   __pyx_v_p_dst = (&__pyx_v_dst);
25997 
25998   /* "View.MemoryView":738
25999  *
26000  *     cdef __Pyx_memviewslice *p_dst = &dst
26001  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
26002  *     cdef Py_ssize_t start, stop, step
26003  *     cdef bint have_start, have_stop, have_step
26004  */
26005   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
26006 
26007   /* "View.MemoryView":742
26008  *     cdef bint have_start, have_stop, have_step
26009  *
26010  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
26011  *         if PyIndex_Check(index):
26012  *             slice_memviewslice(
26013  */
26014   __pyx_t_6 = 0;
26015   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
26016     __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
26017     __pyx_t_8 = NULL;
26018   } else {
26019     __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 742, __pyx_L1_error)
26020     __Pyx_GOTREF(__pyx_t_3);
26021     __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 742, __pyx_L1_error)
26022   }
26023   for (;;) {
26024     if (likely(!__pyx_t_8)) {
26025       if (likely(PyList_CheckExact(__pyx_t_3))) {
26026         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
26027         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26028         __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(2, 742, __pyx_L1_error)
26029         #else
26030         __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 742, __pyx_L1_error)
26031         __Pyx_GOTREF(__pyx_t_9);
26032         #endif
26033       } else {
26034         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
26035         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26036         __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(2, 742, __pyx_L1_error)
26037         #else
26038         __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 742, __pyx_L1_error)
26039         __Pyx_GOTREF(__pyx_t_9);
26040         #endif
26041       }
26042     } else {
26043       __pyx_t_9 = __pyx_t_8(__pyx_t_3);
26044       if (unlikely(!__pyx_t_9)) {
26045         PyObject* exc_type = PyErr_Occurred();
26046         if (exc_type) {
26047           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
26048           else __PYX_ERR(2, 742, __pyx_L1_error)
26049         }
26050         break;
26051       }
26052       __Pyx_GOTREF(__pyx_t_9);
26053     }
26054     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
26055     __pyx_t_9 = 0;
26056     __pyx_v_dim = __pyx_t_6;
26057     __pyx_t_6 = (__pyx_t_6 + 1);
26058 
26059     /* "View.MemoryView":743
26060  *
26061  *     for dim, index in enumerate(indices):
26062  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
26063  *             slice_memviewslice(
26064  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
26065  */
26066     __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
26067     if (__pyx_t_2) {
26068 
26069       /* "View.MemoryView":747
26070  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
26071  *                 dim, new_ndim, p_suboffset_dim,
26072  *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<
26073  *                 0, 0, 0, # have_{start,stop,step}
26074  *                 False)
26075  */
26076       __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 747, __pyx_L1_error)
26077 
26078       /* "View.MemoryView":744
26079  *     for dim, index in enumerate(indices):
26080  *         if PyIndex_Check(index):
26081  *             slice_memviewslice(             # <<<<<<<<<<<<<<
26082  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
26083  *                 dim, new_ndim, p_suboffset_dim,
26084  */
26085       __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(2, 744, __pyx_L1_error)
26086 
26087       /* "View.MemoryView":743
26088  *
26089  *     for dim, index in enumerate(indices):
26090  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
26091  *             slice_memviewslice(
26092  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
26093  */
26094       goto __pyx_L6;
26095     }
26096 
26097     /* "View.MemoryView":750
26098  *                 0, 0, 0, # have_{start,stop,step}
26099  *                 False)
26100  *         elif index is None:             # <<<<<<<<<<<<<<
26101  *             p_dst.shape[new_ndim] = 1
26102  *             p_dst.strides[new_ndim] = 0
26103  */
26104     __pyx_t_2 = (__pyx_v_index == Py_None);
26105     __pyx_t_1 = (__pyx_t_2 != 0);
26106     if (__pyx_t_1) {
26107 
26108       /* "View.MemoryView":751
26109  *                 False)
26110  *         elif index is None:
26111  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
26112  *             p_dst.strides[new_ndim] = 0
26113  *             p_dst.suboffsets[new_ndim] = -1
26114  */
26115       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
26116 
26117       /* "View.MemoryView":752
26118  *         elif index is None:
26119  *             p_dst.shape[new_ndim] = 1
26120  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
26121  *             p_dst.suboffsets[new_ndim] = -1
26122  *             new_ndim += 1
26123  */
26124       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
26125 
26126       /* "View.MemoryView":753
26127  *             p_dst.shape[new_ndim] = 1
26128  *             p_dst.strides[new_ndim] = 0
26129  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
26130  *             new_ndim += 1
26131  *         else:
26132  */
26133       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
26134 
26135       /* "View.MemoryView":754
26136  *             p_dst.strides[new_ndim] = 0
26137  *             p_dst.suboffsets[new_ndim] = -1
26138  *             new_ndim += 1             # <<<<<<<<<<<<<<
26139  *         else:
26140  *             start = index.start or 0
26141  */
26142       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
26143 
26144       /* "View.MemoryView":750
26145  *                 0, 0, 0, # have_{start,stop,step}
26146  *                 False)
26147  *         elif index is None:             # <<<<<<<<<<<<<<
26148  *             p_dst.shape[new_ndim] = 1
26149  *             p_dst.strides[new_ndim] = 0
26150  */
26151       goto __pyx_L6;
26152     }
26153 
26154     /* "View.MemoryView":756
26155  *             new_ndim += 1
26156  *         else:
26157  *             start = index.start or 0             # <<<<<<<<<<<<<<
26158  *             stop = index.stop or 0
26159  *             step = index.step or 0
26160  */
26161     /*else*/ {
26162       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 756, __pyx_L1_error)
26163       __Pyx_GOTREF(__pyx_t_9);
26164       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 756, __pyx_L1_error)
26165       if (!__pyx_t_1) {
26166         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26167       } else {
26168         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 756, __pyx_L1_error)
26169         __pyx_t_10 = __pyx_t_12;
26170         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26171         goto __pyx_L7_bool_binop_done;
26172       }
26173       __pyx_t_10 = 0;
26174       __pyx_L7_bool_binop_done:;
26175       __pyx_v_start = __pyx_t_10;
26176 
26177       /* "View.MemoryView":757
26178  *         else:
26179  *             start = index.start or 0
26180  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
26181  *             step = index.step or 0
26182  *
26183  */
26184       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 757, __pyx_L1_error)
26185       __Pyx_GOTREF(__pyx_t_9);
26186       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 757, __pyx_L1_error)
26187       if (!__pyx_t_1) {
26188         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26189       } else {
26190         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 757, __pyx_L1_error)
26191         __pyx_t_10 = __pyx_t_12;
26192         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26193         goto __pyx_L9_bool_binop_done;
26194       }
26195       __pyx_t_10 = 0;
26196       __pyx_L9_bool_binop_done:;
26197       __pyx_v_stop = __pyx_t_10;
26198 
26199       /* "View.MemoryView":758
26200  *             start = index.start or 0
26201  *             stop = index.stop or 0
26202  *             step = index.step or 0             # <<<<<<<<<<<<<<
26203  *
26204  *             have_start = index.start is not None
26205  */
26206       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 758, __pyx_L1_error)
26207       __Pyx_GOTREF(__pyx_t_9);
26208       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 758, __pyx_L1_error)
26209       if (!__pyx_t_1) {
26210         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26211       } else {
26212         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 758, __pyx_L1_error)
26213         __pyx_t_10 = __pyx_t_12;
26214         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26215         goto __pyx_L11_bool_binop_done;
26216       }
26217       __pyx_t_10 = 0;
26218       __pyx_L11_bool_binop_done:;
26219       __pyx_v_step = __pyx_t_10;
26220 
26221       /* "View.MemoryView":760
26222  *             step = index.step or 0
26223  *
26224  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
26225  *             have_stop = index.stop is not None
26226  *             have_step = index.step is not None
26227  */
26228       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 760, __pyx_L1_error)
26229       __Pyx_GOTREF(__pyx_t_9);
26230       __pyx_t_1 = (__pyx_t_9 != Py_None);
26231       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26232       __pyx_v_have_start = __pyx_t_1;
26233 
26234       /* "View.MemoryView":761
26235  *
26236  *             have_start = index.start is not None
26237  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
26238  *             have_step = index.step is not None
26239  *
26240  */
26241       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 761, __pyx_L1_error)
26242       __Pyx_GOTREF(__pyx_t_9);
26243       __pyx_t_1 = (__pyx_t_9 != Py_None);
26244       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26245       __pyx_v_have_stop = __pyx_t_1;
26246 
26247       /* "View.MemoryView":762
26248  *             have_start = index.start is not None
26249  *             have_stop = index.stop is not None
26250  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
26251  *
26252  *             slice_memviewslice(
26253  */
26254       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 762, __pyx_L1_error)
26255       __Pyx_GOTREF(__pyx_t_9);
26256       __pyx_t_1 = (__pyx_t_9 != Py_None);
26257       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
26258       __pyx_v_have_step = __pyx_t_1;
26259 
26260       /* "View.MemoryView":764
26261  *             have_step = index.step is not None
26262  *
26263  *             slice_memviewslice(             # <<<<<<<<<<<<<<
26264  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
26265  *                 dim, new_ndim, p_suboffset_dim,
26266  */
26267       __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(2, 764, __pyx_L1_error)
26268 
26269       /* "View.MemoryView":770
26270  *                 have_start, have_stop, have_step,
26271  *                 True)
26272  *             new_ndim += 1             # <<<<<<<<<<<<<<
26273  *
26274  *     if isinstance(memview, _memoryviewslice):
26275  */
26276       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
26277     }
26278     __pyx_L6:;
26279 
26280     /* "View.MemoryView":742
26281  *     cdef bint have_start, have_stop, have_step
26282  *
26283  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
26284  *         if PyIndex_Check(index):
26285  *             slice_memviewslice(
26286  */
26287   }
26288   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26289 
26290   /* "View.MemoryView":772
26291  *             new_ndim += 1
26292  *
26293  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
26294  *         return memoryview_fromslice(dst, new_ndim,
26295  *                                     memviewsliceobj.to_object_func,
26296  */
26297   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
26298   __pyx_t_2 = (__pyx_t_1 != 0);
26299   if (__pyx_t_2) {
26300 
26301     /* "View.MemoryView":773
26302  *
26303  *     if isinstance(memview, _memoryviewslice):
26304  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
26305  *                                     memviewsliceobj.to_object_func,
26306  *                                     memviewsliceobj.to_dtype_func,
26307  */
26308     __Pyx_XDECREF(((PyObject *)__pyx_r));
26309 
26310     /* "View.MemoryView":774
26311  *     if isinstance(memview, _memoryviewslice):
26312  *         return memoryview_fromslice(dst, new_ndim,
26313  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
26314  *                                     memviewsliceobj.to_dtype_func,
26315  *                                     memview.dtype_is_object)
26316  */
26317     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 774, __pyx_L1_error) }
26318 
26319     /* "View.MemoryView":775
26320  *         return memoryview_fromslice(dst, new_ndim,
26321  *                                     memviewsliceobj.to_object_func,
26322  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
26323  *                                     memview.dtype_is_object)
26324  *     else:
26325  */
26326     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 775, __pyx_L1_error) }
26327 
26328     /* "View.MemoryView":773
26329  *
26330  *     if isinstance(memview, _memoryviewslice):
26331  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
26332  *                                     memviewsliceobj.to_object_func,
26333  *                                     memviewsliceobj.to_dtype_func,
26334  */
26335     __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(2, 773, __pyx_L1_error)
26336     __Pyx_GOTREF(__pyx_t_3);
26337     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 773, __pyx_L1_error)
26338     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
26339     __pyx_t_3 = 0;
26340     goto __pyx_L0;
26341 
26342     /* "View.MemoryView":772
26343  *             new_ndim += 1
26344  *
26345  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
26346  *         return memoryview_fromslice(dst, new_ndim,
26347  *                                     memviewsliceobj.to_object_func,
26348  */
26349   }
26350 
26351   /* "View.MemoryView":778
26352  *                                     memview.dtype_is_object)
26353  *     else:
26354  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
26355  *                                     memview.dtype_is_object)
26356  *
26357  */
26358   /*else*/ {
26359     __Pyx_XDECREF(((PyObject *)__pyx_r));
26360 
26361     /* "View.MemoryView":779
26362  *     else:
26363  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
26364  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
26365  *
26366  *
26367  */
26368     __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(2, 778, __pyx_L1_error)
26369     __Pyx_GOTREF(__pyx_t_3);
26370 
26371     /* "View.MemoryView":778
26372  *                                     memview.dtype_is_object)
26373  *     else:
26374  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
26375  *                                     memview.dtype_is_object)
26376  *
26377  */
26378     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 778, __pyx_L1_error)
26379     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
26380     __pyx_t_3 = 0;
26381     goto __pyx_L0;
26382   }
26383 
26384   /* "View.MemoryView":706
26385  *
26386  * @cname('__pyx_memview_slice')
26387  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
26388  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
26389  *     cdef bint negative_step
26390  */
26391 
26392   /* function exit code */
26393   __pyx_L1_error:;
26394   __Pyx_XDECREF(__pyx_t_3);
26395   __Pyx_XDECREF(__pyx_t_9);
26396   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
26397   __pyx_r = 0;
26398   __pyx_L0:;
26399   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
26400   __Pyx_XDECREF(__pyx_v_index);
26401   __Pyx_XGIVEREF((PyObject *)__pyx_r);
26402   __Pyx_RefNannyFinishContext();
26403   return __pyx_r;
26404 }
26405 
26406 /* "View.MemoryView":803
26407  *
26408  * @cname('__pyx_memoryview_slice_memviewslice')
26409  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
26410  *         __Pyx_memviewslice *dst,
26411  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
26412  */
26413 
__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)26414 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) {
26415   Py_ssize_t __pyx_v_new_shape;
26416   int __pyx_v_negative_step;
26417   int __pyx_r;
26418   int __pyx_t_1;
26419   int __pyx_t_2;
26420   int __pyx_t_3;
26421 
26422   /* "View.MemoryView":823
26423  *     cdef bint negative_step
26424  *
26425  *     if not is_slice:             # <<<<<<<<<<<<<<
26426  *
26427  *         if start < 0:
26428  */
26429   __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
26430   if (__pyx_t_1) {
26431 
26432     /* "View.MemoryView":825
26433  *     if not is_slice:
26434  *
26435  *         if start < 0:             # <<<<<<<<<<<<<<
26436  *             start += shape
26437  *         if not 0 <= start < shape:
26438  */
26439     __pyx_t_1 = ((__pyx_v_start < 0) != 0);
26440     if (__pyx_t_1) {
26441 
26442       /* "View.MemoryView":826
26443  *
26444  *         if start < 0:
26445  *             start += shape             # <<<<<<<<<<<<<<
26446  *         if not 0 <= start < shape:
26447  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
26448  */
26449       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
26450 
26451       /* "View.MemoryView":825
26452  *     if not is_slice:
26453  *
26454  *         if start < 0:             # <<<<<<<<<<<<<<
26455  *             start += shape
26456  *         if not 0 <= start < shape:
26457  */
26458     }
26459 
26460     /* "View.MemoryView":827
26461  *         if start < 0:
26462  *             start += shape
26463  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
26464  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
26465  *     else:
26466  */
26467     __pyx_t_1 = (0 <= __pyx_v_start);
26468     if (__pyx_t_1) {
26469       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
26470     }
26471     __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
26472     if (__pyx_t_2) {
26473 
26474       /* "View.MemoryView":828
26475  *             start += shape
26476  *         if not 0 <= start < shape:
26477  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
26478  *     else:
26479  *
26480  */
26481       __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(2, 828, __pyx_L1_error)
26482 
26483       /* "View.MemoryView":827
26484  *         if start < 0:
26485  *             start += shape
26486  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
26487  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
26488  *     else:
26489  */
26490     }
26491 
26492     /* "View.MemoryView":823
26493  *     cdef bint negative_step
26494  *
26495  *     if not is_slice:             # <<<<<<<<<<<<<<
26496  *
26497  *         if start < 0:
26498  */
26499     goto __pyx_L3;
26500   }
26501 
26502   /* "View.MemoryView":831
26503  *     else:
26504  *
26505  *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<
26506  *
26507  *         if have_step and step == 0:
26508  */
26509   /*else*/ {
26510     __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
26511     if (__pyx_t_1) {
26512     } else {
26513       __pyx_t_2 = __pyx_t_1;
26514       goto __pyx_L6_bool_binop_done;
26515     }
26516     __pyx_t_1 = ((__pyx_v_step < 0) != 0);
26517     __pyx_t_2 = __pyx_t_1;
26518     __pyx_L6_bool_binop_done:;
26519     __pyx_v_negative_step = __pyx_t_2;
26520 
26521     /* "View.MemoryView":833
26522  *         negative_step = have_step != 0 and step < 0
26523  *
26524  *         if have_step and step == 0:             # <<<<<<<<<<<<<<
26525  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
26526  *
26527  */
26528     __pyx_t_1 = (__pyx_v_have_step != 0);
26529     if (__pyx_t_1) {
26530     } else {
26531       __pyx_t_2 = __pyx_t_1;
26532       goto __pyx_L9_bool_binop_done;
26533     }
26534     __pyx_t_1 = ((__pyx_v_step == 0) != 0);
26535     __pyx_t_2 = __pyx_t_1;
26536     __pyx_L9_bool_binop_done:;
26537     if (__pyx_t_2) {
26538 
26539       /* "View.MemoryView":834
26540  *
26541  *         if have_step and step == 0:
26542  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
26543  *
26544  *
26545  */
26546       __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(2, 834, __pyx_L1_error)
26547 
26548       /* "View.MemoryView":833
26549  *         negative_step = have_step != 0 and step < 0
26550  *
26551  *         if have_step and step == 0:             # <<<<<<<<<<<<<<
26552  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
26553  *
26554  */
26555     }
26556 
26557     /* "View.MemoryView":837
26558  *
26559  *
26560  *         if have_start:             # <<<<<<<<<<<<<<
26561  *             if start < 0:
26562  *                 start += shape
26563  */
26564     __pyx_t_2 = (__pyx_v_have_start != 0);
26565     if (__pyx_t_2) {
26566 
26567       /* "View.MemoryView":838
26568  *
26569  *         if have_start:
26570  *             if start < 0:             # <<<<<<<<<<<<<<
26571  *                 start += shape
26572  *                 if start < 0:
26573  */
26574       __pyx_t_2 = ((__pyx_v_start < 0) != 0);
26575       if (__pyx_t_2) {
26576 
26577         /* "View.MemoryView":839
26578  *         if have_start:
26579  *             if start < 0:
26580  *                 start += shape             # <<<<<<<<<<<<<<
26581  *                 if start < 0:
26582  *                     start = 0
26583  */
26584         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
26585 
26586         /* "View.MemoryView":840
26587  *             if start < 0:
26588  *                 start += shape
26589  *                 if start < 0:             # <<<<<<<<<<<<<<
26590  *                     start = 0
26591  *             elif start >= shape:
26592  */
26593         __pyx_t_2 = ((__pyx_v_start < 0) != 0);
26594         if (__pyx_t_2) {
26595 
26596           /* "View.MemoryView":841
26597  *                 start += shape
26598  *                 if start < 0:
26599  *                     start = 0             # <<<<<<<<<<<<<<
26600  *             elif start >= shape:
26601  *                 if negative_step:
26602  */
26603           __pyx_v_start = 0;
26604 
26605           /* "View.MemoryView":840
26606  *             if start < 0:
26607  *                 start += shape
26608  *                 if start < 0:             # <<<<<<<<<<<<<<
26609  *                     start = 0
26610  *             elif start >= shape:
26611  */
26612         }
26613 
26614         /* "View.MemoryView":838
26615  *
26616  *         if have_start:
26617  *             if start < 0:             # <<<<<<<<<<<<<<
26618  *                 start += shape
26619  *                 if start < 0:
26620  */
26621         goto __pyx_L12;
26622       }
26623 
26624       /* "View.MemoryView":842
26625  *                 if start < 0:
26626  *                     start = 0
26627  *             elif start >= shape:             # <<<<<<<<<<<<<<
26628  *                 if negative_step:
26629  *                     start = shape - 1
26630  */
26631       __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
26632       if (__pyx_t_2) {
26633 
26634         /* "View.MemoryView":843
26635  *                     start = 0
26636  *             elif start >= shape:
26637  *                 if negative_step:             # <<<<<<<<<<<<<<
26638  *                     start = shape - 1
26639  *                 else:
26640  */
26641         __pyx_t_2 = (__pyx_v_negative_step != 0);
26642         if (__pyx_t_2) {
26643 
26644           /* "View.MemoryView":844
26645  *             elif start >= shape:
26646  *                 if negative_step:
26647  *                     start = shape - 1             # <<<<<<<<<<<<<<
26648  *                 else:
26649  *                     start = shape
26650  */
26651           __pyx_v_start = (__pyx_v_shape - 1);
26652 
26653           /* "View.MemoryView":843
26654  *                     start = 0
26655  *             elif start >= shape:
26656  *                 if negative_step:             # <<<<<<<<<<<<<<
26657  *                     start = shape - 1
26658  *                 else:
26659  */
26660           goto __pyx_L14;
26661         }
26662 
26663         /* "View.MemoryView":846
26664  *                     start = shape - 1
26665  *                 else:
26666  *                     start = shape             # <<<<<<<<<<<<<<
26667  *         else:
26668  *             if negative_step:
26669  */
26670         /*else*/ {
26671           __pyx_v_start = __pyx_v_shape;
26672         }
26673         __pyx_L14:;
26674 
26675         /* "View.MemoryView":842
26676  *                 if start < 0:
26677  *                     start = 0
26678  *             elif start >= shape:             # <<<<<<<<<<<<<<
26679  *                 if negative_step:
26680  *                     start = shape - 1
26681  */
26682       }
26683       __pyx_L12:;
26684 
26685       /* "View.MemoryView":837
26686  *
26687  *
26688  *         if have_start:             # <<<<<<<<<<<<<<
26689  *             if start < 0:
26690  *                 start += shape
26691  */
26692       goto __pyx_L11;
26693     }
26694 
26695     /* "View.MemoryView":848
26696  *                     start = shape
26697  *         else:
26698  *             if negative_step:             # <<<<<<<<<<<<<<
26699  *                 start = shape - 1
26700  *             else:
26701  */
26702     /*else*/ {
26703       __pyx_t_2 = (__pyx_v_negative_step != 0);
26704       if (__pyx_t_2) {
26705 
26706         /* "View.MemoryView":849
26707  *         else:
26708  *             if negative_step:
26709  *                 start = shape - 1             # <<<<<<<<<<<<<<
26710  *             else:
26711  *                 start = 0
26712  */
26713         __pyx_v_start = (__pyx_v_shape - 1);
26714 
26715         /* "View.MemoryView":848
26716  *                     start = shape
26717  *         else:
26718  *             if negative_step:             # <<<<<<<<<<<<<<
26719  *                 start = shape - 1
26720  *             else:
26721  */
26722         goto __pyx_L15;
26723       }
26724 
26725       /* "View.MemoryView":851
26726  *                 start = shape - 1
26727  *             else:
26728  *                 start = 0             # <<<<<<<<<<<<<<
26729  *
26730  *         if have_stop:
26731  */
26732       /*else*/ {
26733         __pyx_v_start = 0;
26734       }
26735       __pyx_L15:;
26736     }
26737     __pyx_L11:;
26738 
26739     /* "View.MemoryView":853
26740  *                 start = 0
26741  *
26742  *         if have_stop:             # <<<<<<<<<<<<<<
26743  *             if stop < 0:
26744  *                 stop += shape
26745  */
26746     __pyx_t_2 = (__pyx_v_have_stop != 0);
26747     if (__pyx_t_2) {
26748 
26749       /* "View.MemoryView":854
26750  *
26751  *         if have_stop:
26752  *             if stop < 0:             # <<<<<<<<<<<<<<
26753  *                 stop += shape
26754  *                 if stop < 0:
26755  */
26756       __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
26757       if (__pyx_t_2) {
26758 
26759         /* "View.MemoryView":855
26760  *         if have_stop:
26761  *             if stop < 0:
26762  *                 stop += shape             # <<<<<<<<<<<<<<
26763  *                 if stop < 0:
26764  *                     stop = 0
26765  */
26766         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
26767 
26768         /* "View.MemoryView":856
26769  *             if stop < 0:
26770  *                 stop += shape
26771  *                 if stop < 0:             # <<<<<<<<<<<<<<
26772  *                     stop = 0
26773  *             elif stop > shape:
26774  */
26775         __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
26776         if (__pyx_t_2) {
26777 
26778           /* "View.MemoryView":857
26779  *                 stop += shape
26780  *                 if stop < 0:
26781  *                     stop = 0             # <<<<<<<<<<<<<<
26782  *             elif stop > shape:
26783  *                 stop = shape
26784  */
26785           __pyx_v_stop = 0;
26786 
26787           /* "View.MemoryView":856
26788  *             if stop < 0:
26789  *                 stop += shape
26790  *                 if stop < 0:             # <<<<<<<<<<<<<<
26791  *                     stop = 0
26792  *             elif stop > shape:
26793  */
26794         }
26795 
26796         /* "View.MemoryView":854
26797  *
26798  *         if have_stop:
26799  *             if stop < 0:             # <<<<<<<<<<<<<<
26800  *                 stop += shape
26801  *                 if stop < 0:
26802  */
26803         goto __pyx_L17;
26804       }
26805 
26806       /* "View.MemoryView":858
26807  *                 if stop < 0:
26808  *                     stop = 0
26809  *             elif stop > shape:             # <<<<<<<<<<<<<<
26810  *                 stop = shape
26811  *         else:
26812  */
26813       __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
26814       if (__pyx_t_2) {
26815 
26816         /* "View.MemoryView":859
26817  *                     stop = 0
26818  *             elif stop > shape:
26819  *                 stop = shape             # <<<<<<<<<<<<<<
26820  *         else:
26821  *             if negative_step:
26822  */
26823         __pyx_v_stop = __pyx_v_shape;
26824 
26825         /* "View.MemoryView":858
26826  *                 if stop < 0:
26827  *                     stop = 0
26828  *             elif stop > shape:             # <<<<<<<<<<<<<<
26829  *                 stop = shape
26830  *         else:
26831  */
26832       }
26833       __pyx_L17:;
26834 
26835       /* "View.MemoryView":853
26836  *                 start = 0
26837  *
26838  *         if have_stop:             # <<<<<<<<<<<<<<
26839  *             if stop < 0:
26840  *                 stop += shape
26841  */
26842       goto __pyx_L16;
26843     }
26844 
26845     /* "View.MemoryView":861
26846  *                 stop = shape
26847  *         else:
26848  *             if negative_step:             # <<<<<<<<<<<<<<
26849  *                 stop = -1
26850  *             else:
26851  */
26852     /*else*/ {
26853       __pyx_t_2 = (__pyx_v_negative_step != 0);
26854       if (__pyx_t_2) {
26855 
26856         /* "View.MemoryView":862
26857  *         else:
26858  *             if negative_step:
26859  *                 stop = -1             # <<<<<<<<<<<<<<
26860  *             else:
26861  *                 stop = shape
26862  */
26863         __pyx_v_stop = -1L;
26864 
26865         /* "View.MemoryView":861
26866  *                 stop = shape
26867  *         else:
26868  *             if negative_step:             # <<<<<<<<<<<<<<
26869  *                 stop = -1
26870  *             else:
26871  */
26872         goto __pyx_L19;
26873       }
26874 
26875       /* "View.MemoryView":864
26876  *                 stop = -1
26877  *             else:
26878  *                 stop = shape             # <<<<<<<<<<<<<<
26879  *
26880  *         if not have_step:
26881  */
26882       /*else*/ {
26883         __pyx_v_stop = __pyx_v_shape;
26884       }
26885       __pyx_L19:;
26886     }
26887     __pyx_L16:;
26888 
26889     /* "View.MemoryView":866
26890  *                 stop = shape
26891  *
26892  *         if not have_step:             # <<<<<<<<<<<<<<
26893  *             step = 1
26894  *
26895  */
26896     __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
26897     if (__pyx_t_2) {
26898 
26899       /* "View.MemoryView":867
26900  *
26901  *         if not have_step:
26902  *             step = 1             # <<<<<<<<<<<<<<
26903  *
26904  *
26905  */
26906       __pyx_v_step = 1;
26907 
26908       /* "View.MemoryView":866
26909  *                 stop = shape
26910  *
26911  *         if not have_step:             # <<<<<<<<<<<<<<
26912  *             step = 1
26913  *
26914  */
26915     }
26916 
26917     /* "View.MemoryView":871
26918  *
26919  *         with cython.cdivision(True):
26920  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
26921  *
26922  *             if (stop - start) - step * new_shape:
26923  */
26924     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
26925 
26926     /* "View.MemoryView":873
26927  *             new_shape = (stop - start) // step
26928  *
26929  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
26930  *                 new_shape += 1
26931  *
26932  */
26933     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
26934     if (__pyx_t_2) {
26935 
26936       /* "View.MemoryView":874
26937  *
26938  *             if (stop - start) - step * new_shape:
26939  *                 new_shape += 1             # <<<<<<<<<<<<<<
26940  *
26941  *         if new_shape < 0:
26942  */
26943       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
26944 
26945       /* "View.MemoryView":873
26946  *             new_shape = (stop - start) // step
26947  *
26948  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
26949  *                 new_shape += 1
26950  *
26951  */
26952     }
26953 
26954     /* "View.MemoryView":876
26955  *                 new_shape += 1
26956  *
26957  *         if new_shape < 0:             # <<<<<<<<<<<<<<
26958  *             new_shape = 0
26959  *
26960  */
26961     __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
26962     if (__pyx_t_2) {
26963 
26964       /* "View.MemoryView":877
26965  *
26966  *         if new_shape < 0:
26967  *             new_shape = 0             # <<<<<<<<<<<<<<
26968  *
26969  *
26970  */
26971       __pyx_v_new_shape = 0;
26972 
26973       /* "View.MemoryView":876
26974  *                 new_shape += 1
26975  *
26976  *         if new_shape < 0:             # <<<<<<<<<<<<<<
26977  *             new_shape = 0
26978  *
26979  */
26980     }
26981 
26982     /* "View.MemoryView":880
26983  *
26984  *
26985  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
26986  *         dst.shape[new_ndim] = new_shape
26987  *         dst.suboffsets[new_ndim] = suboffset
26988  */
26989     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
26990 
26991     /* "View.MemoryView":881
26992  *
26993  *         dst.strides[new_ndim] = stride * step
26994  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
26995  *         dst.suboffsets[new_ndim] = suboffset
26996  *
26997  */
26998     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
26999 
27000     /* "View.MemoryView":882
27001  *         dst.strides[new_ndim] = stride * step
27002  *         dst.shape[new_ndim] = new_shape
27003  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
27004  *
27005  *
27006  */
27007     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
27008   }
27009   __pyx_L3:;
27010 
27011   /* "View.MemoryView":885
27012  *
27013  *
27014  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
27015  *         dst.data += start * stride
27016  *     else:
27017  */
27018   __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
27019   if (__pyx_t_2) {
27020 
27021     /* "View.MemoryView":886
27022  *
27023  *     if suboffset_dim[0] < 0:
27024  *         dst.data += start * stride             # <<<<<<<<<<<<<<
27025  *     else:
27026  *         dst.suboffsets[suboffset_dim[0]] += start * stride
27027  */
27028     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
27029 
27030     /* "View.MemoryView":885
27031  *
27032  *
27033  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
27034  *         dst.data += start * stride
27035  *     else:
27036  */
27037     goto __pyx_L23;
27038   }
27039 
27040   /* "View.MemoryView":888
27041  *         dst.data += start * stride
27042  *     else:
27043  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
27044  *
27045  *     if suboffset >= 0:
27046  */
27047   /*else*/ {
27048     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
27049     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
27050   }
27051   __pyx_L23:;
27052 
27053   /* "View.MemoryView":890
27054  *         dst.suboffsets[suboffset_dim[0]] += start * stride
27055  *
27056  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
27057  *         if not is_slice:
27058  *             if new_ndim == 0:
27059  */
27060   __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
27061   if (__pyx_t_2) {
27062 
27063     /* "View.MemoryView":891
27064  *
27065  *     if suboffset >= 0:
27066  *         if not is_slice:             # <<<<<<<<<<<<<<
27067  *             if new_ndim == 0:
27068  *                 dst.data = (<char **> dst.data)[0] + suboffset
27069  */
27070     __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
27071     if (__pyx_t_2) {
27072 
27073       /* "View.MemoryView":892
27074  *     if suboffset >= 0:
27075  *         if not is_slice:
27076  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
27077  *                 dst.data = (<char **> dst.data)[0] + suboffset
27078  *             else:
27079  */
27080       __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
27081       if (__pyx_t_2) {
27082 
27083         /* "View.MemoryView":893
27084  *         if not is_slice:
27085  *             if new_ndim == 0:
27086  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
27087  *             else:
27088  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
27089  */
27090         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
27091 
27092         /* "View.MemoryView":892
27093  *     if suboffset >= 0:
27094  *         if not is_slice:
27095  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
27096  *                 dst.data = (<char **> dst.data)[0] + suboffset
27097  *             else:
27098  */
27099         goto __pyx_L26;
27100       }
27101 
27102       /* "View.MemoryView":895
27103  *                 dst.data = (<char **> dst.data)[0] + suboffset
27104  *             else:
27105  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
27106  *                                      "must be indexed and not sliced", dim)
27107  *         else:
27108  */
27109       /*else*/ {
27110 
27111         /* "View.MemoryView":896
27112  *             else:
27113  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
27114  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
27115  *         else:
27116  *             suboffset_dim[0] = new_ndim
27117  */
27118         __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(2, 895, __pyx_L1_error)
27119       }
27120       __pyx_L26:;
27121 
27122       /* "View.MemoryView":891
27123  *
27124  *     if suboffset >= 0:
27125  *         if not is_slice:             # <<<<<<<<<<<<<<
27126  *             if new_ndim == 0:
27127  *                 dst.data = (<char **> dst.data)[0] + suboffset
27128  */
27129       goto __pyx_L25;
27130     }
27131 
27132     /* "View.MemoryView":898
27133  *                                      "must be indexed and not sliced", dim)
27134  *         else:
27135  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
27136  *
27137  *     return 0
27138  */
27139     /*else*/ {
27140       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
27141     }
27142     __pyx_L25:;
27143 
27144     /* "View.MemoryView":890
27145  *         dst.suboffsets[suboffset_dim[0]] += start * stride
27146  *
27147  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
27148  *         if not is_slice:
27149  *             if new_ndim == 0:
27150  */
27151   }
27152 
27153   /* "View.MemoryView":900
27154  *             suboffset_dim[0] = new_ndim
27155  *
27156  *     return 0             # <<<<<<<<<<<<<<
27157  *
27158  *
27159  */
27160   __pyx_r = 0;
27161   goto __pyx_L0;
27162 
27163   /* "View.MemoryView":803
27164  *
27165  * @cname('__pyx_memoryview_slice_memviewslice')
27166  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
27167  *         __Pyx_memviewslice *dst,
27168  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
27169  */
27170 
27171   /* function exit code */
27172   __pyx_L1_error:;
27173   {
27174     #ifdef WITH_THREAD
27175     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
27176     #endif
27177     __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
27178     #ifdef WITH_THREAD
27179     __Pyx_PyGILState_Release(__pyx_gilstate_save);
27180     #endif
27181   }
27182   __pyx_r = -1;
27183   __pyx_L0:;
27184   return __pyx_r;
27185 }
27186 
27187 /* "View.MemoryView":906
27188  *
27189  * @cname('__pyx_pybuffer_index')
27190  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
27191  *                           Py_ssize_t dim) except NULL:
27192  *     cdef Py_ssize_t shape, stride, suboffset = -1
27193  */
27194 
__pyx_pybuffer_index(Py_buffer * __pyx_v_view,char * __pyx_v_bufp,Py_ssize_t __pyx_v_index,Py_ssize_t __pyx_v_dim)27195 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) {
27196   Py_ssize_t __pyx_v_shape;
27197   Py_ssize_t __pyx_v_stride;
27198   Py_ssize_t __pyx_v_suboffset;
27199   Py_ssize_t __pyx_v_itemsize;
27200   char *__pyx_v_resultp;
27201   char *__pyx_r;
27202   __Pyx_RefNannyDeclarations
27203   Py_ssize_t __pyx_t_1;
27204   int __pyx_t_2;
27205   PyObject *__pyx_t_3 = NULL;
27206   PyObject *__pyx_t_4 = NULL;
27207   __Pyx_RefNannySetupContext("pybuffer_index", 0);
27208 
27209   /* "View.MemoryView":908
27210  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
27211  *                           Py_ssize_t dim) except NULL:
27212  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
27213  *     cdef Py_ssize_t itemsize = view.itemsize
27214  *     cdef char *resultp
27215  */
27216   __pyx_v_suboffset = -1L;
27217 
27218   /* "View.MemoryView":909
27219  *                           Py_ssize_t dim) except NULL:
27220  *     cdef Py_ssize_t shape, stride, suboffset = -1
27221  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
27222  *     cdef char *resultp
27223  *
27224  */
27225   __pyx_t_1 = __pyx_v_view->itemsize;
27226   __pyx_v_itemsize = __pyx_t_1;
27227 
27228   /* "View.MemoryView":912
27229  *     cdef char *resultp
27230  *
27231  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
27232  *         shape = view.len / itemsize
27233  *         stride = itemsize
27234  */
27235   __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
27236   if (__pyx_t_2) {
27237 
27238     /* "View.MemoryView":913
27239  *
27240  *     if view.ndim == 0:
27241  *         shape = view.len / itemsize             # <<<<<<<<<<<<<<
27242  *         stride = itemsize
27243  *     else:
27244  */
27245     if (unlikely(__pyx_v_itemsize == 0)) {
27246       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
27247       __PYX_ERR(2, 913, __pyx_L1_error)
27248     }
27249     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))) {
27250       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
27251       __PYX_ERR(2, 913, __pyx_L1_error)
27252     }
27253     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
27254 
27255     /* "View.MemoryView":914
27256  *     if view.ndim == 0:
27257  *         shape = view.len / itemsize
27258  *         stride = itemsize             # <<<<<<<<<<<<<<
27259  *     else:
27260  *         shape = view.shape[dim]
27261  */
27262     __pyx_v_stride = __pyx_v_itemsize;
27263 
27264     /* "View.MemoryView":912
27265  *     cdef char *resultp
27266  *
27267  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
27268  *         shape = view.len / itemsize
27269  *         stride = itemsize
27270  */
27271     goto __pyx_L3;
27272   }
27273 
27274   /* "View.MemoryView":916
27275  *         stride = itemsize
27276  *     else:
27277  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
27278  *         stride = view.strides[dim]
27279  *         if view.suboffsets != NULL:
27280  */
27281   /*else*/ {
27282     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
27283 
27284     /* "View.MemoryView":917
27285  *     else:
27286  *         shape = view.shape[dim]
27287  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
27288  *         if view.suboffsets != NULL:
27289  *             suboffset = view.suboffsets[dim]
27290  */
27291     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
27292 
27293     /* "View.MemoryView":918
27294  *         shape = view.shape[dim]
27295  *         stride = view.strides[dim]
27296  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
27297  *             suboffset = view.suboffsets[dim]
27298  *
27299  */
27300     __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
27301     if (__pyx_t_2) {
27302 
27303       /* "View.MemoryView":919
27304  *         stride = view.strides[dim]
27305  *         if view.suboffsets != NULL:
27306  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
27307  *
27308  *     if index < 0:
27309  */
27310       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
27311 
27312       /* "View.MemoryView":918
27313  *         shape = view.shape[dim]
27314  *         stride = view.strides[dim]
27315  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
27316  *             suboffset = view.suboffsets[dim]
27317  *
27318  */
27319     }
27320   }
27321   __pyx_L3:;
27322 
27323   /* "View.MemoryView":921
27324  *             suboffset = view.suboffsets[dim]
27325  *
27326  *     if index < 0:             # <<<<<<<<<<<<<<
27327  *         index += view.shape[dim]
27328  *         if index < 0:
27329  */
27330   __pyx_t_2 = ((__pyx_v_index < 0) != 0);
27331   if (__pyx_t_2) {
27332 
27333     /* "View.MemoryView":922
27334  *
27335  *     if index < 0:
27336  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
27337  *         if index < 0:
27338  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27339  */
27340     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
27341 
27342     /* "View.MemoryView":923
27343  *     if index < 0:
27344  *         index += view.shape[dim]
27345  *         if index < 0:             # <<<<<<<<<<<<<<
27346  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27347  *
27348  */
27349     __pyx_t_2 = ((__pyx_v_index < 0) != 0);
27350     if (unlikely(__pyx_t_2)) {
27351 
27352       /* "View.MemoryView":924
27353  *         index += view.shape[dim]
27354  *         if index < 0:
27355  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
27356  *
27357  *     if index >= shape:
27358  */
27359       __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 924, __pyx_L1_error)
27360       __Pyx_GOTREF(__pyx_t_3);
27361       __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(2, 924, __pyx_L1_error)
27362       __Pyx_GOTREF(__pyx_t_4);
27363       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27364       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 924, __pyx_L1_error)
27365       __Pyx_GOTREF(__pyx_t_3);
27366       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27367       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27368       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27369       __PYX_ERR(2, 924, __pyx_L1_error)
27370 
27371       /* "View.MemoryView":923
27372  *     if index < 0:
27373  *         index += view.shape[dim]
27374  *         if index < 0:             # <<<<<<<<<<<<<<
27375  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27376  *
27377  */
27378     }
27379 
27380     /* "View.MemoryView":921
27381  *             suboffset = view.suboffsets[dim]
27382  *
27383  *     if index < 0:             # <<<<<<<<<<<<<<
27384  *         index += view.shape[dim]
27385  *         if index < 0:
27386  */
27387   }
27388 
27389   /* "View.MemoryView":926
27390  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27391  *
27392  *     if index >= shape:             # <<<<<<<<<<<<<<
27393  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27394  *
27395  */
27396   __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
27397   if (unlikely(__pyx_t_2)) {
27398 
27399     /* "View.MemoryView":927
27400  *
27401  *     if index >= shape:
27402  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
27403  *
27404  *     resultp = bufp + index * stride
27405  */
27406     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 927, __pyx_L1_error)
27407     __Pyx_GOTREF(__pyx_t_3);
27408     __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(2, 927, __pyx_L1_error)
27409     __Pyx_GOTREF(__pyx_t_4);
27410     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27411     __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 927, __pyx_L1_error)
27412     __Pyx_GOTREF(__pyx_t_3);
27413     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27414     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27415     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27416     __PYX_ERR(2, 927, __pyx_L1_error)
27417 
27418     /* "View.MemoryView":926
27419  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27420  *
27421  *     if index >= shape:             # <<<<<<<<<<<<<<
27422  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27423  *
27424  */
27425   }
27426 
27427   /* "View.MemoryView":929
27428  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
27429  *
27430  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
27431  *     if suboffset >= 0:
27432  *         resultp = (<char **> resultp)[0] + suboffset
27433  */
27434   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
27435 
27436   /* "View.MemoryView":930
27437  *
27438  *     resultp = bufp + index * stride
27439  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
27440  *         resultp = (<char **> resultp)[0] + suboffset
27441  *
27442  */
27443   __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
27444   if (__pyx_t_2) {
27445 
27446     /* "View.MemoryView":931
27447  *     resultp = bufp + index * stride
27448  *     if suboffset >= 0:
27449  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
27450  *
27451  *     return resultp
27452  */
27453     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
27454 
27455     /* "View.MemoryView":930
27456  *
27457  *     resultp = bufp + index * stride
27458  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
27459  *         resultp = (<char **> resultp)[0] + suboffset
27460  *
27461  */
27462   }
27463 
27464   /* "View.MemoryView":933
27465  *         resultp = (<char **> resultp)[0] + suboffset
27466  *
27467  *     return resultp             # <<<<<<<<<<<<<<
27468  *
27469  *
27470  */
27471   __pyx_r = __pyx_v_resultp;
27472   goto __pyx_L0;
27473 
27474   /* "View.MemoryView":906
27475  *
27476  * @cname('__pyx_pybuffer_index')
27477  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
27478  *                           Py_ssize_t dim) except NULL:
27479  *     cdef Py_ssize_t shape, stride, suboffset = -1
27480  */
27481 
27482   /* function exit code */
27483   __pyx_L1_error:;
27484   __Pyx_XDECREF(__pyx_t_3);
27485   __Pyx_XDECREF(__pyx_t_4);
27486   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
27487   __pyx_r = NULL;
27488   __pyx_L0:;
27489   __Pyx_RefNannyFinishContext();
27490   return __pyx_r;
27491 }
27492 
27493 /* "View.MemoryView":939
27494  *
27495  * @cname('__pyx_memslice_transpose')
27496  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
27497  *     cdef int ndim = memslice.memview.view.ndim
27498  *
27499  */
27500 
__pyx_memslice_transpose(__Pyx_memviewslice * __pyx_v_memslice)27501 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
27502   int __pyx_v_ndim;
27503   Py_ssize_t *__pyx_v_shape;
27504   Py_ssize_t *__pyx_v_strides;
27505   int __pyx_v_i;
27506   int __pyx_v_j;
27507   int __pyx_r;
27508   int __pyx_t_1;
27509   Py_ssize_t *__pyx_t_2;
27510   long __pyx_t_3;
27511   long __pyx_t_4;
27512   Py_ssize_t __pyx_t_5;
27513   Py_ssize_t __pyx_t_6;
27514   int __pyx_t_7;
27515   int __pyx_t_8;
27516   int __pyx_t_9;
27517 
27518   /* "View.MemoryView":940
27519  * @cname('__pyx_memslice_transpose')
27520  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
27521  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
27522  *
27523  *     cdef Py_ssize_t *shape = memslice.shape
27524  */
27525   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
27526   __pyx_v_ndim = __pyx_t_1;
27527 
27528   /* "View.MemoryView":942
27529  *     cdef int ndim = memslice.memview.view.ndim
27530  *
27531  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
27532  *     cdef Py_ssize_t *strides = memslice.strides
27533  *
27534  */
27535   __pyx_t_2 = __pyx_v_memslice->shape;
27536   __pyx_v_shape = __pyx_t_2;
27537 
27538   /* "View.MemoryView":943
27539  *
27540  *     cdef Py_ssize_t *shape = memslice.shape
27541  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
27542  *
27543  *
27544  */
27545   __pyx_t_2 = __pyx_v_memslice->strides;
27546   __pyx_v_strides = __pyx_t_2;
27547 
27548   /* "View.MemoryView":947
27549  *
27550  *     cdef int i, j
27551  *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<
27552  *         j = ndim - 1 - i
27553  *         strides[i], strides[j] = strides[j], strides[i]
27554  */
27555   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
27556   __pyx_t_4 = __pyx_t_3;
27557   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
27558     __pyx_v_i = __pyx_t_1;
27559 
27560     /* "View.MemoryView":948
27561  *     cdef int i, j
27562  *     for i in range(ndim / 2):
27563  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
27564  *         strides[i], strides[j] = strides[j], strides[i]
27565  *         shape[i], shape[j] = shape[j], shape[i]
27566  */
27567     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
27568 
27569     /* "View.MemoryView":949
27570  *     for i in range(ndim / 2):
27571  *         j = ndim - 1 - i
27572  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
27573  *         shape[i], shape[j] = shape[j], shape[i]
27574  *
27575  */
27576     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
27577     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
27578     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
27579     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
27580 
27581     /* "View.MemoryView":950
27582  *         j = ndim - 1 - i
27583  *         strides[i], strides[j] = strides[j], strides[i]
27584  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
27585  *
27586  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
27587  */
27588     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
27589     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
27590     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
27591     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
27592 
27593     /* "View.MemoryView":952
27594  *         shape[i], shape[j] = shape[j], shape[i]
27595  *
27596  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
27597  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
27598  *
27599  */
27600     __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
27601     if (!__pyx_t_8) {
27602     } else {
27603       __pyx_t_7 = __pyx_t_8;
27604       goto __pyx_L6_bool_binop_done;
27605     }
27606     __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
27607     __pyx_t_7 = __pyx_t_8;
27608     __pyx_L6_bool_binop_done:;
27609     if (__pyx_t_7) {
27610 
27611       /* "View.MemoryView":953
27612  *
27613  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
27614  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
27615  *
27616  *     return 1
27617  */
27618       __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(2, 953, __pyx_L1_error)
27619 
27620       /* "View.MemoryView":952
27621  *         shape[i], shape[j] = shape[j], shape[i]
27622  *
27623  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
27624  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
27625  *
27626  */
27627     }
27628   }
27629 
27630   /* "View.MemoryView":955
27631  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
27632  *
27633  *     return 1             # <<<<<<<<<<<<<<
27634  *
27635  *
27636  */
27637   __pyx_r = 1;
27638   goto __pyx_L0;
27639 
27640   /* "View.MemoryView":939
27641  *
27642  * @cname('__pyx_memslice_transpose')
27643  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
27644  *     cdef int ndim = memslice.memview.view.ndim
27645  *
27646  */
27647 
27648   /* function exit code */
27649   __pyx_L1_error:;
27650   {
27651     #ifdef WITH_THREAD
27652     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
27653     #endif
27654     __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
27655     #ifdef WITH_THREAD
27656     __Pyx_PyGILState_Release(__pyx_gilstate_save);
27657     #endif
27658   }
27659   __pyx_r = 0;
27660   __pyx_L0:;
27661   return __pyx_r;
27662 }
27663 
27664 /* "View.MemoryView":972
27665  *     cdef int (*to_dtype_func)(char *, object) except 0
27666  *
27667  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
27668  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
27669  *
27670  */
27671 
27672 /* Python wrapper */
27673 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryviewslice___dealloc__(PyObject * __pyx_v_self)27674 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
27675   __Pyx_RefNannyDeclarations
27676   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
27677   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
27678 
27679   /* function exit code */
27680   __Pyx_RefNannyFinishContext();
27681 }
27682 
__pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj * __pyx_v_self)27683 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
27684   __Pyx_RefNannyDeclarations
27685   __Pyx_RefNannySetupContext("__dealloc__", 0);
27686 
27687   /* "View.MemoryView":973
27688  *
27689  *     def __dealloc__(self):
27690  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
27691  *
27692  *     cdef convert_item_to_object(self, char *itemp):
27693  */
27694   __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
27695 
27696   /* "View.MemoryView":972
27697  *     cdef int (*to_dtype_func)(char *, object) except 0
27698  *
27699  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
27700  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
27701  *
27702  */
27703 
27704   /* function exit code */
27705   __Pyx_RefNannyFinishContext();
27706 }
27707 
27708 /* "View.MemoryView":975
27709  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
27710  *
27711  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
27712  *         if self.to_object_func != NULL:
27713  *             return self.to_object_func(itemp)
27714  */
27715 
__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj * __pyx_v_self,char * __pyx_v_itemp)27716 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
27717   PyObject *__pyx_r = NULL;
27718   __Pyx_RefNannyDeclarations
27719   int __pyx_t_1;
27720   PyObject *__pyx_t_2 = NULL;
27721   __Pyx_RefNannySetupContext("convert_item_to_object", 0);
27722 
27723   /* "View.MemoryView":976
27724  *
27725  *     cdef convert_item_to_object(self, char *itemp):
27726  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
27727  *             return self.to_object_func(itemp)
27728  *         else:
27729  */
27730   __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
27731   if (__pyx_t_1) {
27732 
27733     /* "View.MemoryView":977
27734  *     cdef convert_item_to_object(self, char *itemp):
27735  *         if self.to_object_func != NULL:
27736  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
27737  *         else:
27738  *             return memoryview.convert_item_to_object(self, itemp)
27739  */
27740     __Pyx_XDECREF(__pyx_r);
27741     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 977, __pyx_L1_error)
27742     __Pyx_GOTREF(__pyx_t_2);
27743     __pyx_r = __pyx_t_2;
27744     __pyx_t_2 = 0;
27745     goto __pyx_L0;
27746 
27747     /* "View.MemoryView":976
27748  *
27749  *     cdef convert_item_to_object(self, char *itemp):
27750  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
27751  *             return self.to_object_func(itemp)
27752  *         else:
27753  */
27754   }
27755 
27756   /* "View.MemoryView":979
27757  *             return self.to_object_func(itemp)
27758  *         else:
27759  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
27760  *
27761  *     cdef assign_item_from_object(self, char *itemp, object value):
27762  */
27763   /*else*/ {
27764     __Pyx_XDECREF(__pyx_r);
27765     __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(2, 979, __pyx_L1_error)
27766     __Pyx_GOTREF(__pyx_t_2);
27767     __pyx_r = __pyx_t_2;
27768     __pyx_t_2 = 0;
27769     goto __pyx_L0;
27770   }
27771 
27772   /* "View.MemoryView":975
27773  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
27774  *
27775  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
27776  *         if self.to_object_func != NULL:
27777  *             return self.to_object_func(itemp)
27778  */
27779 
27780   /* function exit code */
27781   __pyx_L1_error:;
27782   __Pyx_XDECREF(__pyx_t_2);
27783   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
27784   __pyx_r = 0;
27785   __pyx_L0:;
27786   __Pyx_XGIVEREF(__pyx_r);
27787   __Pyx_RefNannyFinishContext();
27788   return __pyx_r;
27789 }
27790 
27791 /* "View.MemoryView":981
27792  *             return memoryview.convert_item_to_object(self, itemp)
27793  *
27794  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
27795  *         if self.to_dtype_func != NULL:
27796  *             self.to_dtype_func(itemp, value)
27797  */
27798 
__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj * __pyx_v_self,char * __pyx_v_itemp,PyObject * __pyx_v_value)27799 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
27800   PyObject *__pyx_r = NULL;
27801   __Pyx_RefNannyDeclarations
27802   int __pyx_t_1;
27803   int __pyx_t_2;
27804   PyObject *__pyx_t_3 = NULL;
27805   __Pyx_RefNannySetupContext("assign_item_from_object", 0);
27806 
27807   /* "View.MemoryView":982
27808  *
27809  *     cdef assign_item_from_object(self, char *itemp, object value):
27810  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
27811  *             self.to_dtype_func(itemp, value)
27812  *         else:
27813  */
27814   __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
27815   if (__pyx_t_1) {
27816 
27817     /* "View.MemoryView":983
27818  *     cdef assign_item_from_object(self, char *itemp, object value):
27819  *         if self.to_dtype_func != NULL:
27820  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
27821  *         else:
27822  *             memoryview.assign_item_from_object(self, itemp, value)
27823  */
27824     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 983, __pyx_L1_error)
27825 
27826     /* "View.MemoryView":982
27827  *
27828  *     cdef assign_item_from_object(self, char *itemp, object value):
27829  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
27830  *             self.to_dtype_func(itemp, value)
27831  *         else:
27832  */
27833     goto __pyx_L3;
27834   }
27835 
27836   /* "View.MemoryView":985
27837  *             self.to_dtype_func(itemp, value)
27838  *         else:
27839  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
27840  *
27841  *     @property
27842  */
27843   /*else*/ {
27844     __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(2, 985, __pyx_L1_error)
27845     __Pyx_GOTREF(__pyx_t_3);
27846     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27847   }
27848   __pyx_L3:;
27849 
27850   /* "View.MemoryView":981
27851  *             return memoryview.convert_item_to_object(self, itemp)
27852  *
27853  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
27854  *         if self.to_dtype_func != NULL:
27855  *             self.to_dtype_func(itemp, value)
27856  */
27857 
27858   /* function exit code */
27859   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27860   goto __pyx_L0;
27861   __pyx_L1_error:;
27862   __Pyx_XDECREF(__pyx_t_3);
27863   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
27864   __pyx_r = 0;
27865   __pyx_L0:;
27866   __Pyx_XGIVEREF(__pyx_r);
27867   __Pyx_RefNannyFinishContext();
27868   return __pyx_r;
27869 }
27870 
27871 /* "View.MemoryView":988
27872  *
27873  *     @property
27874  *     def base(self):             # <<<<<<<<<<<<<<
27875  *         return self.from_object
27876  *
27877  */
27878 
27879 /* Python wrapper */
27880 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject * __pyx_v_self)27881 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
27882   PyObject *__pyx_r = 0;
27883   __Pyx_RefNannyDeclarations
27884   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27885   __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
27886 
27887   /* function exit code */
27888   __Pyx_RefNannyFinishContext();
27889   return __pyx_r;
27890 }
27891 
__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj * __pyx_v_self)27892 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
27893   PyObject *__pyx_r = NULL;
27894   __Pyx_RefNannyDeclarations
27895   __Pyx_RefNannySetupContext("__get__", 0);
27896 
27897   /* "View.MemoryView":989
27898  *     @property
27899  *     def base(self):
27900  *         return self.from_object             # <<<<<<<<<<<<<<
27901  *
27902  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
27903  */
27904   __Pyx_XDECREF(__pyx_r);
27905   __Pyx_INCREF(__pyx_v_self->from_object);
27906   __pyx_r = __pyx_v_self->from_object;
27907   goto __pyx_L0;
27908 
27909   /* "View.MemoryView":988
27910  *
27911  *     @property
27912  *     def base(self):             # <<<<<<<<<<<<<<
27913  *         return self.from_object
27914  *
27915  */
27916 
27917   /* function exit code */
27918   __pyx_L0:;
27919   __Pyx_XGIVEREF(__pyx_r);
27920   __Pyx_RefNannyFinishContext();
27921   return __pyx_r;
27922 }
27923 
27924 /* "(tree fragment)":1
27925  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
27926  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27927  * def __setstate_cython__(self, __pyx_state):
27928  */
27929 
27930 /* Python wrapper */
27931 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)27932 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
27933   PyObject *__pyx_r = 0;
27934   __Pyx_RefNannyDeclarations
27935   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
27936   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
27937 
27938   /* function exit code */
27939   __Pyx_RefNannyFinishContext();
27940   return __pyx_r;
27941 }
27942 
__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj * __pyx_v_self)27943 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
27944   PyObject *__pyx_r = NULL;
27945   __Pyx_RefNannyDeclarations
27946   PyObject *__pyx_t_1 = NULL;
27947   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
27948 
27949   /* "(tree fragment)":2
27950  * def __reduce_cython__(self):
27951  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
27952  * def __setstate_cython__(self, __pyx_state):
27953  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27954  */
27955   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
27956   __Pyx_GOTREF(__pyx_t_1);
27957   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
27958   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27959   __PYX_ERR(2, 2, __pyx_L1_error)
27960 
27961   /* "(tree fragment)":1
27962  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
27963  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27964  * def __setstate_cython__(self, __pyx_state):
27965  */
27966 
27967   /* function exit code */
27968   __pyx_L1_error:;
27969   __Pyx_XDECREF(__pyx_t_1);
27970   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27971   __pyx_r = NULL;
27972   __Pyx_XGIVEREF(__pyx_r);
27973   __Pyx_RefNannyFinishContext();
27974   return __pyx_r;
27975 }
27976 
27977 /* "(tree fragment)":3
27978  * def __reduce_cython__(self):
27979  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27980  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
27981  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27982  */
27983 
27984 /* Python wrapper */
27985 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)27986 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
27987   PyObject *__pyx_r = 0;
27988   __Pyx_RefNannyDeclarations
27989   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
27990   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
27991 
27992   /* function exit code */
27993   __Pyx_RefNannyFinishContext();
27994   return __pyx_r;
27995 }
27996 
__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)27997 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) {
27998   PyObject *__pyx_r = NULL;
27999   __Pyx_RefNannyDeclarations
28000   PyObject *__pyx_t_1 = NULL;
28001   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
28002 
28003   /* "(tree fragment)":4
28004  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
28005  * def __setstate_cython__(self, __pyx_state):
28006  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
28007  */
28008   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
28009   __Pyx_GOTREF(__pyx_t_1);
28010   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
28011   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28012   __PYX_ERR(2, 4, __pyx_L1_error)
28013 
28014   /* "(tree fragment)":3
28015  * def __reduce_cython__(self):
28016  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
28017  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
28018  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
28019  */
28020 
28021   /* function exit code */
28022   __pyx_L1_error:;
28023   __Pyx_XDECREF(__pyx_t_1);
28024   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28025   __pyx_r = NULL;
28026   __Pyx_XGIVEREF(__pyx_r);
28027   __Pyx_RefNannyFinishContext();
28028   return __pyx_r;
28029 }
28030 
28031 /* "View.MemoryView":995
28032  *
28033  * @cname('__pyx_memoryview_fromslice')
28034  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
28035  *                           int ndim,
28036  *                           object (*to_object_func)(char *),
28037  */
28038 
__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)28039 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) {
28040   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
28041   Py_ssize_t __pyx_v_suboffset;
28042   PyObject *__pyx_v_length = NULL;
28043   PyObject *__pyx_r = NULL;
28044   __Pyx_RefNannyDeclarations
28045   int __pyx_t_1;
28046   PyObject *__pyx_t_2 = NULL;
28047   PyObject *__pyx_t_3 = NULL;
28048   __Pyx_TypeInfo *__pyx_t_4;
28049   Py_buffer __pyx_t_5;
28050   Py_ssize_t *__pyx_t_6;
28051   Py_ssize_t *__pyx_t_7;
28052   Py_ssize_t *__pyx_t_8;
28053   Py_ssize_t __pyx_t_9;
28054   __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
28055 
28056   /* "View.MemoryView":1003
28057  *     cdef _memoryviewslice result
28058  *
28059  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
28060  *         return None
28061  *
28062  */
28063   __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
28064   if (__pyx_t_1) {
28065 
28066     /* "View.MemoryView":1004
28067  *
28068  *     if <PyObject *> memviewslice.memview == Py_None:
28069  *         return None             # <<<<<<<<<<<<<<
28070  *
28071  *
28072  */
28073     __Pyx_XDECREF(__pyx_r);
28074     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
28075     goto __pyx_L0;
28076 
28077     /* "View.MemoryView":1003
28078  *     cdef _memoryviewslice result
28079  *
28080  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
28081  *         return None
28082  *
28083  */
28084   }
28085 
28086   /* "View.MemoryView":1009
28087  *
28088  *
28089  *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
28090  *
28091  *     result.from_slice = memviewslice
28092  */
28093   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1009, __pyx_L1_error)
28094   __Pyx_GOTREF(__pyx_t_2);
28095   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1009, __pyx_L1_error)
28096   __Pyx_GOTREF(__pyx_t_3);
28097   __Pyx_INCREF(Py_None);
28098   __Pyx_GIVEREF(Py_None);
28099   PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
28100   __Pyx_INCREF(__pyx_int_0);
28101   __Pyx_GIVEREF(__pyx_int_0);
28102   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
28103   __Pyx_GIVEREF(__pyx_t_2);
28104   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
28105   __pyx_t_2 = 0;
28106   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1009, __pyx_L1_error)
28107   __Pyx_GOTREF(__pyx_t_2);
28108   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28109   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
28110   __pyx_t_2 = 0;
28111 
28112   /* "View.MemoryView":1011
28113  *     result = _memoryviewslice(None, 0, dtype_is_object)
28114  *
28115  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
28116  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
28117  *
28118  */
28119   __pyx_v_result->from_slice = __pyx_v_memviewslice;
28120 
28121   /* "View.MemoryView":1012
28122  *
28123  *     result.from_slice = memviewslice
28124  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
28125  *
28126  *     result.from_object = (<memoryview> memviewslice.memview).base
28127  */
28128   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
28129 
28130   /* "View.MemoryView":1014
28131  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
28132  *
28133  *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<
28134  *     result.typeinfo = memviewslice.memview.typeinfo
28135  *
28136  */
28137   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1014, __pyx_L1_error)
28138   __Pyx_GOTREF(__pyx_t_2);
28139   __Pyx_GIVEREF(__pyx_t_2);
28140   __Pyx_GOTREF(__pyx_v_result->from_object);
28141   __Pyx_DECREF(__pyx_v_result->from_object);
28142   __pyx_v_result->from_object = __pyx_t_2;
28143   __pyx_t_2 = 0;
28144 
28145   /* "View.MemoryView":1015
28146  *
28147  *     result.from_object = (<memoryview> memviewslice.memview).base
28148  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
28149  *
28150  *     result.view = memviewslice.memview.view
28151  */
28152   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
28153   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
28154 
28155   /* "View.MemoryView":1017
28156  *     result.typeinfo = memviewslice.memview.typeinfo
28157  *
28158  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
28159  *     result.view.buf = <void *> memviewslice.data
28160  *     result.view.ndim = ndim
28161  */
28162   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
28163   __pyx_v_result->__pyx_base.view = __pyx_t_5;
28164 
28165   /* "View.MemoryView":1018
28166  *
28167  *     result.view = memviewslice.memview.view
28168  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
28169  *     result.view.ndim = ndim
28170  *     (<__pyx_buffer *> &result.view).obj = Py_None
28171  */
28172   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
28173 
28174   /* "View.MemoryView":1019
28175  *     result.view = memviewslice.memview.view
28176  *     result.view.buf = <void *> memviewslice.data
28177  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
28178  *     (<__pyx_buffer *> &result.view).obj = Py_None
28179  *     Py_INCREF(Py_None)
28180  */
28181   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
28182 
28183   /* "View.MemoryView":1020
28184  *     result.view.buf = <void *> memviewslice.data
28185  *     result.view.ndim = ndim
28186  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
28187  *     Py_INCREF(Py_None)
28188  *
28189  */
28190   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
28191 
28192   /* "View.MemoryView":1021
28193  *     result.view.ndim = ndim
28194  *     (<__pyx_buffer *> &result.view).obj = Py_None
28195  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
28196  *
28197  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
28198  */
28199   Py_INCREF(Py_None);
28200 
28201   /* "View.MemoryView":1023
28202  *     Py_INCREF(Py_None)
28203  *
28204  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
28205  *         result.flags = PyBUF_RECORDS
28206  *     else:
28207  */
28208   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
28209   if (__pyx_t_1) {
28210 
28211     /* "View.MemoryView":1024
28212  *
28213  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
28214  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
28215  *     else:
28216  *         result.flags = PyBUF_RECORDS_RO
28217  */
28218     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
28219 
28220     /* "View.MemoryView":1023
28221  *     Py_INCREF(Py_None)
28222  *
28223  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
28224  *         result.flags = PyBUF_RECORDS
28225  *     else:
28226  */
28227     goto __pyx_L4;
28228   }
28229 
28230   /* "View.MemoryView":1026
28231  *         result.flags = PyBUF_RECORDS
28232  *     else:
28233  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
28234  *
28235  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
28236  */
28237   /*else*/ {
28238     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
28239   }
28240   __pyx_L4:;
28241 
28242   /* "View.MemoryView":1028
28243  *         result.flags = PyBUF_RECORDS_RO
28244  *
28245  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
28246  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
28247  *
28248  */
28249   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
28250 
28251   /* "View.MemoryView":1029
28252  *
28253  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
28254  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
28255  *
28256  *
28257  */
28258   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
28259 
28260   /* "View.MemoryView":1032
28261  *
28262  *
28263  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
28264  *     for suboffset in result.from_slice.suboffsets[:ndim]:
28265  *         if suboffset >= 0:
28266  */
28267   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
28268 
28269   /* "View.MemoryView":1033
28270  *
28271  *     result.view.suboffsets = NULL
28272  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
28273  *         if suboffset >= 0:
28274  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
28275  */
28276   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
28277   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
28278     __pyx_t_6 = __pyx_t_8;
28279     __pyx_v_suboffset = (__pyx_t_6[0]);
28280 
28281     /* "View.MemoryView":1034
28282  *     result.view.suboffsets = NULL
28283  *     for suboffset in result.from_slice.suboffsets[:ndim]:
28284  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
28285  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
28286  *             break
28287  */
28288     __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
28289     if (__pyx_t_1) {
28290 
28291       /* "View.MemoryView":1035
28292  *     for suboffset in result.from_slice.suboffsets[:ndim]:
28293  *         if suboffset >= 0:
28294  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
28295  *             break
28296  *
28297  */
28298       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
28299 
28300       /* "View.MemoryView":1036
28301  *         if suboffset >= 0:
28302  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
28303  *             break             # <<<<<<<<<<<<<<
28304  *
28305  *     result.view.len = result.view.itemsize
28306  */
28307       goto __pyx_L6_break;
28308 
28309       /* "View.MemoryView":1034
28310  *     result.view.suboffsets = NULL
28311  *     for suboffset in result.from_slice.suboffsets[:ndim]:
28312  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
28313  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
28314  *             break
28315  */
28316     }
28317   }
28318   __pyx_L6_break:;
28319 
28320   /* "View.MemoryView":1038
28321  *             break
28322  *
28323  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
28324  *     for length in result.view.shape[:ndim]:
28325  *         result.view.len *= length
28326  */
28327   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
28328   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
28329 
28330   /* "View.MemoryView":1039
28331  *
28332  *     result.view.len = result.view.itemsize
28333  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
28334  *         result.view.len *= length
28335  *
28336  */
28337   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
28338   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
28339     __pyx_t_6 = __pyx_t_8;
28340     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1039, __pyx_L1_error)
28341     __Pyx_GOTREF(__pyx_t_2);
28342     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
28343     __pyx_t_2 = 0;
28344 
28345     /* "View.MemoryView":1040
28346  *     result.view.len = result.view.itemsize
28347  *     for length in result.view.shape[:ndim]:
28348  *         result.view.len *= length             # <<<<<<<<<<<<<<
28349  *
28350  *     result.to_object_func = to_object_func
28351  */
28352     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1040, __pyx_L1_error)
28353     __Pyx_GOTREF(__pyx_t_2);
28354     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1040, __pyx_L1_error)
28355     __Pyx_GOTREF(__pyx_t_3);
28356     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28357     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 1040, __pyx_L1_error)
28358     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28359     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
28360   }
28361 
28362   /* "View.MemoryView":1042
28363  *         result.view.len *= length
28364  *
28365  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
28366  *     result.to_dtype_func = to_dtype_func
28367  *
28368  */
28369   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
28370 
28371   /* "View.MemoryView":1043
28372  *
28373  *     result.to_object_func = to_object_func
28374  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
28375  *
28376  *     return result
28377  */
28378   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
28379 
28380   /* "View.MemoryView":1045
28381  *     result.to_dtype_func = to_dtype_func
28382  *
28383  *     return result             # <<<<<<<<<<<<<<
28384  *
28385  * @cname('__pyx_memoryview_get_slice_from_memoryview')
28386  */
28387   __Pyx_XDECREF(__pyx_r);
28388   __Pyx_INCREF(((PyObject *)__pyx_v_result));
28389   __pyx_r = ((PyObject *)__pyx_v_result);
28390   goto __pyx_L0;
28391 
28392   /* "View.MemoryView":995
28393  *
28394  * @cname('__pyx_memoryview_fromslice')
28395  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
28396  *                           int ndim,
28397  *                           object (*to_object_func)(char *),
28398  */
28399 
28400   /* function exit code */
28401   __pyx_L1_error:;
28402   __Pyx_XDECREF(__pyx_t_2);
28403   __Pyx_XDECREF(__pyx_t_3);
28404   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
28405   __pyx_r = 0;
28406   __pyx_L0:;
28407   __Pyx_XDECREF((PyObject *)__pyx_v_result);
28408   __Pyx_XDECREF(__pyx_v_length);
28409   __Pyx_XGIVEREF(__pyx_r);
28410   __Pyx_RefNannyFinishContext();
28411   return __pyx_r;
28412 }
28413 
28414 /* "View.MemoryView":1048
28415  *
28416  * @cname('__pyx_memoryview_get_slice_from_memoryview')
28417  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
28418  *                                                    __Pyx_memviewslice *mslice):
28419  *     cdef _memoryviewslice obj
28420  */
28421 
__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_mslice)28422 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
28423   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
28424   __Pyx_memviewslice *__pyx_r;
28425   __Pyx_RefNannyDeclarations
28426   int __pyx_t_1;
28427   int __pyx_t_2;
28428   PyObject *__pyx_t_3 = NULL;
28429   __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
28430 
28431   /* "View.MemoryView":1051
28432  *                                                    __Pyx_memviewslice *mslice):
28433  *     cdef _memoryviewslice obj
28434  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
28435  *         obj = memview
28436  *         return &obj.from_slice
28437  */
28438   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
28439   __pyx_t_2 = (__pyx_t_1 != 0);
28440   if (__pyx_t_2) {
28441 
28442     /* "View.MemoryView":1052
28443  *     cdef _memoryviewslice obj
28444  *     if isinstance(memview, _memoryviewslice):
28445  *         obj = memview             # <<<<<<<<<<<<<<
28446  *         return &obj.from_slice
28447  *     else:
28448  */
28449     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 1052, __pyx_L1_error)
28450     __pyx_t_3 = ((PyObject *)__pyx_v_memview);
28451     __Pyx_INCREF(__pyx_t_3);
28452     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
28453     __pyx_t_3 = 0;
28454 
28455     /* "View.MemoryView":1053
28456  *     if isinstance(memview, _memoryviewslice):
28457  *         obj = memview
28458  *         return &obj.from_slice             # <<<<<<<<<<<<<<
28459  *     else:
28460  *         slice_copy(memview, mslice)
28461  */
28462     __pyx_r = (&__pyx_v_obj->from_slice);
28463     goto __pyx_L0;
28464 
28465     /* "View.MemoryView":1051
28466  *                                                    __Pyx_memviewslice *mslice):
28467  *     cdef _memoryviewslice obj
28468  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
28469  *         obj = memview
28470  *         return &obj.from_slice
28471  */
28472   }
28473 
28474   /* "View.MemoryView":1055
28475  *         return &obj.from_slice
28476  *     else:
28477  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
28478  *         return mslice
28479  *
28480  */
28481   /*else*/ {
28482     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
28483 
28484     /* "View.MemoryView":1056
28485  *     else:
28486  *         slice_copy(memview, mslice)
28487  *         return mslice             # <<<<<<<<<<<<<<
28488  *
28489  * @cname('__pyx_memoryview_slice_copy')
28490  */
28491     __pyx_r = __pyx_v_mslice;
28492     goto __pyx_L0;
28493   }
28494 
28495   /* "View.MemoryView":1048
28496  *
28497  * @cname('__pyx_memoryview_get_slice_from_memoryview')
28498  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
28499  *                                                    __Pyx_memviewslice *mslice):
28500  *     cdef _memoryviewslice obj
28501  */
28502 
28503   /* function exit code */
28504   __pyx_L1_error:;
28505   __Pyx_XDECREF(__pyx_t_3);
28506   __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
28507   __pyx_r = 0;
28508   __pyx_L0:;
28509   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
28510   __Pyx_RefNannyFinishContext();
28511   return __pyx_r;
28512 }
28513 
28514 /* "View.MemoryView":1059
28515  *
28516  * @cname('__pyx_memoryview_slice_copy')
28517  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
28518  *     cdef int dim
28519  *     cdef (Py_ssize_t*) shape, strides, suboffsets
28520  */
28521 
__pyx_memoryview_slice_copy(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_dst)28522 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
28523   int __pyx_v_dim;
28524   Py_ssize_t *__pyx_v_shape;
28525   Py_ssize_t *__pyx_v_strides;
28526   Py_ssize_t *__pyx_v_suboffsets;
28527   __Pyx_RefNannyDeclarations
28528   Py_ssize_t *__pyx_t_1;
28529   int __pyx_t_2;
28530   int __pyx_t_3;
28531   int __pyx_t_4;
28532   Py_ssize_t __pyx_t_5;
28533   __Pyx_RefNannySetupContext("slice_copy", 0);
28534 
28535   /* "View.MemoryView":1063
28536  *     cdef (Py_ssize_t*) shape, strides, suboffsets
28537  *
28538  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
28539  *     strides = memview.view.strides
28540  *     suboffsets = memview.view.suboffsets
28541  */
28542   __pyx_t_1 = __pyx_v_memview->view.shape;
28543   __pyx_v_shape = __pyx_t_1;
28544 
28545   /* "View.MemoryView":1064
28546  *
28547  *     shape = memview.view.shape
28548  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
28549  *     suboffsets = memview.view.suboffsets
28550  *
28551  */
28552   __pyx_t_1 = __pyx_v_memview->view.strides;
28553   __pyx_v_strides = __pyx_t_1;
28554 
28555   /* "View.MemoryView":1065
28556  *     shape = memview.view.shape
28557  *     strides = memview.view.strides
28558  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
28559  *
28560  *     dst.memview = <__pyx_memoryview *> memview
28561  */
28562   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
28563   __pyx_v_suboffsets = __pyx_t_1;
28564 
28565   /* "View.MemoryView":1067
28566  *     suboffsets = memview.view.suboffsets
28567  *
28568  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
28569  *     dst.data = <char *> memview.view.buf
28570  *
28571  */
28572   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
28573 
28574   /* "View.MemoryView":1068
28575  *
28576  *     dst.memview = <__pyx_memoryview *> memview
28577  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
28578  *
28579  *     for dim in range(memview.view.ndim):
28580  */
28581   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
28582 
28583   /* "View.MemoryView":1070
28584  *     dst.data = <char *> memview.view.buf
28585  *
28586  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
28587  *         dst.shape[dim] = shape[dim]
28588  *         dst.strides[dim] = strides[dim]
28589  */
28590   __pyx_t_2 = __pyx_v_memview->view.ndim;
28591   __pyx_t_3 = __pyx_t_2;
28592   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
28593     __pyx_v_dim = __pyx_t_4;
28594 
28595     /* "View.MemoryView":1071
28596  *
28597  *     for dim in range(memview.view.ndim):
28598  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
28599  *         dst.strides[dim] = strides[dim]
28600  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
28601  */
28602     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
28603 
28604     /* "View.MemoryView":1072
28605  *     for dim in range(memview.view.ndim):
28606  *         dst.shape[dim] = shape[dim]
28607  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
28608  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
28609  *
28610  */
28611     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
28612 
28613     /* "View.MemoryView":1073
28614  *         dst.shape[dim] = shape[dim]
28615  *         dst.strides[dim] = strides[dim]
28616  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
28617  *
28618  * @cname('__pyx_memoryview_copy_object')
28619  */
28620     if ((__pyx_v_suboffsets != 0)) {
28621       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
28622     } else {
28623       __pyx_t_5 = -1L;
28624     }
28625     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
28626   }
28627 
28628   /* "View.MemoryView":1059
28629  *
28630  * @cname('__pyx_memoryview_slice_copy')
28631  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
28632  *     cdef int dim
28633  *     cdef (Py_ssize_t*) shape, strides, suboffsets
28634  */
28635 
28636   /* function exit code */
28637   __Pyx_RefNannyFinishContext();
28638 }
28639 
28640 /* "View.MemoryView":1076
28641  *
28642  * @cname('__pyx_memoryview_copy_object')
28643  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
28644  *     "Create a new memoryview object"
28645  *     cdef __Pyx_memviewslice memviewslice
28646  */
28647 
__pyx_memoryview_copy_object(struct __pyx_memoryview_obj * __pyx_v_memview)28648 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
28649   __Pyx_memviewslice __pyx_v_memviewslice;
28650   PyObject *__pyx_r = NULL;
28651   __Pyx_RefNannyDeclarations
28652   PyObject *__pyx_t_1 = NULL;
28653   __Pyx_RefNannySetupContext("memoryview_copy", 0);
28654 
28655   /* "View.MemoryView":1079
28656  *     "Create a new memoryview object"
28657  *     cdef __Pyx_memviewslice memviewslice
28658  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
28659  *     return memoryview_copy_from_slice(memview, &memviewslice)
28660  *
28661  */
28662   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
28663 
28664   /* "View.MemoryView":1080
28665  *     cdef __Pyx_memviewslice memviewslice
28666  *     slice_copy(memview, &memviewslice)
28667  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
28668  *
28669  * @cname('__pyx_memoryview_copy_object_from_slice')
28670  */
28671   __Pyx_XDECREF(__pyx_r);
28672   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1080, __pyx_L1_error)
28673   __Pyx_GOTREF(__pyx_t_1);
28674   __pyx_r = __pyx_t_1;
28675   __pyx_t_1 = 0;
28676   goto __pyx_L0;
28677 
28678   /* "View.MemoryView":1076
28679  *
28680  * @cname('__pyx_memoryview_copy_object')
28681  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
28682  *     "Create a new memoryview object"
28683  *     cdef __Pyx_memviewslice memviewslice
28684  */
28685 
28686   /* function exit code */
28687   __pyx_L1_error:;
28688   __Pyx_XDECREF(__pyx_t_1);
28689   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
28690   __pyx_r = 0;
28691   __pyx_L0:;
28692   __Pyx_XGIVEREF(__pyx_r);
28693   __Pyx_RefNannyFinishContext();
28694   return __pyx_r;
28695 }
28696 
28697 /* "View.MemoryView":1083
28698  *
28699  * @cname('__pyx_memoryview_copy_object_from_slice')
28700  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
28701  *     """
28702  *     Create a new memoryview object from a given memoryview object and slice.
28703  */
28704 
__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_memviewslice)28705 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
28706   PyObject *(*__pyx_v_to_object_func)(char *);
28707   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
28708   PyObject *__pyx_r = NULL;
28709   __Pyx_RefNannyDeclarations
28710   int __pyx_t_1;
28711   int __pyx_t_2;
28712   PyObject *(*__pyx_t_3)(char *);
28713   int (*__pyx_t_4)(char *, PyObject *);
28714   PyObject *__pyx_t_5 = NULL;
28715   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
28716 
28717   /* "View.MemoryView":1090
28718  *     cdef int (*to_dtype_func)(char *, object) except 0
28719  *
28720  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
28721  *         to_object_func = (<_memoryviewslice> memview).to_object_func
28722  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
28723  */
28724   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
28725   __pyx_t_2 = (__pyx_t_1 != 0);
28726   if (__pyx_t_2) {
28727 
28728     /* "View.MemoryView":1091
28729  *
28730  *     if isinstance(memview, _memoryviewslice):
28731  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
28732  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
28733  *     else:
28734  */
28735     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
28736     __pyx_v_to_object_func = __pyx_t_3;
28737 
28738     /* "View.MemoryView":1092
28739  *     if isinstance(memview, _memoryviewslice):
28740  *         to_object_func = (<_memoryviewslice> memview).to_object_func
28741  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
28742  *     else:
28743  *         to_object_func = NULL
28744  */
28745     __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
28746     __pyx_v_to_dtype_func = __pyx_t_4;
28747 
28748     /* "View.MemoryView":1090
28749  *     cdef int (*to_dtype_func)(char *, object) except 0
28750  *
28751  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
28752  *         to_object_func = (<_memoryviewslice> memview).to_object_func
28753  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
28754  */
28755     goto __pyx_L3;
28756   }
28757 
28758   /* "View.MemoryView":1094
28759  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
28760  *     else:
28761  *         to_object_func = NULL             # <<<<<<<<<<<<<<
28762  *         to_dtype_func = NULL
28763  *
28764  */
28765   /*else*/ {
28766     __pyx_v_to_object_func = NULL;
28767 
28768     /* "View.MemoryView":1095
28769  *     else:
28770  *         to_object_func = NULL
28771  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
28772  *
28773  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
28774  */
28775     __pyx_v_to_dtype_func = NULL;
28776   }
28777   __pyx_L3:;
28778 
28779   /* "View.MemoryView":1097
28780  *         to_dtype_func = NULL
28781  *
28782  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
28783  *                                 to_object_func, to_dtype_func,
28784  *                                 memview.dtype_is_object)
28785  */
28786   __Pyx_XDECREF(__pyx_r);
28787 
28788   /* "View.MemoryView":1099
28789  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
28790  *                                 to_object_func, to_dtype_func,
28791  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
28792  *
28793  *
28794  */
28795   __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(2, 1097, __pyx_L1_error)
28796   __Pyx_GOTREF(__pyx_t_5);
28797   __pyx_r = __pyx_t_5;
28798   __pyx_t_5 = 0;
28799   goto __pyx_L0;
28800 
28801   /* "View.MemoryView":1083
28802  *
28803  * @cname('__pyx_memoryview_copy_object_from_slice')
28804  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
28805  *     """
28806  *     Create a new memoryview object from a given memoryview object and slice.
28807  */
28808 
28809   /* function exit code */
28810   __pyx_L1_error:;
28811   __Pyx_XDECREF(__pyx_t_5);
28812   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
28813   __pyx_r = 0;
28814   __pyx_L0:;
28815   __Pyx_XGIVEREF(__pyx_r);
28816   __Pyx_RefNannyFinishContext();
28817   return __pyx_r;
28818 }
28819 
28820 /* "View.MemoryView":1105
28821  *
28822  *
28823  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
28824  *     if arg < 0:
28825  *         return -arg
28826  */
28827 
abs_py_ssize_t(Py_ssize_t __pyx_v_arg)28828 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
28829   Py_ssize_t __pyx_r;
28830   int __pyx_t_1;
28831 
28832   /* "View.MemoryView":1106
28833  *
28834  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
28835  *     if arg < 0:             # <<<<<<<<<<<<<<
28836  *         return -arg
28837  *     else:
28838  */
28839   __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
28840   if (__pyx_t_1) {
28841 
28842     /* "View.MemoryView":1107
28843  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
28844  *     if arg < 0:
28845  *         return -arg             # <<<<<<<<<<<<<<
28846  *     else:
28847  *         return arg
28848  */
28849     __pyx_r = (-__pyx_v_arg);
28850     goto __pyx_L0;
28851 
28852     /* "View.MemoryView":1106
28853  *
28854  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
28855  *     if arg < 0:             # <<<<<<<<<<<<<<
28856  *         return -arg
28857  *     else:
28858  */
28859   }
28860 
28861   /* "View.MemoryView":1109
28862  *         return -arg
28863  *     else:
28864  *         return arg             # <<<<<<<<<<<<<<
28865  *
28866  * @cname('__pyx_get_best_slice_order')
28867  */
28868   /*else*/ {
28869     __pyx_r = __pyx_v_arg;
28870     goto __pyx_L0;
28871   }
28872 
28873   /* "View.MemoryView":1105
28874  *
28875  *
28876  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
28877  *     if arg < 0:
28878  *         return -arg
28879  */
28880 
28881   /* function exit code */
28882   __pyx_L0:;
28883   return __pyx_r;
28884 }
28885 
28886 /* "View.MemoryView":1112
28887  *
28888  * @cname('__pyx_get_best_slice_order')
28889  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
28890  *     """
28891  *     Figure out the best memory access order for a given slice.
28892  */
28893 
__pyx_get_best_slice_order(__Pyx_memviewslice * __pyx_v_mslice,int __pyx_v_ndim)28894 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
28895   int __pyx_v_i;
28896   Py_ssize_t __pyx_v_c_stride;
28897   Py_ssize_t __pyx_v_f_stride;
28898   char __pyx_r;
28899   int __pyx_t_1;
28900   int __pyx_t_2;
28901   int __pyx_t_3;
28902   int __pyx_t_4;
28903 
28904   /* "View.MemoryView":1117
28905  *     """
28906  *     cdef int i
28907  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
28908  *     cdef Py_ssize_t f_stride = 0
28909  *
28910  */
28911   __pyx_v_c_stride = 0;
28912 
28913   /* "View.MemoryView":1118
28914  *     cdef int i
28915  *     cdef Py_ssize_t c_stride = 0
28916  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
28917  *
28918  *     for i in range(ndim - 1, -1, -1):
28919  */
28920   __pyx_v_f_stride = 0;
28921 
28922   /* "View.MemoryView":1120
28923  *     cdef Py_ssize_t f_stride = 0
28924  *
28925  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
28926  *         if mslice.shape[i] > 1:
28927  *             c_stride = mslice.strides[i]
28928  */
28929   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
28930     __pyx_v_i = __pyx_t_1;
28931 
28932     /* "View.MemoryView":1121
28933  *
28934  *     for i in range(ndim - 1, -1, -1):
28935  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
28936  *             c_stride = mslice.strides[i]
28937  *             break
28938  */
28939     __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
28940     if (__pyx_t_2) {
28941 
28942       /* "View.MemoryView":1122
28943  *     for i in range(ndim - 1, -1, -1):
28944  *         if mslice.shape[i] > 1:
28945  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
28946  *             break
28947  *
28948  */
28949       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
28950 
28951       /* "View.MemoryView":1123
28952  *         if mslice.shape[i] > 1:
28953  *             c_stride = mslice.strides[i]
28954  *             break             # <<<<<<<<<<<<<<
28955  *
28956  *     for i in range(ndim):
28957  */
28958       goto __pyx_L4_break;
28959 
28960       /* "View.MemoryView":1121
28961  *
28962  *     for i in range(ndim - 1, -1, -1):
28963  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
28964  *             c_stride = mslice.strides[i]
28965  *             break
28966  */
28967     }
28968   }
28969   __pyx_L4_break:;
28970 
28971   /* "View.MemoryView":1125
28972  *             break
28973  *
28974  *     for i in range(ndim):             # <<<<<<<<<<<<<<
28975  *         if mslice.shape[i] > 1:
28976  *             f_stride = mslice.strides[i]
28977  */
28978   __pyx_t_1 = __pyx_v_ndim;
28979   __pyx_t_3 = __pyx_t_1;
28980   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
28981     __pyx_v_i = __pyx_t_4;
28982 
28983     /* "View.MemoryView":1126
28984  *
28985  *     for i in range(ndim):
28986  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
28987  *             f_stride = mslice.strides[i]
28988  *             break
28989  */
28990     __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
28991     if (__pyx_t_2) {
28992 
28993       /* "View.MemoryView":1127
28994  *     for i in range(ndim):
28995  *         if mslice.shape[i] > 1:
28996  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
28997  *             break
28998  *
28999  */
29000       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
29001 
29002       /* "View.MemoryView":1128
29003  *         if mslice.shape[i] > 1:
29004  *             f_stride = mslice.strides[i]
29005  *             break             # <<<<<<<<<<<<<<
29006  *
29007  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
29008  */
29009       goto __pyx_L7_break;
29010 
29011       /* "View.MemoryView":1126
29012  *
29013  *     for i in range(ndim):
29014  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
29015  *             f_stride = mslice.strides[i]
29016  *             break
29017  */
29018     }
29019   }
29020   __pyx_L7_break:;
29021 
29022   /* "View.MemoryView":1130
29023  *             break
29024  *
29025  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
29026  *         return 'C'
29027  *     else:
29028  */
29029   __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
29030   if (__pyx_t_2) {
29031 
29032     /* "View.MemoryView":1131
29033  *
29034  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
29035  *         return 'C'             # <<<<<<<<<<<<<<
29036  *     else:
29037  *         return 'F'
29038  */
29039     __pyx_r = 'C';
29040     goto __pyx_L0;
29041 
29042     /* "View.MemoryView":1130
29043  *             break
29044  *
29045  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
29046  *         return 'C'
29047  *     else:
29048  */
29049   }
29050 
29051   /* "View.MemoryView":1133
29052  *         return 'C'
29053  *     else:
29054  *         return 'F'             # <<<<<<<<<<<<<<
29055  *
29056  * @cython.cdivision(True)
29057  */
29058   /*else*/ {
29059     __pyx_r = 'F';
29060     goto __pyx_L0;
29061   }
29062 
29063   /* "View.MemoryView":1112
29064  *
29065  * @cname('__pyx_get_best_slice_order')
29066  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
29067  *     """
29068  *     Figure out the best memory access order for a given slice.
29069  */
29070 
29071   /* function exit code */
29072   __pyx_L0:;
29073   return __pyx_r;
29074 }
29075 
29076 /* "View.MemoryView":1136
29077  *
29078  * @cython.cdivision(True)
29079  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
29080  *                                    char *dst_data, Py_ssize_t *dst_strides,
29081  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
29082  */
29083 
_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)29084 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) {
29085   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
29086   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
29087   Py_ssize_t __pyx_v_dst_extent;
29088   Py_ssize_t __pyx_v_src_stride;
29089   Py_ssize_t __pyx_v_dst_stride;
29090   int __pyx_t_1;
29091   int __pyx_t_2;
29092   int __pyx_t_3;
29093   Py_ssize_t __pyx_t_4;
29094   Py_ssize_t __pyx_t_5;
29095   Py_ssize_t __pyx_t_6;
29096 
29097   /* "View.MemoryView":1143
29098  *
29099  *     cdef Py_ssize_t i
29100  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
29101  *     cdef Py_ssize_t dst_extent = dst_shape[0]
29102  *     cdef Py_ssize_t src_stride = src_strides[0]
29103  */
29104   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
29105 
29106   /* "View.MemoryView":1144
29107  *     cdef Py_ssize_t i
29108  *     cdef Py_ssize_t src_extent = src_shape[0]
29109  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
29110  *     cdef Py_ssize_t src_stride = src_strides[0]
29111  *     cdef Py_ssize_t dst_stride = dst_strides[0]
29112  */
29113   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
29114 
29115   /* "View.MemoryView":1145
29116  *     cdef Py_ssize_t src_extent = src_shape[0]
29117  *     cdef Py_ssize_t dst_extent = dst_shape[0]
29118  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
29119  *     cdef Py_ssize_t dst_stride = dst_strides[0]
29120  *
29121  */
29122   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
29123 
29124   /* "View.MemoryView":1146
29125  *     cdef Py_ssize_t dst_extent = dst_shape[0]
29126  *     cdef Py_ssize_t src_stride = src_strides[0]
29127  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
29128  *
29129  *     if ndim == 1:
29130  */
29131   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
29132 
29133   /* "View.MemoryView":1148
29134  *     cdef Py_ssize_t dst_stride = dst_strides[0]
29135  *
29136  *     if ndim == 1:             # <<<<<<<<<<<<<<
29137  *        if (src_stride > 0 and dst_stride > 0 and
29138  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
29139  */
29140   __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
29141   if (__pyx_t_1) {
29142 
29143     /* "View.MemoryView":1149
29144  *
29145  *     if ndim == 1:
29146  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
29147  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
29148  *            memcpy(dst_data, src_data, itemsize * dst_extent)
29149  */
29150     __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
29151     if (__pyx_t_2) {
29152     } else {
29153       __pyx_t_1 = __pyx_t_2;
29154       goto __pyx_L5_bool_binop_done;
29155     }
29156     __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
29157     if (__pyx_t_2) {
29158     } else {
29159       __pyx_t_1 = __pyx_t_2;
29160       goto __pyx_L5_bool_binop_done;
29161     }
29162 
29163     /* "View.MemoryView":1150
29164  *     if ndim == 1:
29165  *        if (src_stride > 0 and dst_stride > 0 and
29166  *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
29167  *            memcpy(dst_data, src_data, itemsize * dst_extent)
29168  *        else:
29169  */
29170     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
29171     if (__pyx_t_2) {
29172       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
29173     }
29174     __pyx_t_3 = (__pyx_t_2 != 0);
29175     __pyx_t_1 = __pyx_t_3;
29176     __pyx_L5_bool_binop_done:;
29177 
29178     /* "View.MemoryView":1149
29179  *
29180  *     if ndim == 1:
29181  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
29182  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
29183  *            memcpy(dst_data, src_data, itemsize * dst_extent)
29184  */
29185     if (__pyx_t_1) {
29186 
29187       /* "View.MemoryView":1151
29188  *        if (src_stride > 0 and dst_stride > 0 and
29189  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
29190  *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
29191  *        else:
29192  *            for i in range(dst_extent):
29193  */
29194       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
29195 
29196       /* "View.MemoryView":1149
29197  *
29198  *     if ndim == 1:
29199  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
29200  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
29201  *            memcpy(dst_data, src_data, itemsize * dst_extent)
29202  */
29203       goto __pyx_L4;
29204     }
29205 
29206     /* "View.MemoryView":1153
29207  *            memcpy(dst_data, src_data, itemsize * dst_extent)
29208  *        else:
29209  *            for i in range(dst_extent):             # <<<<<<<<<<<<<<
29210  *                memcpy(dst_data, src_data, itemsize)
29211  *                src_data += src_stride
29212  */
29213     /*else*/ {
29214       __pyx_t_4 = __pyx_v_dst_extent;
29215       __pyx_t_5 = __pyx_t_4;
29216       for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
29217         __pyx_v_i = __pyx_t_6;
29218 
29219         /* "View.MemoryView":1154
29220  *        else:
29221  *            for i in range(dst_extent):
29222  *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
29223  *                src_data += src_stride
29224  *                dst_data += dst_stride
29225  */
29226         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
29227 
29228         /* "View.MemoryView":1155
29229  *            for i in range(dst_extent):
29230  *                memcpy(dst_data, src_data, itemsize)
29231  *                src_data += src_stride             # <<<<<<<<<<<<<<
29232  *                dst_data += dst_stride
29233  *     else:
29234  */
29235         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
29236 
29237         /* "View.MemoryView":1156
29238  *                memcpy(dst_data, src_data, itemsize)
29239  *                src_data += src_stride
29240  *                dst_data += dst_stride             # <<<<<<<<<<<<<<
29241  *     else:
29242  *         for i in range(dst_extent):
29243  */
29244         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
29245       }
29246     }
29247     __pyx_L4:;
29248 
29249     /* "View.MemoryView":1148
29250  *     cdef Py_ssize_t dst_stride = dst_strides[0]
29251  *
29252  *     if ndim == 1:             # <<<<<<<<<<<<<<
29253  *        if (src_stride > 0 and dst_stride > 0 and
29254  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
29255  */
29256     goto __pyx_L3;
29257   }
29258 
29259   /* "View.MemoryView":1158
29260  *                dst_data += dst_stride
29261  *     else:
29262  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
29263  *             _copy_strided_to_strided(src_data, src_strides + 1,
29264  *                                      dst_data, dst_strides + 1,
29265  */
29266   /*else*/ {
29267     __pyx_t_4 = __pyx_v_dst_extent;
29268     __pyx_t_5 = __pyx_t_4;
29269     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
29270       __pyx_v_i = __pyx_t_6;
29271 
29272       /* "View.MemoryView":1159
29273  *     else:
29274  *         for i in range(dst_extent):
29275  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
29276  *                                      dst_data, dst_strides + 1,
29277  *                                      src_shape + 1, dst_shape + 1,
29278  */
29279       _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);
29280 
29281       /* "View.MemoryView":1163
29282  *                                      src_shape + 1, dst_shape + 1,
29283  *                                      ndim - 1, itemsize)
29284  *             src_data += src_stride             # <<<<<<<<<<<<<<
29285  *             dst_data += dst_stride
29286  *
29287  */
29288       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
29289 
29290       /* "View.MemoryView":1164
29291  *                                      ndim - 1, itemsize)
29292  *             src_data += src_stride
29293  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
29294  *
29295  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
29296  */
29297       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
29298     }
29299   }
29300   __pyx_L3:;
29301 
29302   /* "View.MemoryView":1136
29303  *
29304  * @cython.cdivision(True)
29305  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
29306  *                                    char *dst_data, Py_ssize_t *dst_strides,
29307  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
29308  */
29309 
29310   /* function exit code */
29311 }
29312 
29313 /* "View.MemoryView":1166
29314  *             dst_data += dst_stride
29315  *
29316  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
29317  *                                   __Pyx_memviewslice *dst,
29318  *                                   int ndim, size_t itemsize) nogil:
29319  */
29320 
copy_strided_to_strided(__Pyx_memviewslice * __pyx_v_src,__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_ndim,size_t __pyx_v_itemsize)29321 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) {
29322 
29323   /* "View.MemoryView":1169
29324  *                                   __Pyx_memviewslice *dst,
29325  *                                   int ndim, size_t itemsize) nogil:
29326  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
29327  *                              src.shape, dst.shape, ndim, itemsize)
29328  *
29329  */
29330   _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);
29331 
29332   /* "View.MemoryView":1166
29333  *             dst_data += dst_stride
29334  *
29335  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
29336  *                                   __Pyx_memviewslice *dst,
29337  *                                   int ndim, size_t itemsize) nogil:
29338  */
29339 
29340   /* function exit code */
29341 }
29342 
29343 /* "View.MemoryView":1173
29344  *
29345  * @cname('__pyx_memoryview_slice_get_size')
29346  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
29347  *     "Return the size of the memory occupied by the slice in number of bytes"
29348  *     cdef int i
29349  */
29350 
__pyx_memoryview_slice_get_size(__Pyx_memviewslice * __pyx_v_src,int __pyx_v_ndim)29351 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
29352   int __pyx_v_i;
29353   Py_ssize_t __pyx_v_size;
29354   Py_ssize_t __pyx_r;
29355   Py_ssize_t __pyx_t_1;
29356   int __pyx_t_2;
29357   int __pyx_t_3;
29358   int __pyx_t_4;
29359 
29360   /* "View.MemoryView":1176
29361  *     "Return the size of the memory occupied by the slice in number of bytes"
29362  *     cdef int i
29363  *     cdef Py_ssize_t size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
29364  *
29365  *     for i in range(ndim):
29366  */
29367   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
29368   __pyx_v_size = __pyx_t_1;
29369 
29370   /* "View.MemoryView":1178
29371  *     cdef Py_ssize_t size = src.memview.view.itemsize
29372  *
29373  *     for i in range(ndim):             # <<<<<<<<<<<<<<
29374  *         size *= src.shape[i]
29375  *
29376  */
29377   __pyx_t_2 = __pyx_v_ndim;
29378   __pyx_t_3 = __pyx_t_2;
29379   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
29380     __pyx_v_i = __pyx_t_4;
29381 
29382     /* "View.MemoryView":1179
29383  *
29384  *     for i in range(ndim):
29385  *         size *= src.shape[i]             # <<<<<<<<<<<<<<
29386  *
29387  *     return size
29388  */
29389     __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i]));
29390   }
29391 
29392   /* "View.MemoryView":1181
29393  *         size *= src.shape[i]
29394  *
29395  *     return size             # <<<<<<<<<<<<<<
29396  *
29397  * @cname('__pyx_fill_contig_strides_array')
29398  */
29399   __pyx_r = __pyx_v_size;
29400   goto __pyx_L0;
29401 
29402   /* "View.MemoryView":1173
29403  *
29404  * @cname('__pyx_memoryview_slice_get_size')
29405  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
29406  *     "Return the size of the memory occupied by the slice in number of bytes"
29407  *     cdef int i
29408  */
29409 
29410   /* function exit code */
29411   __pyx_L0:;
29412   return __pyx_r;
29413 }
29414 
29415 /* "View.MemoryView":1184
29416  *
29417  * @cname('__pyx_fill_contig_strides_array')
29418  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
29419  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
29420  *                 int ndim, char order) nogil:
29421  */
29422 
__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)29423 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) {
29424   int __pyx_v_idx;
29425   Py_ssize_t __pyx_r;
29426   int __pyx_t_1;
29427   int __pyx_t_2;
29428   int __pyx_t_3;
29429   int __pyx_t_4;
29430 
29431   /* "View.MemoryView":1193
29432  *     cdef int idx
29433  *
29434  *     if order == 'F':             # <<<<<<<<<<<<<<
29435  *         for idx in range(ndim):
29436  *             strides[idx] = stride
29437  */
29438   __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
29439   if (__pyx_t_1) {
29440 
29441     /* "View.MemoryView":1194
29442  *
29443  *     if order == 'F':
29444  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
29445  *             strides[idx] = stride
29446  *             stride = stride * shape[idx]
29447  */
29448     __pyx_t_2 = __pyx_v_ndim;
29449     __pyx_t_3 = __pyx_t_2;
29450     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
29451       __pyx_v_idx = __pyx_t_4;
29452 
29453       /* "View.MemoryView":1195
29454  *     if order == 'F':
29455  *         for idx in range(ndim):
29456  *             strides[idx] = stride             # <<<<<<<<<<<<<<
29457  *             stride = stride * shape[idx]
29458  *     else:
29459  */
29460       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
29461 
29462       /* "View.MemoryView":1196
29463  *         for idx in range(ndim):
29464  *             strides[idx] = stride
29465  *             stride = stride * shape[idx]             # <<<<<<<<<<<<<<
29466  *     else:
29467  *         for idx in range(ndim - 1, -1, -1):
29468  */
29469       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
29470     }
29471 
29472     /* "View.MemoryView":1193
29473  *     cdef int idx
29474  *
29475  *     if order == 'F':             # <<<<<<<<<<<<<<
29476  *         for idx in range(ndim):
29477  *             strides[idx] = stride
29478  */
29479     goto __pyx_L3;
29480   }
29481 
29482   /* "View.MemoryView":1198
29483  *             stride = stride * shape[idx]
29484  *     else:
29485  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
29486  *             strides[idx] = stride
29487  *             stride = stride * shape[idx]
29488  */
29489   /*else*/ {
29490     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
29491       __pyx_v_idx = __pyx_t_2;
29492 
29493       /* "View.MemoryView":1199
29494  *     else:
29495  *         for idx in range(ndim - 1, -1, -1):
29496  *             strides[idx] = stride             # <<<<<<<<<<<<<<
29497  *             stride = stride * shape[idx]
29498  *
29499  */
29500       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
29501 
29502       /* "View.MemoryView":1200
29503  *         for idx in range(ndim - 1, -1, -1):
29504  *             strides[idx] = stride
29505  *             stride = stride * shape[idx]             # <<<<<<<<<<<<<<
29506  *
29507  *     return stride
29508  */
29509       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
29510     }
29511   }
29512   __pyx_L3:;
29513 
29514   /* "View.MemoryView":1202
29515  *             stride = stride * shape[idx]
29516  *
29517  *     return stride             # <<<<<<<<<<<<<<
29518  *
29519  * @cname('__pyx_memoryview_copy_data_to_temp')
29520  */
29521   __pyx_r = __pyx_v_stride;
29522   goto __pyx_L0;
29523 
29524   /* "View.MemoryView":1184
29525  *
29526  * @cname('__pyx_fill_contig_strides_array')
29527  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
29528  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
29529  *                 int ndim, char order) nogil:
29530  */
29531 
29532   /* function exit code */
29533   __pyx_L0:;
29534   return __pyx_r;
29535 }
29536 
29537 /* "View.MemoryView":1205
29538  *
29539  * @cname('__pyx_memoryview_copy_data_to_temp')
29540  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
29541  *                              __Pyx_memviewslice *tmpslice,
29542  *                              char order,
29543  */
29544 
__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice * __pyx_v_src,__Pyx_memviewslice * __pyx_v_tmpslice,char __pyx_v_order,int __pyx_v_ndim)29545 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) {
29546   int __pyx_v_i;
29547   void *__pyx_v_result;
29548   size_t __pyx_v_itemsize;
29549   size_t __pyx_v_size;
29550   void *__pyx_r;
29551   Py_ssize_t __pyx_t_1;
29552   int __pyx_t_2;
29553   int __pyx_t_3;
29554   struct __pyx_memoryview_obj *__pyx_t_4;
29555   int __pyx_t_5;
29556   int __pyx_t_6;
29557 
29558   /* "View.MemoryView":1216
29559  *     cdef void *result
29560  *
29561  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
29562  *     cdef size_t size = slice_get_size(src, ndim)
29563  *
29564  */
29565   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
29566   __pyx_v_itemsize = __pyx_t_1;
29567 
29568   /* "View.MemoryView":1217
29569  *
29570  *     cdef size_t itemsize = src.memview.view.itemsize
29571  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
29572  *
29573  *     result = malloc(size)
29574  */
29575   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
29576 
29577   /* "View.MemoryView":1219
29578  *     cdef size_t size = slice_get_size(src, ndim)
29579  *
29580  *     result = malloc(size)             # <<<<<<<<<<<<<<
29581  *     if not result:
29582  *         _err(MemoryError, NULL)
29583  */
29584   __pyx_v_result = malloc(__pyx_v_size);
29585 
29586   /* "View.MemoryView":1220
29587  *
29588  *     result = malloc(size)
29589  *     if not result:             # <<<<<<<<<<<<<<
29590  *         _err(MemoryError, NULL)
29591  *
29592  */
29593   __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
29594   if (__pyx_t_2) {
29595 
29596     /* "View.MemoryView":1221
29597  *     result = malloc(size)
29598  *     if not result:
29599  *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<
29600  *
29601  *
29602  */
29603     __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 1221, __pyx_L1_error)
29604 
29605     /* "View.MemoryView":1220
29606  *
29607  *     result = malloc(size)
29608  *     if not result:             # <<<<<<<<<<<<<<
29609  *         _err(MemoryError, NULL)
29610  *
29611  */
29612   }
29613 
29614   /* "View.MemoryView":1224
29615  *
29616  *
29617  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
29618  *     tmpslice.memview = src.memview
29619  *     for i in range(ndim):
29620  */
29621   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
29622 
29623   /* "View.MemoryView":1225
29624  *
29625  *     tmpslice.data = <char *> result
29626  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
29627  *     for i in range(ndim):
29628  *         tmpslice.shape[i] = src.shape[i]
29629  */
29630   __pyx_t_4 = __pyx_v_src->memview;
29631   __pyx_v_tmpslice->memview = __pyx_t_4;
29632 
29633   /* "View.MemoryView":1226
29634  *     tmpslice.data = <char *> result
29635  *     tmpslice.memview = src.memview
29636  *     for i in range(ndim):             # <<<<<<<<<<<<<<
29637  *         tmpslice.shape[i] = src.shape[i]
29638  *         tmpslice.suboffsets[i] = -1
29639  */
29640   __pyx_t_3 = __pyx_v_ndim;
29641   __pyx_t_5 = __pyx_t_3;
29642   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
29643     __pyx_v_i = __pyx_t_6;
29644 
29645     /* "View.MemoryView":1227
29646  *     tmpslice.memview = src.memview
29647  *     for i in range(ndim):
29648  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
29649  *         tmpslice.suboffsets[i] = -1
29650  *
29651  */
29652     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
29653 
29654     /* "View.MemoryView":1228
29655  *     for i in range(ndim):
29656  *         tmpslice.shape[i] = src.shape[i]
29657  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
29658  *
29659  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
29660  */
29661     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
29662   }
29663 
29664   /* "View.MemoryView":1230
29665  *         tmpslice.suboffsets[i] = -1
29666  *
29667  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<
29668  *                               ndim, order)
29669  *
29670  */
29671   (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));
29672 
29673   /* "View.MemoryView":1234
29674  *
29675  *
29676  *     for i in range(ndim):             # <<<<<<<<<<<<<<
29677  *         if tmpslice.shape[i] == 1:
29678  *             tmpslice.strides[i] = 0
29679  */
29680   __pyx_t_3 = __pyx_v_ndim;
29681   __pyx_t_5 = __pyx_t_3;
29682   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
29683     __pyx_v_i = __pyx_t_6;
29684 
29685     /* "View.MemoryView":1235
29686  *
29687  *     for i in range(ndim):
29688  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
29689  *             tmpslice.strides[i] = 0
29690  *
29691  */
29692     __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
29693     if (__pyx_t_2) {
29694 
29695       /* "View.MemoryView":1236
29696  *     for i in range(ndim):
29697  *         if tmpslice.shape[i] == 1:
29698  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
29699  *
29700  *     if slice_is_contig(src[0], order, ndim):
29701  */
29702       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
29703 
29704       /* "View.MemoryView":1235
29705  *
29706  *     for i in range(ndim):
29707  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
29708  *             tmpslice.strides[i] = 0
29709  *
29710  */
29711     }
29712   }
29713 
29714   /* "View.MemoryView":1238
29715  *             tmpslice.strides[i] = 0
29716  *
29717  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
29718  *         memcpy(result, src.data, size)
29719  *     else:
29720  */
29721   __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
29722   if (__pyx_t_2) {
29723 
29724     /* "View.MemoryView":1239
29725  *
29726  *     if slice_is_contig(src[0], order, ndim):
29727  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
29728  *     else:
29729  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
29730  */
29731     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
29732 
29733     /* "View.MemoryView":1238
29734  *             tmpslice.strides[i] = 0
29735  *
29736  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
29737  *         memcpy(result, src.data, size)
29738  *     else:
29739  */
29740     goto __pyx_L9;
29741   }
29742 
29743   /* "View.MemoryView":1241
29744  *         memcpy(result, src.data, size)
29745  *     else:
29746  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
29747  *
29748  *     return result
29749  */
29750   /*else*/ {
29751     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
29752   }
29753   __pyx_L9:;
29754 
29755   /* "View.MemoryView":1243
29756  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
29757  *
29758  *     return result             # <<<<<<<<<<<<<<
29759  *
29760  *
29761  */
29762   __pyx_r = __pyx_v_result;
29763   goto __pyx_L0;
29764 
29765   /* "View.MemoryView":1205
29766  *
29767  * @cname('__pyx_memoryview_copy_data_to_temp')
29768  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
29769  *                              __Pyx_memviewslice *tmpslice,
29770  *                              char order,
29771  */
29772 
29773   /* function exit code */
29774   __pyx_L1_error:;
29775   {
29776     #ifdef WITH_THREAD
29777     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29778     #endif
29779     __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
29780     #ifdef WITH_THREAD
29781     __Pyx_PyGILState_Release(__pyx_gilstate_save);
29782     #endif
29783   }
29784   __pyx_r = NULL;
29785   __pyx_L0:;
29786   return __pyx_r;
29787 }
29788 
29789 /* "View.MemoryView":1248
29790  *
29791  * @cname('__pyx_memoryview_err_extents')
29792  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
29793  *                              Py_ssize_t extent2) except -1 with gil:
29794  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
29795  */
29796 
__pyx_memoryview_err_extents(int __pyx_v_i,Py_ssize_t __pyx_v_extent1,Py_ssize_t __pyx_v_extent2)29797 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
29798   int __pyx_r;
29799   __Pyx_RefNannyDeclarations
29800   PyObject *__pyx_t_1 = NULL;
29801   PyObject *__pyx_t_2 = NULL;
29802   PyObject *__pyx_t_3 = NULL;
29803   PyObject *__pyx_t_4 = NULL;
29804   #ifdef WITH_THREAD
29805   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29806   #endif
29807   __Pyx_RefNannySetupContext("_err_extents", 0);
29808 
29809   /* "View.MemoryView":1251
29810  *                              Py_ssize_t extent2) except -1 with gil:
29811  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
29812  *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<
29813  *
29814  * @cname('__pyx_memoryview_err_dim')
29815  */
29816   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1251, __pyx_L1_error)
29817   __Pyx_GOTREF(__pyx_t_1);
29818   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1251, __pyx_L1_error)
29819   __Pyx_GOTREF(__pyx_t_2);
29820   __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1251, __pyx_L1_error)
29821   __Pyx_GOTREF(__pyx_t_3);
29822   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1251, __pyx_L1_error)
29823   __Pyx_GOTREF(__pyx_t_4);
29824   __Pyx_GIVEREF(__pyx_t_1);
29825   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
29826   __Pyx_GIVEREF(__pyx_t_2);
29827   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
29828   __Pyx_GIVEREF(__pyx_t_3);
29829   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
29830   __pyx_t_1 = 0;
29831   __pyx_t_2 = 0;
29832   __pyx_t_3 = 0;
29833 
29834   /* "View.MemoryView":1250
29835  * cdef int _err_extents(int i, Py_ssize_t extent1,
29836  *                              Py_ssize_t extent2) except -1 with gil:
29837  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %             # <<<<<<<<<<<<<<
29838  *                                                         (i, extent1, extent2))
29839  *
29840  */
29841   __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1250, __pyx_L1_error)
29842   __Pyx_GOTREF(__pyx_t_3);
29843   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29844   __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1250, __pyx_L1_error)
29845   __Pyx_GOTREF(__pyx_t_4);
29846   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29847   __Pyx_Raise(__pyx_t_4, 0, 0, 0);
29848   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29849   __PYX_ERR(2, 1250, __pyx_L1_error)
29850 
29851   /* "View.MemoryView":1248
29852  *
29853  * @cname('__pyx_memoryview_err_extents')
29854  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
29855  *                              Py_ssize_t extent2) except -1 with gil:
29856  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
29857  */
29858 
29859   /* function exit code */
29860   __pyx_L1_error:;
29861   __Pyx_XDECREF(__pyx_t_1);
29862   __Pyx_XDECREF(__pyx_t_2);
29863   __Pyx_XDECREF(__pyx_t_3);
29864   __Pyx_XDECREF(__pyx_t_4);
29865   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
29866   __pyx_r = -1;
29867   __Pyx_RefNannyFinishContext();
29868   #ifdef WITH_THREAD
29869   __Pyx_PyGILState_Release(__pyx_gilstate_save);
29870   #endif
29871   return __pyx_r;
29872 }
29873 
29874 /* "View.MemoryView":1254
29875  *
29876  * @cname('__pyx_memoryview_err_dim')
29877  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
29878  *     raise error(msg.decode('ascii') % dim)
29879  *
29880  */
29881 
__pyx_memoryview_err_dim(PyObject * __pyx_v_error,char * __pyx_v_msg,int __pyx_v_dim)29882 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
29883   int __pyx_r;
29884   __Pyx_RefNannyDeclarations
29885   PyObject *__pyx_t_1 = NULL;
29886   PyObject *__pyx_t_2 = NULL;
29887   PyObject *__pyx_t_3 = NULL;
29888   PyObject *__pyx_t_4 = NULL;
29889   #ifdef WITH_THREAD
29890   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29891   #endif
29892   __Pyx_RefNannySetupContext("_err_dim", 0);
29893   __Pyx_INCREF(__pyx_v_error);
29894 
29895   /* "View.MemoryView":1255
29896  * @cname('__pyx_memoryview_err_dim')
29897  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
29898  *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<
29899  *
29900  * @cname('__pyx_memoryview_err')
29901  */
29902   __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(2, 1255, __pyx_L1_error)
29903   __Pyx_GOTREF(__pyx_t_2);
29904   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1255, __pyx_L1_error)
29905   __Pyx_GOTREF(__pyx_t_3);
29906   __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1255, __pyx_L1_error)
29907   __Pyx_GOTREF(__pyx_t_4);
29908   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29909   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29910   __Pyx_INCREF(__pyx_v_error);
29911   __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
29912   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
29913     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
29914     if (likely(__pyx_t_2)) {
29915       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
29916       __Pyx_INCREF(__pyx_t_2);
29917       __Pyx_INCREF(function);
29918       __Pyx_DECREF_SET(__pyx_t_3, function);
29919     }
29920   }
29921   __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);
29922   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
29923   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29924   if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1255, __pyx_L1_error)
29925   __Pyx_GOTREF(__pyx_t_1);
29926   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29927   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29928   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29929   __PYX_ERR(2, 1255, __pyx_L1_error)
29930 
29931   /* "View.MemoryView":1254
29932  *
29933  * @cname('__pyx_memoryview_err_dim')
29934  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
29935  *     raise error(msg.decode('ascii') % dim)
29936  *
29937  */
29938 
29939   /* function exit code */
29940   __pyx_L1_error:;
29941   __Pyx_XDECREF(__pyx_t_1);
29942   __Pyx_XDECREF(__pyx_t_2);
29943   __Pyx_XDECREF(__pyx_t_3);
29944   __Pyx_XDECREF(__pyx_t_4);
29945   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
29946   __pyx_r = -1;
29947   __Pyx_XDECREF(__pyx_v_error);
29948   __Pyx_RefNannyFinishContext();
29949   #ifdef WITH_THREAD
29950   __Pyx_PyGILState_Release(__pyx_gilstate_save);
29951   #endif
29952   return __pyx_r;
29953 }
29954 
29955 /* "View.MemoryView":1258
29956  *
29957  * @cname('__pyx_memoryview_err')
29958  * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
29959  *     if msg != NULL:
29960  *         raise error(msg.decode('ascii'))
29961  */
29962 
__pyx_memoryview_err(PyObject * __pyx_v_error,char * __pyx_v_msg)29963 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
29964   int __pyx_r;
29965   __Pyx_RefNannyDeclarations
29966   int __pyx_t_1;
29967   PyObject *__pyx_t_2 = NULL;
29968   PyObject *__pyx_t_3 = NULL;
29969   PyObject *__pyx_t_4 = NULL;
29970   PyObject *__pyx_t_5 = NULL;
29971   #ifdef WITH_THREAD
29972   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29973   #endif
29974   __Pyx_RefNannySetupContext("_err", 0);
29975   __Pyx_INCREF(__pyx_v_error);
29976 
29977   /* "View.MemoryView":1259
29978  * @cname('__pyx_memoryview_err')
29979  * cdef int _err(object error, char *msg) except -1 with gil:
29980  *     if msg != NULL:             # <<<<<<<<<<<<<<
29981  *         raise error(msg.decode('ascii'))
29982  *     else:
29983  */
29984   __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
29985   if (unlikely(__pyx_t_1)) {
29986 
29987     /* "View.MemoryView":1260
29988  * cdef int _err(object error, char *msg) except -1 with gil:
29989  *     if msg != NULL:
29990  *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<
29991  *     else:
29992  *         raise error
29993  */
29994     __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(2, 1260, __pyx_L1_error)
29995     __Pyx_GOTREF(__pyx_t_3);
29996     __Pyx_INCREF(__pyx_v_error);
29997     __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
29998     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
29999       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
30000       if (likely(__pyx_t_5)) {
30001         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
30002         __Pyx_INCREF(__pyx_t_5);
30003         __Pyx_INCREF(function);
30004         __Pyx_DECREF_SET(__pyx_t_4, function);
30005       }
30006     }
30007     __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);
30008     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30009     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30010     if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1260, __pyx_L1_error)
30011     __Pyx_GOTREF(__pyx_t_2);
30012     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30013     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
30014     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30015     __PYX_ERR(2, 1260, __pyx_L1_error)
30016 
30017     /* "View.MemoryView":1259
30018  * @cname('__pyx_memoryview_err')
30019  * cdef int _err(object error, char *msg) except -1 with gil:
30020  *     if msg != NULL:             # <<<<<<<<<<<<<<
30021  *         raise error(msg.decode('ascii'))
30022  *     else:
30023  */
30024   }
30025 
30026   /* "View.MemoryView":1262
30027  *         raise error(msg.decode('ascii'))
30028  *     else:
30029  *         raise error             # <<<<<<<<<<<<<<
30030  *
30031  * @cname('__pyx_memoryview_copy_contents')
30032  */
30033   /*else*/ {
30034     __Pyx_Raise(__pyx_v_error, 0, 0, 0);
30035     __PYX_ERR(2, 1262, __pyx_L1_error)
30036   }
30037 
30038   /* "View.MemoryView":1258
30039  *
30040  * @cname('__pyx_memoryview_err')
30041  * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
30042  *     if msg != NULL:
30043  *         raise error(msg.decode('ascii'))
30044  */
30045 
30046   /* function exit code */
30047   __pyx_L1_error:;
30048   __Pyx_XDECREF(__pyx_t_2);
30049   __Pyx_XDECREF(__pyx_t_3);
30050   __Pyx_XDECREF(__pyx_t_4);
30051   __Pyx_XDECREF(__pyx_t_5);
30052   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
30053   __pyx_r = -1;
30054   __Pyx_XDECREF(__pyx_v_error);
30055   __Pyx_RefNannyFinishContext();
30056   #ifdef WITH_THREAD
30057   __Pyx_PyGILState_Release(__pyx_gilstate_save);
30058   #endif
30059   return __pyx_r;
30060 }
30061 
30062 /* "View.MemoryView":1265
30063  *
30064  * @cname('__pyx_memoryview_copy_contents')
30065  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
30066  *                                   __Pyx_memviewslice dst,
30067  *                                   int src_ndim, int dst_ndim,
30068  */
30069 
__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)30070 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) {
30071   void *__pyx_v_tmpdata;
30072   size_t __pyx_v_itemsize;
30073   int __pyx_v_i;
30074   char __pyx_v_order;
30075   int __pyx_v_broadcasting;
30076   int __pyx_v_direct_copy;
30077   __Pyx_memviewslice __pyx_v_tmp;
30078   int __pyx_v_ndim;
30079   int __pyx_r;
30080   Py_ssize_t __pyx_t_1;
30081   int __pyx_t_2;
30082   int __pyx_t_3;
30083   int __pyx_t_4;
30084   int __pyx_t_5;
30085   int __pyx_t_6;
30086   void *__pyx_t_7;
30087   int __pyx_t_8;
30088 
30089   /* "View.MemoryView":1273
30090  *     Check for overlapping memory and verify the shapes.
30091  *     """
30092  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
30093  *     cdef size_t itemsize = src.memview.view.itemsize
30094  *     cdef int i
30095  */
30096   __pyx_v_tmpdata = NULL;
30097 
30098   /* "View.MemoryView":1274
30099  *     """
30100  *     cdef void *tmpdata = NULL
30101  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
30102  *     cdef int i
30103  *     cdef char order = get_best_order(&src, src_ndim)
30104  */
30105   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
30106   __pyx_v_itemsize = __pyx_t_1;
30107 
30108   /* "View.MemoryView":1276
30109  *     cdef size_t itemsize = src.memview.view.itemsize
30110  *     cdef int i
30111  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
30112  *     cdef bint broadcasting = False
30113  *     cdef bint direct_copy = False
30114  */
30115   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
30116 
30117   /* "View.MemoryView":1277
30118  *     cdef int i
30119  *     cdef char order = get_best_order(&src, src_ndim)
30120  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
30121  *     cdef bint direct_copy = False
30122  *     cdef __Pyx_memviewslice tmp
30123  */
30124   __pyx_v_broadcasting = 0;
30125 
30126   /* "View.MemoryView":1278
30127  *     cdef char order = get_best_order(&src, src_ndim)
30128  *     cdef bint broadcasting = False
30129  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
30130  *     cdef __Pyx_memviewslice tmp
30131  *
30132  */
30133   __pyx_v_direct_copy = 0;
30134 
30135   /* "View.MemoryView":1281
30136  *     cdef __Pyx_memviewslice tmp
30137  *
30138  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
30139  *         broadcast_leading(&src, src_ndim, dst_ndim)
30140  *     elif dst_ndim < src_ndim:
30141  */
30142   __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
30143   if (__pyx_t_2) {
30144 
30145     /* "View.MemoryView":1282
30146  *
30147  *     if src_ndim < dst_ndim:
30148  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
30149  *     elif dst_ndim < src_ndim:
30150  *         broadcast_leading(&dst, dst_ndim, src_ndim)
30151  */
30152     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
30153 
30154     /* "View.MemoryView":1281
30155  *     cdef __Pyx_memviewslice tmp
30156  *
30157  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
30158  *         broadcast_leading(&src, src_ndim, dst_ndim)
30159  *     elif dst_ndim < src_ndim:
30160  */
30161     goto __pyx_L3;
30162   }
30163 
30164   /* "View.MemoryView":1283
30165  *     if src_ndim < dst_ndim:
30166  *         broadcast_leading(&src, src_ndim, dst_ndim)
30167  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
30168  *         broadcast_leading(&dst, dst_ndim, src_ndim)
30169  *
30170  */
30171   __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
30172   if (__pyx_t_2) {
30173 
30174     /* "View.MemoryView":1284
30175  *         broadcast_leading(&src, src_ndim, dst_ndim)
30176  *     elif dst_ndim < src_ndim:
30177  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
30178  *
30179  *     cdef int ndim = max(src_ndim, dst_ndim)
30180  */
30181     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
30182 
30183     /* "View.MemoryView":1283
30184  *     if src_ndim < dst_ndim:
30185  *         broadcast_leading(&src, src_ndim, dst_ndim)
30186  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
30187  *         broadcast_leading(&dst, dst_ndim, src_ndim)
30188  *
30189  */
30190   }
30191   __pyx_L3:;
30192 
30193   /* "View.MemoryView":1286
30194  *         broadcast_leading(&dst, dst_ndim, src_ndim)
30195  *
30196  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
30197  *
30198  *     for i in range(ndim):
30199  */
30200   __pyx_t_3 = __pyx_v_dst_ndim;
30201   __pyx_t_4 = __pyx_v_src_ndim;
30202   if (((__pyx_t_3 > __pyx_t_4) != 0)) {
30203     __pyx_t_5 = __pyx_t_3;
30204   } else {
30205     __pyx_t_5 = __pyx_t_4;
30206   }
30207   __pyx_v_ndim = __pyx_t_5;
30208 
30209   /* "View.MemoryView":1288
30210  *     cdef int ndim = max(src_ndim, dst_ndim)
30211  *
30212  *     for i in range(ndim):             # <<<<<<<<<<<<<<
30213  *         if src.shape[i] != dst.shape[i]:
30214  *             if src.shape[i] == 1:
30215  */
30216   __pyx_t_5 = __pyx_v_ndim;
30217   __pyx_t_3 = __pyx_t_5;
30218   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
30219     __pyx_v_i = __pyx_t_4;
30220 
30221     /* "View.MemoryView":1289
30222  *
30223  *     for i in range(ndim):
30224  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
30225  *             if src.shape[i] == 1:
30226  *                 broadcasting = True
30227  */
30228     __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
30229     if (__pyx_t_2) {
30230 
30231       /* "View.MemoryView":1290
30232  *     for i in range(ndim):
30233  *         if src.shape[i] != dst.shape[i]:
30234  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
30235  *                 broadcasting = True
30236  *                 src.strides[i] = 0
30237  */
30238       __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
30239       if (__pyx_t_2) {
30240 
30241         /* "View.MemoryView":1291
30242  *         if src.shape[i] != dst.shape[i]:
30243  *             if src.shape[i] == 1:
30244  *                 broadcasting = True             # <<<<<<<<<<<<<<
30245  *                 src.strides[i] = 0
30246  *             else:
30247  */
30248         __pyx_v_broadcasting = 1;
30249 
30250         /* "View.MemoryView":1292
30251  *             if src.shape[i] == 1:
30252  *                 broadcasting = True
30253  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
30254  *             else:
30255  *                 _err_extents(i, dst.shape[i], src.shape[i])
30256  */
30257         (__pyx_v_src.strides[__pyx_v_i]) = 0;
30258 
30259         /* "View.MemoryView":1290
30260  *     for i in range(ndim):
30261  *         if src.shape[i] != dst.shape[i]:
30262  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
30263  *                 broadcasting = True
30264  *                 src.strides[i] = 0
30265  */
30266         goto __pyx_L7;
30267       }
30268 
30269       /* "View.MemoryView":1294
30270  *                 src.strides[i] = 0
30271  *             else:
30272  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
30273  *
30274  *         if src.suboffsets[i] >= 0:
30275  */
30276       /*else*/ {
30277         __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(2, 1294, __pyx_L1_error)
30278       }
30279       __pyx_L7:;
30280 
30281       /* "View.MemoryView":1289
30282  *
30283  *     for i in range(ndim):
30284  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
30285  *             if src.shape[i] == 1:
30286  *                 broadcasting = True
30287  */
30288     }
30289 
30290     /* "View.MemoryView":1296
30291  *                 _err_extents(i, dst.shape[i], src.shape[i])
30292  *
30293  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
30294  *             _err_dim(ValueError, "Dimension %d is not direct", i)
30295  *
30296  */
30297     __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
30298     if (__pyx_t_2) {
30299 
30300       /* "View.MemoryView":1297
30301  *
30302  *         if src.suboffsets[i] >= 0:
30303  *             _err_dim(ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
30304  *
30305  *     if slices_overlap(&src, &dst, ndim, itemsize):
30306  */
30307       __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(2, 1297, __pyx_L1_error)
30308 
30309       /* "View.MemoryView":1296
30310  *                 _err_extents(i, dst.shape[i], src.shape[i])
30311  *
30312  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
30313  *             _err_dim(ValueError, "Dimension %d is not direct", i)
30314  *
30315  */
30316     }
30317   }
30318 
30319   /* "View.MemoryView":1299
30320  *             _err_dim(ValueError, "Dimension %d is not direct", i)
30321  *
30322  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
30323  *
30324  *         if not slice_is_contig(src, order, ndim):
30325  */
30326   __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
30327   if (__pyx_t_2) {
30328 
30329     /* "View.MemoryView":1301
30330  *     if slices_overlap(&src, &dst, ndim, itemsize):
30331  *
30332  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
30333  *             order = get_best_order(&dst, ndim)
30334  *
30335  */
30336     __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
30337     if (__pyx_t_2) {
30338 
30339       /* "View.MemoryView":1302
30340  *
30341  *         if not slice_is_contig(src, order, ndim):
30342  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
30343  *
30344  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
30345  */
30346       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
30347 
30348       /* "View.MemoryView":1301
30349  *     if slices_overlap(&src, &dst, ndim, itemsize):
30350  *
30351  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
30352  *             order = get_best_order(&dst, ndim)
30353  *
30354  */
30355     }
30356 
30357     /* "View.MemoryView":1304
30358  *             order = get_best_order(&dst, ndim)
30359  *
30360  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
30361  *         src = tmp
30362  *
30363  */
30364     __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(2, 1304, __pyx_L1_error)
30365     __pyx_v_tmpdata = __pyx_t_7;
30366 
30367     /* "View.MemoryView":1305
30368  *
30369  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
30370  *         src = tmp             # <<<<<<<<<<<<<<
30371  *
30372  *     if not broadcasting:
30373  */
30374     __pyx_v_src = __pyx_v_tmp;
30375 
30376     /* "View.MemoryView":1299
30377  *             _err_dim(ValueError, "Dimension %d is not direct", i)
30378  *
30379  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
30380  *
30381  *         if not slice_is_contig(src, order, ndim):
30382  */
30383   }
30384 
30385   /* "View.MemoryView":1307
30386  *         src = tmp
30387  *
30388  *     if not broadcasting:             # <<<<<<<<<<<<<<
30389  *
30390  *
30391  */
30392   __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
30393   if (__pyx_t_2) {
30394 
30395     /* "View.MemoryView":1310
30396  *
30397  *
30398  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
30399  *             direct_copy = slice_is_contig(dst, 'C', ndim)
30400  *         elif slice_is_contig(src, 'F', ndim):
30401  */
30402     __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
30403     if (__pyx_t_2) {
30404 
30405       /* "View.MemoryView":1311
30406  *
30407  *         if slice_is_contig(src, 'C', ndim):
30408  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
30409  *         elif slice_is_contig(src, 'F', ndim):
30410  *             direct_copy = slice_is_contig(dst, 'F', ndim)
30411  */
30412       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
30413 
30414       /* "View.MemoryView":1310
30415  *
30416  *
30417  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
30418  *             direct_copy = slice_is_contig(dst, 'C', ndim)
30419  *         elif slice_is_contig(src, 'F', ndim):
30420  */
30421       goto __pyx_L12;
30422     }
30423 
30424     /* "View.MemoryView":1312
30425  *         if slice_is_contig(src, 'C', ndim):
30426  *             direct_copy = slice_is_contig(dst, 'C', ndim)
30427  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
30428  *             direct_copy = slice_is_contig(dst, 'F', ndim)
30429  *
30430  */
30431     __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
30432     if (__pyx_t_2) {
30433 
30434       /* "View.MemoryView":1313
30435  *             direct_copy = slice_is_contig(dst, 'C', ndim)
30436  *         elif slice_is_contig(src, 'F', ndim):
30437  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
30438  *
30439  *         if direct_copy:
30440  */
30441       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
30442 
30443       /* "View.MemoryView":1312
30444  *         if slice_is_contig(src, 'C', ndim):
30445  *             direct_copy = slice_is_contig(dst, 'C', ndim)
30446  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
30447  *             direct_copy = slice_is_contig(dst, 'F', ndim)
30448  *
30449  */
30450     }
30451     __pyx_L12:;
30452 
30453     /* "View.MemoryView":1315
30454  *             direct_copy = slice_is_contig(dst, 'F', ndim)
30455  *
30456  *         if direct_copy:             # <<<<<<<<<<<<<<
30457  *
30458  *             refcount_copying(&dst, dtype_is_object, ndim, False)
30459  */
30460     __pyx_t_2 = (__pyx_v_direct_copy != 0);
30461     if (__pyx_t_2) {
30462 
30463       /* "View.MemoryView":1317
30464  *         if direct_copy:
30465  *
30466  *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
30467  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
30468  *             refcount_copying(&dst, dtype_is_object, ndim, True)
30469  */
30470       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
30471 
30472       /* "View.MemoryView":1318
30473  *
30474  *             refcount_copying(&dst, dtype_is_object, ndim, False)
30475  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
30476  *             refcount_copying(&dst, dtype_is_object, ndim, True)
30477  *             free(tmpdata)
30478  */
30479       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
30480 
30481       /* "View.MemoryView":1319
30482  *             refcount_copying(&dst, dtype_is_object, ndim, False)
30483  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
30484  *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
30485  *             free(tmpdata)
30486  *             return 0
30487  */
30488       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
30489 
30490       /* "View.MemoryView":1320
30491  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
30492  *             refcount_copying(&dst, dtype_is_object, ndim, True)
30493  *             free(tmpdata)             # <<<<<<<<<<<<<<
30494  *             return 0
30495  *
30496  */
30497       free(__pyx_v_tmpdata);
30498 
30499       /* "View.MemoryView":1321
30500  *             refcount_copying(&dst, dtype_is_object, ndim, True)
30501  *             free(tmpdata)
30502  *             return 0             # <<<<<<<<<<<<<<
30503  *
30504  *     if order == 'F' == get_best_order(&dst, ndim):
30505  */
30506       __pyx_r = 0;
30507       goto __pyx_L0;
30508 
30509       /* "View.MemoryView":1315
30510  *             direct_copy = slice_is_contig(dst, 'F', ndim)
30511  *
30512  *         if direct_copy:             # <<<<<<<<<<<<<<
30513  *
30514  *             refcount_copying(&dst, dtype_is_object, ndim, False)
30515  */
30516     }
30517 
30518     /* "View.MemoryView":1307
30519  *         src = tmp
30520  *
30521  *     if not broadcasting:             # <<<<<<<<<<<<<<
30522  *
30523  *
30524  */
30525   }
30526 
30527   /* "View.MemoryView":1323
30528  *             return 0
30529  *
30530  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
30531  *
30532  *
30533  */
30534   __pyx_t_2 = (__pyx_v_order == 'F');
30535   if (__pyx_t_2) {
30536     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
30537   }
30538   __pyx_t_8 = (__pyx_t_2 != 0);
30539   if (__pyx_t_8) {
30540 
30541     /* "View.MemoryView":1326
30542  *
30543  *
30544  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
30545  *         transpose_memslice(&dst)
30546  *
30547  */
30548     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(2, 1326, __pyx_L1_error)
30549 
30550     /* "View.MemoryView":1327
30551  *
30552  *         transpose_memslice(&src)
30553  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
30554  *
30555  *     refcount_copying(&dst, dtype_is_object, ndim, False)
30556  */
30557     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(2, 1327, __pyx_L1_error)
30558 
30559     /* "View.MemoryView":1323
30560  *             return 0
30561  *
30562  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
30563  *
30564  *
30565  */
30566   }
30567 
30568   /* "View.MemoryView":1329
30569  *         transpose_memslice(&dst)
30570  *
30571  *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
30572  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
30573  *     refcount_copying(&dst, dtype_is_object, ndim, True)
30574  */
30575   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
30576 
30577   /* "View.MemoryView":1330
30578  *
30579  *     refcount_copying(&dst, dtype_is_object, ndim, False)
30580  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
30581  *     refcount_copying(&dst, dtype_is_object, ndim, True)
30582  *
30583  */
30584   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
30585 
30586   /* "View.MemoryView":1331
30587  *     refcount_copying(&dst, dtype_is_object, ndim, False)
30588  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
30589  *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
30590  *
30591  *     free(tmpdata)
30592  */
30593   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
30594 
30595   /* "View.MemoryView":1333
30596  *     refcount_copying(&dst, dtype_is_object, ndim, True)
30597  *
30598  *     free(tmpdata)             # <<<<<<<<<<<<<<
30599  *     return 0
30600  *
30601  */
30602   free(__pyx_v_tmpdata);
30603 
30604   /* "View.MemoryView":1334
30605  *
30606  *     free(tmpdata)
30607  *     return 0             # <<<<<<<<<<<<<<
30608  *
30609  * @cname('__pyx_memoryview_broadcast_leading')
30610  */
30611   __pyx_r = 0;
30612   goto __pyx_L0;
30613 
30614   /* "View.MemoryView":1265
30615  *
30616  * @cname('__pyx_memoryview_copy_contents')
30617  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
30618  *                                   __Pyx_memviewslice dst,
30619  *                                   int src_ndim, int dst_ndim,
30620  */
30621 
30622   /* function exit code */
30623   __pyx_L1_error:;
30624   {
30625     #ifdef WITH_THREAD
30626     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
30627     #endif
30628     __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
30629     #ifdef WITH_THREAD
30630     __Pyx_PyGILState_Release(__pyx_gilstate_save);
30631     #endif
30632   }
30633   __pyx_r = -1;
30634   __pyx_L0:;
30635   return __pyx_r;
30636 }
30637 
30638 /* "View.MemoryView":1337
30639  *
30640  * @cname('__pyx_memoryview_broadcast_leading')
30641  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
30642  *                             int ndim,
30643  *                             int ndim_other) nogil:
30644  */
30645 
__pyx_memoryview_broadcast_leading(__Pyx_memviewslice * __pyx_v_mslice,int __pyx_v_ndim,int __pyx_v_ndim_other)30646 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
30647   int __pyx_v_i;
30648   int __pyx_v_offset;
30649   int __pyx_t_1;
30650   int __pyx_t_2;
30651   int __pyx_t_3;
30652 
30653   /* "View.MemoryView":1341
30654  *                             int ndim_other) nogil:
30655  *     cdef int i
30656  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
30657  *
30658  *     for i in range(ndim - 1, -1, -1):
30659  */
30660   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
30661 
30662   /* "View.MemoryView":1343
30663  *     cdef int offset = ndim_other - ndim
30664  *
30665  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
30666  *         mslice.shape[i + offset] = mslice.shape[i]
30667  *         mslice.strides[i + offset] = mslice.strides[i]
30668  */
30669   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
30670     __pyx_v_i = __pyx_t_1;
30671 
30672     /* "View.MemoryView":1344
30673  *
30674  *     for i in range(ndim - 1, -1, -1):
30675  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
30676  *         mslice.strides[i + offset] = mslice.strides[i]
30677  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
30678  */
30679     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
30680 
30681     /* "View.MemoryView":1345
30682  *     for i in range(ndim - 1, -1, -1):
30683  *         mslice.shape[i + offset] = mslice.shape[i]
30684  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
30685  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
30686  *
30687  */
30688     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
30689 
30690     /* "View.MemoryView":1346
30691  *         mslice.shape[i + offset] = mslice.shape[i]
30692  *         mslice.strides[i + offset] = mslice.strides[i]
30693  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
30694  *
30695  *     for i in range(offset):
30696  */
30697     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
30698   }
30699 
30700   /* "View.MemoryView":1348
30701  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
30702  *
30703  *     for i in range(offset):             # <<<<<<<<<<<<<<
30704  *         mslice.shape[i] = 1
30705  *         mslice.strides[i] = mslice.strides[0]
30706  */
30707   __pyx_t_1 = __pyx_v_offset;
30708   __pyx_t_2 = __pyx_t_1;
30709   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
30710     __pyx_v_i = __pyx_t_3;
30711 
30712     /* "View.MemoryView":1349
30713  *
30714  *     for i in range(offset):
30715  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
30716  *         mslice.strides[i] = mslice.strides[0]
30717  *         mslice.suboffsets[i] = -1
30718  */
30719     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
30720 
30721     /* "View.MemoryView":1350
30722  *     for i in range(offset):
30723  *         mslice.shape[i] = 1
30724  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
30725  *         mslice.suboffsets[i] = -1
30726  *
30727  */
30728     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
30729 
30730     /* "View.MemoryView":1351
30731  *         mslice.shape[i] = 1
30732  *         mslice.strides[i] = mslice.strides[0]
30733  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
30734  *
30735  *
30736  */
30737     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
30738   }
30739 
30740   /* "View.MemoryView":1337
30741  *
30742  * @cname('__pyx_memoryview_broadcast_leading')
30743  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
30744  *                             int ndim,
30745  *                             int ndim_other) nogil:
30746  */
30747 
30748   /* function exit code */
30749 }
30750 
30751 /* "View.MemoryView":1359
30752  *
30753  * @cname('__pyx_memoryview_refcount_copying')
30754  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
30755  *                            int ndim, bint inc) nogil:
30756  *
30757  */
30758 
__pyx_memoryview_refcount_copying(__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_dtype_is_object,int __pyx_v_ndim,int __pyx_v_inc)30759 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) {
30760   int __pyx_t_1;
30761 
30762   /* "View.MemoryView":1363
30763  *
30764  *
30765  *     if dtype_is_object:             # <<<<<<<<<<<<<<
30766  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
30767  *                                            dst.strides, ndim, inc)
30768  */
30769   __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
30770   if (__pyx_t_1) {
30771 
30772     /* "View.MemoryView":1364
30773  *
30774  *     if dtype_is_object:
30775  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<
30776  *                                            dst.strides, ndim, inc)
30777  *
30778  */
30779     __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);
30780 
30781     /* "View.MemoryView":1363
30782  *
30783  *
30784  *     if dtype_is_object:             # <<<<<<<<<<<<<<
30785  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
30786  *                                            dst.strides, ndim, inc)
30787  */
30788   }
30789 
30790   /* "View.MemoryView":1359
30791  *
30792  * @cname('__pyx_memoryview_refcount_copying')
30793  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
30794  *                            int ndim, bint inc) nogil:
30795  *
30796  */
30797 
30798   /* function exit code */
30799 }
30800 
30801 /* "View.MemoryView":1368
30802  *
30803  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
30804  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
30805  *                                              Py_ssize_t *strides, int ndim,
30806  *                                              bint inc) with gil:
30807  */
30808 
__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)30809 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) {
30810   __Pyx_RefNannyDeclarations
30811   #ifdef WITH_THREAD
30812   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
30813   #endif
30814   __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
30815 
30816   /* "View.MemoryView":1371
30817  *                                              Py_ssize_t *strides, int ndim,
30818  *                                              bint inc) with gil:
30819  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
30820  *
30821  * @cname('__pyx_memoryview_refcount_objects_in_slice')
30822  */
30823   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
30824 
30825   /* "View.MemoryView":1368
30826  *
30827  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
30828  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
30829  *                                              Py_ssize_t *strides, int ndim,
30830  *                                              bint inc) with gil:
30831  */
30832 
30833   /* function exit code */
30834   __Pyx_RefNannyFinishContext();
30835   #ifdef WITH_THREAD
30836   __Pyx_PyGILState_Release(__pyx_gilstate_save);
30837   #endif
30838 }
30839 
30840 /* "View.MemoryView":1374
30841  *
30842  * @cname('__pyx_memoryview_refcount_objects_in_slice')
30843  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
30844  *                                     Py_ssize_t *strides, int ndim, bint inc):
30845  *     cdef Py_ssize_t i
30846  */
30847 
__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)30848 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) {
30849   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
30850   __Pyx_RefNannyDeclarations
30851   Py_ssize_t __pyx_t_1;
30852   Py_ssize_t __pyx_t_2;
30853   Py_ssize_t __pyx_t_3;
30854   int __pyx_t_4;
30855   __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
30856 
30857   /* "View.MemoryView":1378
30858  *     cdef Py_ssize_t i
30859  *
30860  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
30861  *         if ndim == 1:
30862  *             if inc:
30863  */
30864   __pyx_t_1 = (__pyx_v_shape[0]);
30865   __pyx_t_2 = __pyx_t_1;
30866   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
30867     __pyx_v_i = __pyx_t_3;
30868 
30869     /* "View.MemoryView":1379
30870  *
30871  *     for i in range(shape[0]):
30872  *         if ndim == 1:             # <<<<<<<<<<<<<<
30873  *             if inc:
30874  *                 Py_INCREF((<PyObject **> data)[0])
30875  */
30876     __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
30877     if (__pyx_t_4) {
30878 
30879       /* "View.MemoryView":1380
30880  *     for i in range(shape[0]):
30881  *         if ndim == 1:
30882  *             if inc:             # <<<<<<<<<<<<<<
30883  *                 Py_INCREF((<PyObject **> data)[0])
30884  *             else:
30885  */
30886       __pyx_t_4 = (__pyx_v_inc != 0);
30887       if (__pyx_t_4) {
30888 
30889         /* "View.MemoryView":1381
30890  *         if ndim == 1:
30891  *             if inc:
30892  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
30893  *             else:
30894  *                 Py_DECREF((<PyObject **> data)[0])
30895  */
30896         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
30897 
30898         /* "View.MemoryView":1380
30899  *     for i in range(shape[0]):
30900  *         if ndim == 1:
30901  *             if inc:             # <<<<<<<<<<<<<<
30902  *                 Py_INCREF((<PyObject **> data)[0])
30903  *             else:
30904  */
30905         goto __pyx_L6;
30906       }
30907 
30908       /* "View.MemoryView":1383
30909  *                 Py_INCREF((<PyObject **> data)[0])
30910  *             else:
30911  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
30912  *         else:
30913  *             refcount_objects_in_slice(data, shape + 1, strides + 1,
30914  */
30915       /*else*/ {
30916         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
30917       }
30918       __pyx_L6:;
30919 
30920       /* "View.MemoryView":1379
30921  *
30922  *     for i in range(shape[0]):
30923  *         if ndim == 1:             # <<<<<<<<<<<<<<
30924  *             if inc:
30925  *                 Py_INCREF((<PyObject **> data)[0])
30926  */
30927       goto __pyx_L5;
30928     }
30929 
30930     /* "View.MemoryView":1385
30931  *                 Py_DECREF((<PyObject **> data)[0])
30932  *         else:
30933  *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
30934  *                                       ndim - 1, inc)
30935  *
30936  */
30937     /*else*/ {
30938 
30939       /* "View.MemoryView":1386
30940  *         else:
30941  *             refcount_objects_in_slice(data, shape + 1, strides + 1,
30942  *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<
30943  *
30944  *         data += strides[0]
30945  */
30946       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
30947     }
30948     __pyx_L5:;
30949 
30950     /* "View.MemoryView":1388
30951  *                                       ndim - 1, inc)
30952  *
30953  *         data += strides[0]             # <<<<<<<<<<<<<<
30954  *
30955  *
30956  */
30957     __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
30958   }
30959 
30960   /* "View.MemoryView":1374
30961  *
30962  * @cname('__pyx_memoryview_refcount_objects_in_slice')
30963  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
30964  *                                     Py_ssize_t *strides, int ndim, bint inc):
30965  *     cdef Py_ssize_t i
30966  */
30967 
30968   /* function exit code */
30969   __Pyx_RefNannyFinishContext();
30970 }
30971 
30972 /* "View.MemoryView":1394
30973  *
30974  * @cname('__pyx_memoryview_slice_assign_scalar')
30975  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
30976  *                               size_t itemsize, void *item,
30977  *                               bint dtype_is_object) nogil:
30978  */
30979 
__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)30980 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) {
30981 
30982   /* "View.MemoryView":1397
30983  *                               size_t itemsize, void *item,
30984  *                               bint dtype_is_object) nogil:
30985  *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
30986  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
30987  *                          itemsize, item)
30988  */
30989   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
30990 
30991   /* "View.MemoryView":1398
30992  *                               bint dtype_is_object) nogil:
30993  *     refcount_copying(dst, dtype_is_object, ndim, False)
30994  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<
30995  *                          itemsize, item)
30996  *     refcount_copying(dst, dtype_is_object, ndim, True)
30997  */
30998   __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);
30999 
31000   /* "View.MemoryView":1400
31001  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
31002  *                          itemsize, item)
31003  *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
31004  *
31005  *
31006  */
31007   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
31008 
31009   /* "View.MemoryView":1394
31010  *
31011  * @cname('__pyx_memoryview_slice_assign_scalar')
31012  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
31013  *                               size_t itemsize, void *item,
31014  *                               bint dtype_is_object) nogil:
31015  */
31016 
31017   /* function exit code */
31018 }
31019 
31020 /* "View.MemoryView":1404
31021  *
31022  * @cname('__pyx_memoryview__slice_assign_scalar')
31023  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
31024  *                               Py_ssize_t *strides, int ndim,
31025  *                               size_t itemsize, void *item) nogil:
31026  */
31027 
__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)31028 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) {
31029   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
31030   Py_ssize_t __pyx_v_stride;
31031   Py_ssize_t __pyx_v_extent;
31032   int __pyx_t_1;
31033   Py_ssize_t __pyx_t_2;
31034   Py_ssize_t __pyx_t_3;
31035   Py_ssize_t __pyx_t_4;
31036 
31037   /* "View.MemoryView":1408
31038  *                               size_t itemsize, void *item) nogil:
31039  *     cdef Py_ssize_t i
31040  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
31041  *     cdef Py_ssize_t extent = shape[0]
31042  *
31043  */
31044   __pyx_v_stride = (__pyx_v_strides[0]);
31045 
31046   /* "View.MemoryView":1409
31047  *     cdef Py_ssize_t i
31048  *     cdef Py_ssize_t stride = strides[0]
31049  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
31050  *
31051  *     if ndim == 1:
31052  */
31053   __pyx_v_extent = (__pyx_v_shape[0]);
31054 
31055   /* "View.MemoryView":1411
31056  *     cdef Py_ssize_t extent = shape[0]
31057  *
31058  *     if ndim == 1:             # <<<<<<<<<<<<<<
31059  *         for i in range(extent):
31060  *             memcpy(data, item, itemsize)
31061  */
31062   __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
31063   if (__pyx_t_1) {
31064 
31065     /* "View.MemoryView":1412
31066  *
31067  *     if ndim == 1:
31068  *         for i in range(extent):             # <<<<<<<<<<<<<<
31069  *             memcpy(data, item, itemsize)
31070  *             data += stride
31071  */
31072     __pyx_t_2 = __pyx_v_extent;
31073     __pyx_t_3 = __pyx_t_2;
31074     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31075       __pyx_v_i = __pyx_t_4;
31076 
31077       /* "View.MemoryView":1413
31078  *     if ndim == 1:
31079  *         for i in range(extent):
31080  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
31081  *             data += stride
31082  *     else:
31083  */
31084       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
31085 
31086       /* "View.MemoryView":1414
31087  *         for i in range(extent):
31088  *             memcpy(data, item, itemsize)
31089  *             data += stride             # <<<<<<<<<<<<<<
31090  *     else:
31091  *         for i in range(extent):
31092  */
31093       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
31094     }
31095 
31096     /* "View.MemoryView":1411
31097  *     cdef Py_ssize_t extent = shape[0]
31098  *
31099  *     if ndim == 1:             # <<<<<<<<<<<<<<
31100  *         for i in range(extent):
31101  *             memcpy(data, item, itemsize)
31102  */
31103     goto __pyx_L3;
31104   }
31105 
31106   /* "View.MemoryView":1416
31107  *             data += stride
31108  *     else:
31109  *         for i in range(extent):             # <<<<<<<<<<<<<<
31110  *             _slice_assign_scalar(data, shape + 1, strides + 1,
31111  *                                 ndim - 1, itemsize, item)
31112  */
31113   /*else*/ {
31114     __pyx_t_2 = __pyx_v_extent;
31115     __pyx_t_3 = __pyx_t_2;
31116     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31117       __pyx_v_i = __pyx_t_4;
31118 
31119       /* "View.MemoryView":1417
31120  *     else:
31121  *         for i in range(extent):
31122  *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
31123  *                                 ndim - 1, itemsize, item)
31124  *             data += stride
31125  */
31126       __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);
31127 
31128       /* "View.MemoryView":1419
31129  *             _slice_assign_scalar(data, shape + 1, strides + 1,
31130  *                                 ndim - 1, itemsize, item)
31131  *             data += stride             # <<<<<<<<<<<<<<
31132  *
31133  *
31134  */
31135       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
31136     }
31137   }
31138   __pyx_L3:;
31139 
31140   /* "View.MemoryView":1404
31141  *
31142  * @cname('__pyx_memoryview__slice_assign_scalar')
31143  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
31144  *                               Py_ssize_t *strides, int ndim,
31145  *                               size_t itemsize, void *item) nogil:
31146  */
31147 
31148   /* function exit code */
31149 }
31150 
31151 /* "(tree fragment)":1
31152  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
31153  *     cdef object __pyx_PickleError
31154  *     cdef object __pyx_result
31155  */
31156 
31157 /* Python wrapper */
31158 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31159 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};
__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)31160 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31161   PyObject *__pyx_v___pyx_type = 0;
31162   long __pyx_v___pyx_checksum;
31163   PyObject *__pyx_v___pyx_state = 0;
31164   PyObject *__pyx_r = 0;
31165   __Pyx_RefNannyDeclarations
31166   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
31167   {
31168     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
31169     PyObject* values[3] = {0,0,0};
31170     if (unlikely(__pyx_kwds)) {
31171       Py_ssize_t kw_args;
31172       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31173       switch (pos_args) {
31174         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31175         CYTHON_FALLTHROUGH;
31176         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31177         CYTHON_FALLTHROUGH;
31178         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31179         CYTHON_FALLTHROUGH;
31180         case  0: break;
31181         default: goto __pyx_L5_argtuple_error;
31182       }
31183       kw_args = PyDict_Size(__pyx_kwds);
31184       switch (pos_args) {
31185         case  0:
31186         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
31187         else goto __pyx_L5_argtuple_error;
31188         CYTHON_FALLTHROUGH;
31189         case  1:
31190         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
31191         else {
31192           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
31193         }
31194         CYTHON_FALLTHROUGH;
31195         case  2:
31196         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
31197         else {
31198           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
31199         }
31200       }
31201       if (unlikely(kw_args > 0)) {
31202         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
31203       }
31204     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
31205       goto __pyx_L5_argtuple_error;
31206     } else {
31207       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31208       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31209       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31210     }
31211     __pyx_v___pyx_type = values[0];
31212     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
31213     __pyx_v___pyx_state = values[2];
31214   }
31215   goto __pyx_L4_argument_unpacking_done;
31216   __pyx_L5_argtuple_error:;
31217   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
31218   __pyx_L3_error:;
31219   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
31220   __Pyx_RefNannyFinishContext();
31221   return NULL;
31222   __pyx_L4_argument_unpacking_done:;
31223   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
31224 
31225   /* function exit code */
31226   __Pyx_RefNannyFinishContext();
31227   return __pyx_r;
31228 }
31229 
__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)31230 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) {
31231   PyObject *__pyx_v___pyx_PickleError = 0;
31232   PyObject *__pyx_v___pyx_result = 0;
31233   PyObject *__pyx_r = NULL;
31234   __Pyx_RefNannyDeclarations
31235   int __pyx_t_1;
31236   PyObject *__pyx_t_2 = NULL;
31237   PyObject *__pyx_t_3 = NULL;
31238   PyObject *__pyx_t_4 = NULL;
31239   PyObject *__pyx_t_5 = NULL;
31240   int __pyx_t_6;
31241   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
31242 
31243   /* "(tree fragment)":4
31244  *     cdef object __pyx_PickleError
31245  *     cdef object __pyx_result
31246  *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
31247  *         from pickle import PickleError as __pyx_PickleError
31248  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
31249  */
31250   __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
31251   if (__pyx_t_1) {
31252 
31253     /* "(tree fragment)":5
31254  *     cdef object __pyx_result
31255  *     if __pyx_checksum != 0xb068931:
31256  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
31257  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
31258  *     __pyx_result = Enum.__new__(__pyx_type)
31259  */
31260     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
31261     __Pyx_GOTREF(__pyx_t_2);
31262     __Pyx_INCREF(__pyx_n_s_PickleError);
31263     __Pyx_GIVEREF(__pyx_n_s_PickleError);
31264     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
31265     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
31266     __Pyx_GOTREF(__pyx_t_3);
31267     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31268     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
31269     __Pyx_GOTREF(__pyx_t_2);
31270     __Pyx_INCREF(__pyx_t_2);
31271     __pyx_v___pyx_PickleError = __pyx_t_2;
31272     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31273     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31274 
31275     /* "(tree fragment)":6
31276  *     if __pyx_checksum != 0xb068931:
31277  *         from pickle import PickleError as __pyx_PickleError
31278  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
31279  *     __pyx_result = Enum.__new__(__pyx_type)
31280  *     if __pyx_state is not None:
31281  */
31282     __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
31283     __Pyx_GOTREF(__pyx_t_2);
31284     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
31285     __Pyx_GOTREF(__pyx_t_4);
31286     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31287     __Pyx_INCREF(__pyx_v___pyx_PickleError);
31288     __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
31289     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
31290       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
31291       if (likely(__pyx_t_5)) {
31292         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
31293         __Pyx_INCREF(__pyx_t_5);
31294         __Pyx_INCREF(function);
31295         __Pyx_DECREF_SET(__pyx_t_2, function);
31296       }
31297     }
31298     __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
31299     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
31300     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31301     if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
31302     __Pyx_GOTREF(__pyx_t_3);
31303     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31304     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31305     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31306     __PYX_ERR(2, 6, __pyx_L1_error)
31307 
31308     /* "(tree fragment)":4
31309  *     cdef object __pyx_PickleError
31310  *     cdef object __pyx_result
31311  *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
31312  *         from pickle import PickleError as __pyx_PickleError
31313  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
31314  */
31315   }
31316 
31317   /* "(tree fragment)":7
31318  *         from pickle import PickleError as __pyx_PickleError
31319  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
31320  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
31321  *     if __pyx_state is not None:
31322  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
31323  */
31324   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
31325   __Pyx_GOTREF(__pyx_t_2);
31326   __pyx_t_4 = NULL;
31327   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
31328     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
31329     if (likely(__pyx_t_4)) {
31330       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
31331       __Pyx_INCREF(__pyx_t_4);
31332       __Pyx_INCREF(function);
31333       __Pyx_DECREF_SET(__pyx_t_2, function);
31334     }
31335   }
31336   __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
31337   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
31338   if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
31339   __Pyx_GOTREF(__pyx_t_3);
31340   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31341   __pyx_v___pyx_result = __pyx_t_3;
31342   __pyx_t_3 = 0;
31343 
31344   /* "(tree fragment)":8
31345  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
31346  *     __pyx_result = Enum.__new__(__pyx_type)
31347  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
31348  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
31349  *     return __pyx_result
31350  */
31351   __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
31352   __pyx_t_6 = (__pyx_t_1 != 0);
31353   if (__pyx_t_6) {
31354 
31355     /* "(tree fragment)":9
31356  *     __pyx_result = Enum.__new__(__pyx_type)
31357  *     if __pyx_state is not None:
31358  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
31359  *     return __pyx_result
31360  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
31361  */
31362     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(2, 9, __pyx_L1_error)
31363     __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
31364     __Pyx_GOTREF(__pyx_t_3);
31365     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31366 
31367     /* "(tree fragment)":8
31368  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
31369  *     __pyx_result = Enum.__new__(__pyx_type)
31370  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
31371  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
31372  *     return __pyx_result
31373  */
31374   }
31375 
31376   /* "(tree fragment)":10
31377  *     if __pyx_state is not None:
31378  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
31379  *     return __pyx_result             # <<<<<<<<<<<<<<
31380  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
31381  *     __pyx_result.name = __pyx_state[0]
31382  */
31383   __Pyx_XDECREF(__pyx_r);
31384   __Pyx_INCREF(__pyx_v___pyx_result);
31385   __pyx_r = __pyx_v___pyx_result;
31386   goto __pyx_L0;
31387 
31388   /* "(tree fragment)":1
31389  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
31390  *     cdef object __pyx_PickleError
31391  *     cdef object __pyx_result
31392  */
31393 
31394   /* function exit code */
31395   __pyx_L1_error:;
31396   __Pyx_XDECREF(__pyx_t_2);
31397   __Pyx_XDECREF(__pyx_t_3);
31398   __Pyx_XDECREF(__pyx_t_4);
31399   __Pyx_XDECREF(__pyx_t_5);
31400   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
31401   __pyx_r = NULL;
31402   __pyx_L0:;
31403   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
31404   __Pyx_XDECREF(__pyx_v___pyx_result);
31405   __Pyx_XGIVEREF(__pyx_r);
31406   __Pyx_RefNannyFinishContext();
31407   return __pyx_r;
31408 }
31409 
31410 /* "(tree fragment)":11
31411  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
31412  *     return __pyx_result
31413  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
31414  *     __pyx_result.name = __pyx_state[0]
31415  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
31416  */
31417 
__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)31418 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
31419   PyObject *__pyx_r = NULL;
31420   __Pyx_RefNannyDeclarations
31421   PyObject *__pyx_t_1 = NULL;
31422   int __pyx_t_2;
31423   Py_ssize_t __pyx_t_3;
31424   int __pyx_t_4;
31425   int __pyx_t_5;
31426   PyObject *__pyx_t_6 = NULL;
31427   PyObject *__pyx_t_7 = NULL;
31428   PyObject *__pyx_t_8 = NULL;
31429   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
31430 
31431   /* "(tree fragment)":12
31432  *     return __pyx_result
31433  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
31434  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
31435  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
31436  *         __pyx_result.__dict__.update(__pyx_state[1])
31437  */
31438   if (unlikely(__pyx_v___pyx_state == Py_None)) {
31439     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
31440     __PYX_ERR(2, 12, __pyx_L1_error)
31441   }
31442   __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(2, 12, __pyx_L1_error)
31443   __Pyx_GOTREF(__pyx_t_1);
31444   __Pyx_GIVEREF(__pyx_t_1);
31445   __Pyx_GOTREF(__pyx_v___pyx_result->name);
31446   __Pyx_DECREF(__pyx_v___pyx_result->name);
31447   __pyx_v___pyx_result->name = __pyx_t_1;
31448   __pyx_t_1 = 0;
31449 
31450   /* "(tree fragment)":13
31451  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
31452  *     __pyx_result.name = __pyx_state[0]
31453  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
31454  *         __pyx_result.__dict__.update(__pyx_state[1])
31455  */
31456   if (unlikely(__pyx_v___pyx_state == Py_None)) {
31457     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
31458     __PYX_ERR(2, 13, __pyx_L1_error)
31459   }
31460   __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
31461   __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
31462   if (__pyx_t_4) {
31463   } else {
31464     __pyx_t_2 = __pyx_t_4;
31465     goto __pyx_L4_bool_binop_done;
31466   }
31467   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
31468   __pyx_t_5 = (__pyx_t_4 != 0);
31469   __pyx_t_2 = __pyx_t_5;
31470   __pyx_L4_bool_binop_done:;
31471   if (__pyx_t_2) {
31472 
31473     /* "(tree fragment)":14
31474  *     __pyx_result.name = __pyx_state[0]
31475  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
31476  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
31477  */
31478     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
31479     __Pyx_GOTREF(__pyx_t_6);
31480     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
31481     __Pyx_GOTREF(__pyx_t_7);
31482     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
31483     if (unlikely(__pyx_v___pyx_state == Py_None)) {
31484       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
31485       __PYX_ERR(2, 14, __pyx_L1_error)
31486     }
31487     __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(2, 14, __pyx_L1_error)
31488     __Pyx_GOTREF(__pyx_t_6);
31489     __pyx_t_8 = NULL;
31490     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
31491       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
31492       if (likely(__pyx_t_8)) {
31493         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
31494         __Pyx_INCREF(__pyx_t_8);
31495         __Pyx_INCREF(function);
31496         __Pyx_DECREF_SET(__pyx_t_7, function);
31497       }
31498     }
31499     __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);
31500     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
31501     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
31502     if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
31503     __Pyx_GOTREF(__pyx_t_1);
31504     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
31505     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31506 
31507     /* "(tree fragment)":13
31508  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
31509  *     __pyx_result.name = __pyx_state[0]
31510  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
31511  *         __pyx_result.__dict__.update(__pyx_state[1])
31512  */
31513   }
31514 
31515   /* "(tree fragment)":11
31516  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
31517  *     return __pyx_result
31518  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
31519  *     __pyx_result.name = __pyx_state[0]
31520  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
31521  */
31522 
31523   /* function exit code */
31524   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31525   goto __pyx_L0;
31526   __pyx_L1_error:;
31527   __Pyx_XDECREF(__pyx_t_1);
31528   __Pyx_XDECREF(__pyx_t_6);
31529   __Pyx_XDECREF(__pyx_t_7);
31530   __Pyx_XDECREF(__pyx_t_8);
31531   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
31532   __pyx_r = 0;
31533   __pyx_L0:;
31534   __Pyx_XGIVEREF(__pyx_r);
31535   __Pyx_RefNannyFinishContext();
31536   return __pyx_r;
31537 }
31538 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation __pyx_vtable_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
31539 
__pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)31540 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
31541   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *p;
31542   PyObject *o;
31543   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
31544     o = (*t->tp_alloc)(t, 0);
31545   } else {
31546     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
31547   }
31548   if (unlikely(!o)) return 0;
31549   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)o);
31550   p->__pyx_vtab = __pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
31551   p->nvals = Py_None; Py_INCREF(Py_None);
31552   return o;
31553 }
31554 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyObject * o)31555 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyObject *o) {
31556   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)o;
31557   #if CYTHON_USE_TP_FINALIZE
31558   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
31559     if (PyObject_CallFinalizerFromDealloc(o)) return;
31560   }
31561   #endif
31562   PyObject_GC_UnTrack(o);
31563   Py_CLEAR(p->nvals);
31564   (*Py_TYPE(o)->tp_free)(o);
31565 }
31566 
__pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyObject * o,visitproc v,void * a)31567 static int __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyObject *o, visitproc v, void *a) {
31568   int e;
31569   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)o;
31570   if (p->nvals) {
31571     e = (*v)(p->nvals, a); if (e) return e;
31572   }
31573   return 0;
31574 }
31575 
__pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyObject * o)31576 static int __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation(PyObject *o) {
31577   PyObject* tmp;
31578   struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *)o;
31579   tmp = ((PyObject*)p->nvals);
31580   p->nvals = Py_None; Py_INCREF(Py_None);
31581   Py_XDECREF(tmp);
31582   return 0;
31583 }
31584 
__pyx_getprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_nvals(PyObject * o,CYTHON_UNUSED void * x)31585 static PyObject *__pyx_getprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_nvals(PyObject *o, CYTHON_UNUSED void *x) {
31586   return __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_1__get__(o);
31587 }
31588 
__pyx_setprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_nvals(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)31589 static int __pyx_setprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_nvals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
31590   if (v) {
31591     return __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_3__set__(o, v);
31592   }
31593   else {
31594     return __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5nvals_5__del__(o);
31595   }
31596 }
31597 
__pyx_getprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_update_values(PyObject * o,CYTHON_UNUSED void * x)31598 static PyObject *__pyx_getprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_update_values(PyObject *o, CYTHON_UNUSED void *x) {
31599   return __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_1__get__(o);
31600 }
31601 
__pyx_setprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_update_values(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)31602 static int __pyx_setprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_update_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
31603   if (v) {
31604     return __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13update_values_3__set__(o, v);
31605   }
31606   else {
31607     PyErr_SetString(PyExc_NotImplementedError, "__del__");
31608     return -1;
31609   }
31610 }
31611 
31612 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_ParticleDepositOperation[] = {
31613   {"initialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_3initialize, METH_VARARGS|METH_KEYWORDS, 0},
31614   {"finalize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_5finalize, METH_VARARGS|METH_KEYWORDS, 0},
31615   {"process_octree", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_7process_octree, METH_VARARGS|METH_KEYWORDS, 0},
31616   {"process_grid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_9process_grid, METH_VARARGS|METH_KEYWORDS, 0},
31617   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_11__reduce_cython__, METH_NOARGS, 0},
31618   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_13__setstate_cython__, METH_O, 0},
31619   {0, 0, 0, 0}
31620 };
31621 
31622 static struct PyGetSetDef __pyx_getsets_2yt_8geometry_16particle_deposit_ParticleDepositOperation[] = {
31623   {(char *)"nvals", __pyx_getprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_nvals, __pyx_setprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_nvals, (char *)0, 0},
31624   {(char *)"update_values", __pyx_getprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_update_values, __pyx_setprop_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_update_values, (char *)0, 0},
31625   {0, 0, 0, 0, 0}
31626 };
31627 
31628 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation = {
31629   PyVarObject_HEAD_INIT(0, 0)
31630   "yt.geometry.particle_deposit.ParticleDepositOperation", /*tp_name*/
31631   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation), /*tp_basicsize*/
31632   0, /*tp_itemsize*/
31633   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_dealloc*/
31634   0, /*tp_print*/
31635   0, /*tp_getattr*/
31636   0, /*tp_setattr*/
31637   #if PY_MAJOR_VERSION < 3
31638   0, /*tp_compare*/
31639   #endif
31640   #if PY_MAJOR_VERSION >= 3
31641   0, /*tp_as_async*/
31642   #endif
31643   0, /*tp_repr*/
31644   0, /*tp_as_number*/
31645   0, /*tp_as_sequence*/
31646   0, /*tp_as_mapping*/
31647   0, /*tp_hash*/
31648   0, /*tp_call*/
31649   0, /*tp_str*/
31650   0, /*tp_getattro*/
31651   0, /*tp_setattro*/
31652   0, /*tp_as_buffer*/
31653   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
31654   0, /*tp_doc*/
31655   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
31656   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
31657   0, /*tp_richcompare*/
31658   0, /*tp_weaklistoffset*/
31659   0, /*tp_iter*/
31660   0, /*tp_iternext*/
31661   __pyx_methods_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_methods*/
31662   0, /*tp_members*/
31663   __pyx_getsets_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_getset*/
31664   0, /*tp_base*/
31665   0, /*tp_dict*/
31666   0, /*tp_descr_get*/
31667   0, /*tp_descr_set*/
31668   0, /*tp_dictoffset*/
31669   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
31670   0, /*tp_alloc*/
31671   __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_new*/
31672   0, /*tp_free*/
31673   0, /*tp_is_gc*/
31674   0, /*tp_bases*/
31675   0, /*tp_mro*/
31676   0, /*tp_cache*/
31677   0, /*tp_subclasses*/
31678   0, /*tp_weaklist*/
31679   0, /*tp_del*/
31680   0, /*tp_version_tag*/
31681   #if PY_VERSION_HEX >= 0x030400a1
31682   0, /*tp_finalize*/
31683   #endif
31684   #if PY_VERSION_HEX >= 0x030800b1
31685   0, /*tp_vectorcall*/
31686   #endif
31687 };
31688 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CountParticles __pyx_vtable_2yt_8geometry_16particle_deposit_CountParticles;
31689 
__pyx_tp_new_2yt_8geometry_16particle_deposit_CountParticles(PyTypeObject * t,PyObject * a,PyObject * k)31690 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_CountParticles(PyTypeObject *t, PyObject *a, PyObject *k) {
31691   struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *p;
31692   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
31693   if (unlikely(!o)) return 0;
31694   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *)o);
31695   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_CountParticles;
31696   p->count.data = NULL;
31697   p->count.memview = NULL;
31698   return o;
31699 }
31700 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CountParticles(PyObject * o)31701 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CountParticles(PyObject *o) {
31702   struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles *)o;
31703   #if CYTHON_USE_TP_FINALIZE
31704   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
31705     if (PyObject_CallFinalizerFromDealloc(o)) return;
31706   }
31707   #endif
31708   PyObject_GC_UnTrack(o);
31709   __PYX_XDEC_MEMVIEW(&p->count, 1);
31710   PyObject_GC_Track(o);
31711   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
31712 }
31713 
31714 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_CountParticles[] = {
31715   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_1initialize, METH_NOARGS, 0},
31716   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_3finalize, METH_NOARGS, 0},
31717   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_5__reduce_cython__, METH_NOARGS, 0},
31718   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CountParticles_7__setstate_cython__, METH_O, 0},
31719   {0, 0, 0, 0}
31720 };
31721 
31722 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_CountParticles = {
31723   PyVarObject_HEAD_INIT(0, 0)
31724   "yt.geometry.particle_deposit.CountParticles", /*tp_name*/
31725   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_CountParticles), /*tp_basicsize*/
31726   0, /*tp_itemsize*/
31727   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CountParticles, /*tp_dealloc*/
31728   0, /*tp_print*/
31729   0, /*tp_getattr*/
31730   0, /*tp_setattr*/
31731   #if PY_MAJOR_VERSION < 3
31732   0, /*tp_compare*/
31733   #endif
31734   #if PY_MAJOR_VERSION >= 3
31735   0, /*tp_as_async*/
31736   #endif
31737   0, /*tp_repr*/
31738   0, /*tp_as_number*/
31739   0, /*tp_as_sequence*/
31740   0, /*tp_as_mapping*/
31741   0, /*tp_hash*/
31742   0, /*tp_call*/
31743   0, /*tp_str*/
31744   0, /*tp_getattro*/
31745   0, /*tp_setattro*/
31746   0, /*tp_as_buffer*/
31747   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
31748   0, /*tp_doc*/
31749   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
31750   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
31751   0, /*tp_richcompare*/
31752   0, /*tp_weaklistoffset*/
31753   0, /*tp_iter*/
31754   0, /*tp_iternext*/
31755   __pyx_methods_2yt_8geometry_16particle_deposit_CountParticles, /*tp_methods*/
31756   0, /*tp_members*/
31757   0, /*tp_getset*/
31758   0, /*tp_base*/
31759   0, /*tp_dict*/
31760   0, /*tp_descr_get*/
31761   0, /*tp_descr_set*/
31762   0, /*tp_dictoffset*/
31763   #if CYTHON_COMPILING_IN_PYPY
31764   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
31765   #else
31766   0, /*tp_init*/
31767   #endif
31768   0, /*tp_alloc*/
31769   __pyx_tp_new_2yt_8geometry_16particle_deposit_CountParticles, /*tp_new*/
31770   0, /*tp_free*/
31771   0, /*tp_is_gc*/
31772   0, /*tp_bases*/
31773   0, /*tp_mro*/
31774   0, /*tp_cache*/
31775   0, /*tp_subclasses*/
31776   0, /*tp_weaklist*/
31777   0, /*tp_del*/
31778   0, /*tp_version_tag*/
31779   #if PY_VERSION_HEX >= 0x030400a1
31780   0, /*tp_finalize*/
31781   #endif
31782   #if PY_VERSION_HEX >= 0x030800b1
31783   0, /*tp_vectorcall*/
31784   #endif
31785 };
31786 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_SimpleSmooth __pyx_vtable_2yt_8geometry_16particle_deposit_SimpleSmooth;
31787 
__pyx_tp_new_2yt_8geometry_16particle_deposit_SimpleSmooth(PyTypeObject * t,PyObject * a,PyObject * k)31788 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_SimpleSmooth(PyTypeObject *t, PyObject *a, PyObject *k) {
31789   struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *p;
31790   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
31791   if (unlikely(!o)) return 0;
31792   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *)o);
31793   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_SimpleSmooth;
31794   p->data.data = NULL;
31795   p->data.memview = NULL;
31796   p->temp.data = NULL;
31797   p->temp.memview = NULL;
31798   return o;
31799 }
31800 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_SimpleSmooth(PyObject * o)31801 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_SimpleSmooth(PyObject *o) {
31802   struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth *)o;
31803   #if CYTHON_USE_TP_FINALIZE
31804   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
31805     if (PyObject_CallFinalizerFromDealloc(o)) return;
31806   }
31807   #endif
31808   PyObject_GC_UnTrack(o);
31809   __PYX_XDEC_MEMVIEW(&p->data, 1);
31810   __PYX_XDEC_MEMVIEW(&p->temp, 1);
31811   PyObject_GC_Track(o);
31812   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
31813 }
31814 
31815 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_SimpleSmooth[] = {
31816   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_1initialize, METH_NOARGS, 0},
31817   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_3finalize, METH_NOARGS, 0},
31818   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_5__reduce_cython__, METH_NOARGS, 0},
31819   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_12SimpleSmooth_7__setstate_cython__, METH_O, 0},
31820   {0, 0, 0, 0}
31821 };
31822 
31823 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth = {
31824   PyVarObject_HEAD_INIT(0, 0)
31825   "yt.geometry.particle_deposit.SimpleSmooth", /*tp_name*/
31826   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_SimpleSmooth), /*tp_basicsize*/
31827   0, /*tp_itemsize*/
31828   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_SimpleSmooth, /*tp_dealloc*/
31829   0, /*tp_print*/
31830   0, /*tp_getattr*/
31831   0, /*tp_setattr*/
31832   #if PY_MAJOR_VERSION < 3
31833   0, /*tp_compare*/
31834   #endif
31835   #if PY_MAJOR_VERSION >= 3
31836   0, /*tp_as_async*/
31837   #endif
31838   0, /*tp_repr*/
31839   0, /*tp_as_number*/
31840   0, /*tp_as_sequence*/
31841   0, /*tp_as_mapping*/
31842   0, /*tp_hash*/
31843   0, /*tp_call*/
31844   0, /*tp_str*/
31845   0, /*tp_getattro*/
31846   0, /*tp_setattro*/
31847   0, /*tp_as_buffer*/
31848   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
31849   0, /*tp_doc*/
31850   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
31851   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
31852   0, /*tp_richcompare*/
31853   0, /*tp_weaklistoffset*/
31854   0, /*tp_iter*/
31855   0, /*tp_iternext*/
31856   __pyx_methods_2yt_8geometry_16particle_deposit_SimpleSmooth, /*tp_methods*/
31857   0, /*tp_members*/
31858   0, /*tp_getset*/
31859   0, /*tp_base*/
31860   0, /*tp_dict*/
31861   0, /*tp_descr_get*/
31862   0, /*tp_descr_set*/
31863   0, /*tp_dictoffset*/
31864   #if CYTHON_COMPILING_IN_PYPY
31865   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
31866   #else
31867   0, /*tp_init*/
31868   #endif
31869   0, /*tp_alloc*/
31870   __pyx_tp_new_2yt_8geometry_16particle_deposit_SimpleSmooth, /*tp_new*/
31871   0, /*tp_free*/
31872   0, /*tp_is_gc*/
31873   0, /*tp_bases*/
31874   0, /*tp_mro*/
31875   0, /*tp_cache*/
31876   0, /*tp_subclasses*/
31877   0, /*tp_weaklist*/
31878   0, /*tp_del*/
31879   0, /*tp_version_tag*/
31880   #if PY_VERSION_HEX >= 0x030400a1
31881   0, /*tp_finalize*/
31882   #endif
31883   #if PY_VERSION_HEX >= 0x030800b1
31884   0, /*tp_vectorcall*/
31885   #endif
31886 };
31887 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_SumParticleField __pyx_vtable_2yt_8geometry_16particle_deposit_SumParticleField;
31888 
__pyx_tp_new_2yt_8geometry_16particle_deposit_SumParticleField(PyTypeObject * t,PyObject * a,PyObject * k)31889 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_SumParticleField(PyTypeObject *t, PyObject *a, PyObject *k) {
31890   struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *p;
31891   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
31892   if (unlikely(!o)) return 0;
31893   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *)o);
31894   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_SumParticleField;
31895   p->sum.data = NULL;
31896   p->sum.memview = NULL;
31897   return o;
31898 }
31899 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_SumParticleField(PyObject * o)31900 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_SumParticleField(PyObject *o) {
31901   struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField *)o;
31902   #if CYTHON_USE_TP_FINALIZE
31903   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
31904     if (PyObject_CallFinalizerFromDealloc(o)) return;
31905   }
31906   #endif
31907   PyObject_GC_UnTrack(o);
31908   __PYX_XDEC_MEMVIEW(&p->sum, 1);
31909   PyObject_GC_Track(o);
31910   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
31911 }
31912 
31913 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_SumParticleField[] = {
31914   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_1initialize, METH_NOARGS, 0},
31915   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_3finalize, METH_NOARGS, 0},
31916   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_5__reduce_cython__, METH_NOARGS, 0},
31917   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16SumParticleField_7__setstate_cython__, METH_O, 0},
31918   {0, 0, 0, 0}
31919 };
31920 
31921 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_SumParticleField = {
31922   PyVarObject_HEAD_INIT(0, 0)
31923   "yt.geometry.particle_deposit.SumParticleField", /*tp_name*/
31924   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_SumParticleField), /*tp_basicsize*/
31925   0, /*tp_itemsize*/
31926   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_SumParticleField, /*tp_dealloc*/
31927   0, /*tp_print*/
31928   0, /*tp_getattr*/
31929   0, /*tp_setattr*/
31930   #if PY_MAJOR_VERSION < 3
31931   0, /*tp_compare*/
31932   #endif
31933   #if PY_MAJOR_VERSION >= 3
31934   0, /*tp_as_async*/
31935   #endif
31936   0, /*tp_repr*/
31937   0, /*tp_as_number*/
31938   0, /*tp_as_sequence*/
31939   0, /*tp_as_mapping*/
31940   0, /*tp_hash*/
31941   0, /*tp_call*/
31942   0, /*tp_str*/
31943   0, /*tp_getattro*/
31944   0, /*tp_setattro*/
31945   0, /*tp_as_buffer*/
31946   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
31947   0, /*tp_doc*/
31948   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
31949   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
31950   0, /*tp_richcompare*/
31951   0, /*tp_weaklistoffset*/
31952   0, /*tp_iter*/
31953   0, /*tp_iternext*/
31954   __pyx_methods_2yt_8geometry_16particle_deposit_SumParticleField, /*tp_methods*/
31955   0, /*tp_members*/
31956   0, /*tp_getset*/
31957   0, /*tp_base*/
31958   0, /*tp_dict*/
31959   0, /*tp_descr_get*/
31960   0, /*tp_descr_set*/
31961   0, /*tp_dictoffset*/
31962   #if CYTHON_COMPILING_IN_PYPY
31963   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
31964   #else
31965   0, /*tp_init*/
31966   #endif
31967   0, /*tp_alloc*/
31968   __pyx_tp_new_2yt_8geometry_16particle_deposit_SumParticleField, /*tp_new*/
31969   0, /*tp_free*/
31970   0, /*tp_is_gc*/
31971   0, /*tp_bases*/
31972   0, /*tp_mro*/
31973   0, /*tp_cache*/
31974   0, /*tp_subclasses*/
31975   0, /*tp_weaklist*/
31976   0, /*tp_del*/
31977   0, /*tp_version_tag*/
31978   #if PY_VERSION_HEX >= 0x030400a1
31979   0, /*tp_finalize*/
31980   #endif
31981   #if PY_VERSION_HEX >= 0x030800b1
31982   0, /*tp_vectorcall*/
31983   #endif
31984 };
31985 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_StdParticleField __pyx_vtable_2yt_8geometry_16particle_deposit_StdParticleField;
31986 
__pyx_tp_new_2yt_8geometry_16particle_deposit_StdParticleField(PyTypeObject * t,PyObject * a,PyObject * k)31987 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_StdParticleField(PyTypeObject *t, PyObject *a, PyObject *k) {
31988   struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *p;
31989   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
31990   if (unlikely(!o)) return 0;
31991   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *)o);
31992   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_StdParticleField;
31993   p->mk.data = NULL;
31994   p->mk.memview = NULL;
31995   p->qk.data = NULL;
31996   p->qk.memview = NULL;
31997   p->i.data = NULL;
31998   p->i.memview = NULL;
31999   return o;
32000 }
32001 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_StdParticleField(PyObject * o)32002 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_StdParticleField(PyObject *o) {
32003   struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField *)o;
32004   #if CYTHON_USE_TP_FINALIZE
32005   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32006     if (PyObject_CallFinalizerFromDealloc(o)) return;
32007   }
32008   #endif
32009   PyObject_GC_UnTrack(o);
32010   __PYX_XDEC_MEMVIEW(&p->mk, 1);
32011   __PYX_XDEC_MEMVIEW(&p->qk, 1);
32012   __PYX_XDEC_MEMVIEW(&p->i, 1);
32013   PyObject_GC_Track(o);
32014   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
32015 }
32016 
32017 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_StdParticleField[] = {
32018   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_1initialize, METH_NOARGS, 0},
32019   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_3finalize, METH_NOARGS, 0},
32020   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_5__reduce_cython__, METH_NOARGS, 0},
32021   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_16StdParticleField_7__setstate_cython__, METH_O, 0},
32022   {0, 0, 0, 0}
32023 };
32024 
32025 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_StdParticleField = {
32026   PyVarObject_HEAD_INIT(0, 0)
32027   "yt.geometry.particle_deposit.StdParticleField", /*tp_name*/
32028   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_StdParticleField), /*tp_basicsize*/
32029   0, /*tp_itemsize*/
32030   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_StdParticleField, /*tp_dealloc*/
32031   0, /*tp_print*/
32032   0, /*tp_getattr*/
32033   0, /*tp_setattr*/
32034   #if PY_MAJOR_VERSION < 3
32035   0, /*tp_compare*/
32036   #endif
32037   #if PY_MAJOR_VERSION >= 3
32038   0, /*tp_as_async*/
32039   #endif
32040   0, /*tp_repr*/
32041   0, /*tp_as_number*/
32042   0, /*tp_as_sequence*/
32043   0, /*tp_as_mapping*/
32044   0, /*tp_hash*/
32045   0, /*tp_call*/
32046   0, /*tp_str*/
32047   0, /*tp_getattro*/
32048   0, /*tp_setattro*/
32049   0, /*tp_as_buffer*/
32050   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32051   0, /*tp_doc*/
32052   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
32053   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
32054   0, /*tp_richcompare*/
32055   0, /*tp_weaklistoffset*/
32056   0, /*tp_iter*/
32057   0, /*tp_iternext*/
32058   __pyx_methods_2yt_8geometry_16particle_deposit_StdParticleField, /*tp_methods*/
32059   0, /*tp_members*/
32060   0, /*tp_getset*/
32061   0, /*tp_base*/
32062   0, /*tp_dict*/
32063   0, /*tp_descr_get*/
32064   0, /*tp_descr_set*/
32065   0, /*tp_dictoffset*/
32066   #if CYTHON_COMPILING_IN_PYPY
32067   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
32068   #else
32069   0, /*tp_init*/
32070   #endif
32071   0, /*tp_alloc*/
32072   __pyx_tp_new_2yt_8geometry_16particle_deposit_StdParticleField, /*tp_new*/
32073   0, /*tp_free*/
32074   0, /*tp_is_gc*/
32075   0, /*tp_bases*/
32076   0, /*tp_mro*/
32077   0, /*tp_cache*/
32078   0, /*tp_subclasses*/
32079   0, /*tp_weaklist*/
32080   0, /*tp_del*/
32081   0, /*tp_version_tag*/
32082   #if PY_VERSION_HEX >= 0x030400a1
32083   0, /*tp_finalize*/
32084   #endif
32085   #if PY_VERSION_HEX >= 0x030800b1
32086   0, /*tp_vectorcall*/
32087   #endif
32088 };
32089 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CICDeposit __pyx_vtable_2yt_8geometry_16particle_deposit_CICDeposit;
32090 
__pyx_tp_new_2yt_8geometry_16particle_deposit_CICDeposit(PyTypeObject * t,PyObject * a,PyObject * k)32091 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_CICDeposit(PyTypeObject *t, PyObject *a, PyObject *k) {
32092   struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *p;
32093   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
32094   if (unlikely(!o)) return 0;
32095   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)o);
32096   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_CICDeposit;
32097   p->ofield = Py_None; Py_INCREF(Py_None);
32098   p->field.data = NULL;
32099   p->field.memview = NULL;
32100   return o;
32101 }
32102 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CICDeposit(PyObject * o)32103 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CICDeposit(PyObject *o) {
32104   struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)o;
32105   #if CYTHON_USE_TP_FINALIZE
32106   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32107     if (PyObject_CallFinalizerFromDealloc(o)) return;
32108   }
32109   #endif
32110   PyObject_GC_UnTrack(o);
32111   Py_CLEAR(p->ofield);
32112   __PYX_XDEC_MEMVIEW(&p->field, 1);
32113   PyObject_GC_Track(o);
32114   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
32115 }
32116 
__pyx_tp_traverse_2yt_8geometry_16particle_deposit_CICDeposit(PyObject * o,visitproc v,void * a)32117 static int __pyx_tp_traverse_2yt_8geometry_16particle_deposit_CICDeposit(PyObject *o, visitproc v, void *a) {
32118   int e;
32119   struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)o;
32120   e = __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o, v, a); if (e) return e;
32121   if (p->ofield) {
32122     e = (*v)(p->ofield, a); if (e) return e;
32123   }
32124   return 0;
32125 }
32126 
__pyx_tp_clear_2yt_8geometry_16particle_deposit_CICDeposit(PyObject * o)32127 static int __pyx_tp_clear_2yt_8geometry_16particle_deposit_CICDeposit(PyObject *o) {
32128   PyObject* tmp;
32129   struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)o;
32130   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
32131   tmp = ((PyObject*)p->ofield);
32132   p->ofield = Py_None; Py_INCREF(Py_None);
32133   Py_XDECREF(tmp);
32134   return 0;
32135 }
32136 
__pyx_getprop_2yt_8geometry_16particle_deposit_10CICDeposit_ofield(PyObject * o,CYTHON_UNUSED void * x)32137 static PyObject *__pyx_getprop_2yt_8geometry_16particle_deposit_10CICDeposit_ofield(PyObject *o, CYTHON_UNUSED void *x) {
32138   return __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_1__get__(o);
32139 }
32140 
__pyx_setprop_2yt_8geometry_16particle_deposit_10CICDeposit_ofield(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)32141 static int __pyx_setprop_2yt_8geometry_16particle_deposit_10CICDeposit_ofield(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
32142   if (v) {
32143     return __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_3__set__(o, v);
32144   }
32145   else {
32146     return __pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_6ofield_5__del__(o);
32147   }
32148 }
32149 
32150 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_CICDeposit[] = {
32151   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_1initialize, METH_NOARGS, 0},
32152   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_3finalize, METH_NOARGS, 0},
32153   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_5__reduce_cython__, METH_NOARGS, 0},
32154   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_10CICDeposit_7__setstate_cython__, METH_O, 0},
32155   {0, 0, 0, 0}
32156 };
32157 
32158 static struct PyGetSetDef __pyx_getsets_2yt_8geometry_16particle_deposit_CICDeposit[] = {
32159   {(char *)"ofield", __pyx_getprop_2yt_8geometry_16particle_deposit_10CICDeposit_ofield, __pyx_setprop_2yt_8geometry_16particle_deposit_10CICDeposit_ofield, (char *)0, 0},
32160   {0, 0, 0, 0, 0}
32161 };
32162 
32163 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_CICDeposit = {
32164   PyVarObject_HEAD_INIT(0, 0)
32165   "yt.geometry.particle_deposit.CICDeposit", /*tp_name*/
32166   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit), /*tp_basicsize*/
32167   0, /*tp_itemsize*/
32168   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CICDeposit, /*tp_dealloc*/
32169   0, /*tp_print*/
32170   0, /*tp_getattr*/
32171   0, /*tp_setattr*/
32172   #if PY_MAJOR_VERSION < 3
32173   0, /*tp_compare*/
32174   #endif
32175   #if PY_MAJOR_VERSION >= 3
32176   0, /*tp_as_async*/
32177   #endif
32178   0, /*tp_repr*/
32179   0, /*tp_as_number*/
32180   0, /*tp_as_sequence*/
32181   0, /*tp_as_mapping*/
32182   0, /*tp_hash*/
32183   0, /*tp_call*/
32184   0, /*tp_str*/
32185   0, /*tp_getattro*/
32186   0, /*tp_setattro*/
32187   0, /*tp_as_buffer*/
32188   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32189   0, /*tp_doc*/
32190   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_CICDeposit, /*tp_traverse*/
32191   __pyx_tp_clear_2yt_8geometry_16particle_deposit_CICDeposit, /*tp_clear*/
32192   0, /*tp_richcompare*/
32193   0, /*tp_weaklistoffset*/
32194   0, /*tp_iter*/
32195   0, /*tp_iternext*/
32196   __pyx_methods_2yt_8geometry_16particle_deposit_CICDeposit, /*tp_methods*/
32197   0, /*tp_members*/
32198   __pyx_getsets_2yt_8geometry_16particle_deposit_CICDeposit, /*tp_getset*/
32199   0, /*tp_base*/
32200   0, /*tp_dict*/
32201   0, /*tp_descr_get*/
32202   0, /*tp_descr_set*/
32203   0, /*tp_dictoffset*/
32204   #if CYTHON_COMPILING_IN_PYPY
32205   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
32206   #else
32207   0, /*tp_init*/
32208   #endif
32209   0, /*tp_alloc*/
32210   __pyx_tp_new_2yt_8geometry_16particle_deposit_CICDeposit, /*tp_new*/
32211   0, /*tp_free*/
32212   0, /*tp_is_gc*/
32213   0, /*tp_bases*/
32214   0, /*tp_mro*/
32215   0, /*tp_cache*/
32216   0, /*tp_subclasses*/
32217   0, /*tp_weaklist*/
32218   0, /*tp_del*/
32219   0, /*tp_version_tag*/
32220   #if PY_VERSION_HEX >= 0x030400a1
32221   0, /*tp_finalize*/
32222   #endif
32223   #if PY_VERSION_HEX >= 0x030800b1
32224   0, /*tp_vectorcall*/
32225   #endif
32226 };
32227 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_WeightedMeanParticleField __pyx_vtable_2yt_8geometry_16particle_deposit_WeightedMeanParticleField;
32228 
__pyx_tp_new_2yt_8geometry_16particle_deposit_WeightedMeanParticleField(PyTypeObject * t,PyObject * a,PyObject * k)32229 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_WeightedMeanParticleField(PyTypeObject *t, PyObject *a, PyObject *k) {
32230   struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *p;
32231   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
32232   if (unlikely(!o)) return 0;
32233   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *)o);
32234   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_WeightedMeanParticleField;
32235   p->wf.data = NULL;
32236   p->wf.memview = NULL;
32237   p->w.data = NULL;
32238   p->w.memview = NULL;
32239   return o;
32240 }
32241 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_WeightedMeanParticleField(PyObject * o)32242 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_WeightedMeanParticleField(PyObject *o) {
32243   struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField *)o;
32244   #if CYTHON_USE_TP_FINALIZE
32245   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32246     if (PyObject_CallFinalizerFromDealloc(o)) return;
32247   }
32248   #endif
32249   PyObject_GC_UnTrack(o);
32250   __PYX_XDEC_MEMVIEW(&p->wf, 1);
32251   __PYX_XDEC_MEMVIEW(&p->w, 1);
32252   PyObject_GC_Track(o);
32253   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
32254 }
32255 
32256 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_WeightedMeanParticleField[] = {
32257   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_1initialize, METH_NOARGS, 0},
32258   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_3finalize, METH_NOARGS, 0},
32259   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_5__reduce_cython__, METH_NOARGS, 0},
32260   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_7__setstate_cython__, METH_O, 0},
32261   {0, 0, 0, 0}
32262 };
32263 
32264 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField = {
32265   PyVarObject_HEAD_INIT(0, 0)
32266   "yt.geometry.particle_deposit.WeightedMeanParticleField", /*tp_name*/
32267   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_WeightedMeanParticleField), /*tp_basicsize*/
32268   0, /*tp_itemsize*/
32269   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_WeightedMeanParticleField, /*tp_dealloc*/
32270   0, /*tp_print*/
32271   0, /*tp_getattr*/
32272   0, /*tp_setattr*/
32273   #if PY_MAJOR_VERSION < 3
32274   0, /*tp_compare*/
32275   #endif
32276   #if PY_MAJOR_VERSION >= 3
32277   0, /*tp_as_async*/
32278   #endif
32279   0, /*tp_repr*/
32280   0, /*tp_as_number*/
32281   0, /*tp_as_sequence*/
32282   0, /*tp_as_mapping*/
32283   0, /*tp_hash*/
32284   0, /*tp_call*/
32285   0, /*tp_str*/
32286   0, /*tp_getattro*/
32287   0, /*tp_setattro*/
32288   0, /*tp_as_buffer*/
32289   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32290   0, /*tp_doc*/
32291   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
32292   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
32293   0, /*tp_richcompare*/
32294   0, /*tp_weaklistoffset*/
32295   0, /*tp_iter*/
32296   0, /*tp_iternext*/
32297   __pyx_methods_2yt_8geometry_16particle_deposit_WeightedMeanParticleField, /*tp_methods*/
32298   0, /*tp_members*/
32299   0, /*tp_getset*/
32300   0, /*tp_base*/
32301   0, /*tp_dict*/
32302   0, /*tp_descr_get*/
32303   0, /*tp_descr_set*/
32304   0, /*tp_dictoffset*/
32305   #if CYTHON_COMPILING_IN_PYPY
32306   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
32307   #else
32308   0, /*tp_init*/
32309   #endif
32310   0, /*tp_alloc*/
32311   __pyx_tp_new_2yt_8geometry_16particle_deposit_WeightedMeanParticleField, /*tp_new*/
32312   0, /*tp_free*/
32313   0, /*tp_is_gc*/
32314   0, /*tp_bases*/
32315   0, /*tp_mro*/
32316   0, /*tp_cache*/
32317   0, /*tp_subclasses*/
32318   0, /*tp_weaklist*/
32319   0, /*tp_del*/
32320   0, /*tp_version_tag*/
32321   #if PY_VERSION_HEX >= 0x030400a1
32322   0, /*tp_finalize*/
32323   #endif
32324   #if PY_VERSION_HEX >= 0x030800b1
32325   0, /*tp_vectorcall*/
32326   #endif
32327 };
32328 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_MeshIdentifier __pyx_vtable_2yt_8geometry_16particle_deposit_MeshIdentifier;
32329 
__pyx_tp_new_2yt_8geometry_16particle_deposit_MeshIdentifier(PyTypeObject * t,PyObject * a,PyObject * k)32330 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_MeshIdentifier(PyTypeObject *t, PyObject *a, PyObject *k) {
32331   struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *p;
32332   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
32333   if (unlikely(!o)) return 0;
32334   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier *)o);
32335   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_MeshIdentifier;
32336   return o;
32337 }
32338 
32339 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_MeshIdentifier[] = {
32340   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_1initialize, METH_NOARGS, 0},
32341   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_3finalize, METH_NOARGS, 0},
32342   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_5__reduce_cython__, METH_NOARGS, 0},
32343   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14MeshIdentifier_7__setstate_cython__, METH_O, 0},
32344   {0, 0, 0, 0}
32345 };
32346 
32347 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier = {
32348   PyVarObject_HEAD_INIT(0, 0)
32349   "yt.geometry.particle_deposit.MeshIdentifier", /*tp_name*/
32350   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_MeshIdentifier), /*tp_basicsize*/
32351   0, /*tp_itemsize*/
32352   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_dealloc*/
32353   0, /*tp_print*/
32354   0, /*tp_getattr*/
32355   0, /*tp_setattr*/
32356   #if PY_MAJOR_VERSION < 3
32357   0, /*tp_compare*/
32358   #endif
32359   #if PY_MAJOR_VERSION >= 3
32360   0, /*tp_as_async*/
32361   #endif
32362   0, /*tp_repr*/
32363   0, /*tp_as_number*/
32364   0, /*tp_as_sequence*/
32365   0, /*tp_as_mapping*/
32366   0, /*tp_hash*/
32367   0, /*tp_call*/
32368   0, /*tp_str*/
32369   0, /*tp_getattro*/
32370   0, /*tp_setattro*/
32371   0, /*tp_as_buffer*/
32372   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32373   0, /*tp_doc*/
32374   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
32375   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
32376   0, /*tp_richcompare*/
32377   0, /*tp_weaklistoffset*/
32378   0, /*tp_iter*/
32379   0, /*tp_iternext*/
32380   __pyx_methods_2yt_8geometry_16particle_deposit_MeshIdentifier, /*tp_methods*/
32381   0, /*tp_members*/
32382   0, /*tp_getset*/
32383   0, /*tp_base*/
32384   0, /*tp_dict*/
32385   0, /*tp_descr_get*/
32386   0, /*tp_descr_set*/
32387   0, /*tp_dictoffset*/
32388   #if CYTHON_COMPILING_IN_PYPY
32389   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
32390   #else
32391   0, /*tp_init*/
32392   #endif
32393   0, /*tp_alloc*/
32394   __pyx_tp_new_2yt_8geometry_16particle_deposit_MeshIdentifier, /*tp_new*/
32395   0, /*tp_free*/
32396   0, /*tp_is_gc*/
32397   0, /*tp_bases*/
32398   0, /*tp_mro*/
32399   0, /*tp_cache*/
32400   0, /*tp_subclasses*/
32401   0, /*tp_weaklist*/
32402   0, /*tp_del*/
32403   0, /*tp_version_tag*/
32404   #if PY_VERSION_HEX >= 0x030400a1
32405   0, /*tp_finalize*/
32406   #endif
32407   #if PY_VERSION_HEX >= 0x030800b1
32408   0, /*tp_vectorcall*/
32409   #endif
32410 };
32411 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_CellIdentifier __pyx_vtable_2yt_8geometry_16particle_deposit_CellIdentifier;
32412 
__pyx_tp_new_2yt_8geometry_16particle_deposit_CellIdentifier(PyTypeObject * t,PyObject * a,PyObject * k)32413 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_CellIdentifier(PyTypeObject *t, PyObject *a, PyObject *k) {
32414   struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *p;
32415   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
32416   if (unlikely(!o)) return 0;
32417   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *)o);
32418   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_CellIdentifier;
32419   p->indexes.data = NULL;
32420   p->indexes.memview = NULL;
32421   p->cell_index.data = NULL;
32422   p->cell_index.memview = NULL;
32423   return o;
32424 }
32425 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CellIdentifier(PyObject * o)32426 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CellIdentifier(PyObject *o) {
32427   struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier *)o;
32428   #if CYTHON_USE_TP_FINALIZE
32429   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32430     if (PyObject_CallFinalizerFromDealloc(o)) return;
32431   }
32432   #endif
32433   PyObject_GC_UnTrack(o);
32434   __PYX_XDEC_MEMVIEW(&p->indexes, 1);
32435   __PYX_XDEC_MEMVIEW(&p->cell_index, 1);
32436   PyObject_GC_Track(o);
32437   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
32438 }
32439 
32440 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_CellIdentifier[] = {
32441   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_1initialize, METH_O, 0},
32442   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_3finalize, METH_NOARGS, 0},
32443   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_5__reduce_cython__, METH_NOARGS, 0},
32444   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_14CellIdentifier_7__setstate_cython__, METH_O, 0},
32445   {0, 0, 0, 0}
32446 };
32447 
32448 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier = {
32449   PyVarObject_HEAD_INIT(0, 0)
32450   "yt.geometry.particle_deposit.CellIdentifier", /*tp_name*/
32451   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_CellIdentifier), /*tp_basicsize*/
32452   0, /*tp_itemsize*/
32453   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_CellIdentifier, /*tp_dealloc*/
32454   0, /*tp_print*/
32455   0, /*tp_getattr*/
32456   0, /*tp_setattr*/
32457   #if PY_MAJOR_VERSION < 3
32458   0, /*tp_compare*/
32459   #endif
32460   #if PY_MAJOR_VERSION >= 3
32461   0, /*tp_as_async*/
32462   #endif
32463   0, /*tp_repr*/
32464   0, /*tp_as_number*/
32465   0, /*tp_as_sequence*/
32466   0, /*tp_as_mapping*/
32467   0, /*tp_hash*/
32468   0, /*tp_call*/
32469   0, /*tp_str*/
32470   0, /*tp_getattro*/
32471   0, /*tp_setattro*/
32472   0, /*tp_as_buffer*/
32473   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32474   0, /*tp_doc*/
32475   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
32476   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
32477   0, /*tp_richcompare*/
32478   0, /*tp_weaklistoffset*/
32479   0, /*tp_iter*/
32480   0, /*tp_iternext*/
32481   __pyx_methods_2yt_8geometry_16particle_deposit_CellIdentifier, /*tp_methods*/
32482   0, /*tp_members*/
32483   0, /*tp_getset*/
32484   0, /*tp_base*/
32485   0, /*tp_dict*/
32486   0, /*tp_descr_get*/
32487   0, /*tp_descr_set*/
32488   0, /*tp_dictoffset*/
32489   #if CYTHON_COMPILING_IN_PYPY
32490   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
32491   #else
32492   0, /*tp_init*/
32493   #endif
32494   0, /*tp_alloc*/
32495   __pyx_tp_new_2yt_8geometry_16particle_deposit_CellIdentifier, /*tp_new*/
32496   0, /*tp_free*/
32497   0, /*tp_is_gc*/
32498   0, /*tp_bases*/
32499   0, /*tp_mro*/
32500   0, /*tp_cache*/
32501   0, /*tp_subclasses*/
32502   0, /*tp_weaklist*/
32503   0, /*tp_del*/
32504   0, /*tp_version_tag*/
32505   #if PY_VERSION_HEX >= 0x030400a1
32506   0, /*tp_finalize*/
32507   #endif
32508   #if PY_VERSION_HEX >= 0x030800b1
32509   0, /*tp_vectorcall*/
32510   #endif
32511 };
32512 static struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_NNParticleField __pyx_vtable_2yt_8geometry_16particle_deposit_NNParticleField;
32513 
__pyx_tp_new_2yt_8geometry_16particle_deposit_NNParticleField(PyTypeObject * t,PyObject * a,PyObject * k)32514 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit_NNParticleField(PyTypeObject *t, PyObject *a, PyObject *k) {
32515   struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *p;
32516   PyObject *o = __pyx_tp_new_2yt_8geometry_16particle_deposit_ParticleDepositOperation(t, a, k);
32517   if (unlikely(!o)) return 0;
32518   p = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *)o);
32519   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_2yt_8geometry_16particle_deposit_ParticleDepositOperation*)__pyx_vtabptr_2yt_8geometry_16particle_deposit_NNParticleField;
32520   p->nnfield.data = NULL;
32521   p->nnfield.memview = NULL;
32522   p->distfield.data = NULL;
32523   p->distfield.memview = NULL;
32524   return o;
32525 }
32526 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit_NNParticleField(PyObject * o)32527 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_NNParticleField(PyObject *o) {
32528   struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField *)o;
32529   #if CYTHON_USE_TP_FINALIZE
32530   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32531     if (PyObject_CallFinalizerFromDealloc(o)) return;
32532   }
32533   #endif
32534   PyObject_GC_UnTrack(o);
32535   __PYX_XDEC_MEMVIEW(&p->nnfield, 1);
32536   __PYX_XDEC_MEMVIEW(&p->distfield, 1);
32537   PyObject_GC_Track(o);
32538   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_ParticleDepositOperation(o);
32539 }
32540 
32541 static PyMethodDef __pyx_methods_2yt_8geometry_16particle_deposit_NNParticleField[] = {
32542   {"initialize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_1initialize, METH_NOARGS, 0},
32543   {"finalize", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_3finalize, METH_NOARGS, 0},
32544   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_5__reduce_cython__, METH_NOARGS, 0},
32545   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_8geometry_16particle_deposit_15NNParticleField_7__setstate_cython__, METH_O, 0},
32546   {0, 0, 0, 0}
32547 };
32548 
32549 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit_NNParticleField = {
32550   PyVarObject_HEAD_INIT(0, 0)
32551   "yt.geometry.particle_deposit.NNParticleField", /*tp_name*/
32552   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit_NNParticleField), /*tp_basicsize*/
32553   0, /*tp_itemsize*/
32554   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit_NNParticleField, /*tp_dealloc*/
32555   0, /*tp_print*/
32556   0, /*tp_getattr*/
32557   0, /*tp_setattr*/
32558   #if PY_MAJOR_VERSION < 3
32559   0, /*tp_compare*/
32560   #endif
32561   #if PY_MAJOR_VERSION >= 3
32562   0, /*tp_as_async*/
32563   #endif
32564   0, /*tp_repr*/
32565   0, /*tp_as_number*/
32566   0, /*tp_as_sequence*/
32567   0, /*tp_as_mapping*/
32568   0, /*tp_hash*/
32569   0, /*tp_call*/
32570   0, /*tp_str*/
32571   0, /*tp_getattro*/
32572   0, /*tp_setattro*/
32573   0, /*tp_as_buffer*/
32574   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32575   0, /*tp_doc*/
32576   __pyx_tp_traverse_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_traverse*/
32577   __pyx_tp_clear_2yt_8geometry_16particle_deposit_ParticleDepositOperation, /*tp_clear*/
32578   0, /*tp_richcompare*/
32579   0, /*tp_weaklistoffset*/
32580   0, /*tp_iter*/
32581   0, /*tp_iternext*/
32582   __pyx_methods_2yt_8geometry_16particle_deposit_NNParticleField, /*tp_methods*/
32583   0, /*tp_members*/
32584   0, /*tp_getset*/
32585   0, /*tp_base*/
32586   0, /*tp_dict*/
32587   0, /*tp_descr_get*/
32588   0, /*tp_descr_set*/
32589   0, /*tp_dictoffset*/
32590   #if CYTHON_COMPILING_IN_PYPY
32591   __pyx_pw_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_1__init__, /*tp_init*/
32592   #else
32593   0, /*tp_init*/
32594   #endif
32595   0, /*tp_alloc*/
32596   __pyx_tp_new_2yt_8geometry_16particle_deposit_NNParticleField, /*tp_new*/
32597   0, /*tp_free*/
32598   0, /*tp_is_gc*/
32599   0, /*tp_bases*/
32600   0, /*tp_mro*/
32601   0, /*tp_cache*/
32602   0, /*tp_subclasses*/
32603   0, /*tp_weaklist*/
32604   0, /*tp_del*/
32605   0, /*tp_version_tag*/
32606   #if PY_VERSION_HEX >= 0x030400a1
32607   0, /*tp_finalize*/
32608   #endif
32609   #if PY_VERSION_HEX >= 0x030800b1
32610   0, /*tp_vectorcall*/
32611   #endif
32612 };
32613 
32614 static struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *__pyx_freelist_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize[8];
32615 static int __pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize = 0;
32616 
__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)32617 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
32618   PyObject *o;
32619   if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize)))) {
32620     o = (PyObject*)__pyx_freelist_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize[--__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize];
32621     memset(o, 0, sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize));
32622     (void) PyObject_INIT(o, t);
32623     PyObject_GC_Track(o);
32624   } else {
32625     o = (*t->tp_alloc)(t, 0);
32626     if (unlikely(!o)) return 0;
32627   }
32628   return o;
32629 }
32630 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyObject * o)32631 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyObject *o) {
32632   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *)o;
32633   PyObject_GC_UnTrack(o);
32634   Py_CLEAR(p->__pyx_v_self);
32635   if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize)))) {
32636     __pyx_freelist_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize[__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize++] = ((struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *)o);
32637   } else {
32638     (*Py_TYPE(o)->tp_free)(o);
32639   }
32640 }
32641 
__pyx_tp_traverse_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyObject * o,visitproc v,void * a)32642 static int __pyx_tp_traverse_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyObject *o, visitproc v, void *a) {
32643   int e;
32644   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *)o;
32645   if (p->__pyx_v_self) {
32646     e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
32647   }
32648   return 0;
32649 }
32650 
__pyx_tp_clear_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyObject * o)32651 static int __pyx_tp_clear_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize(PyObject *o) {
32652   PyObject* tmp;
32653   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize *)o;
32654   tmp = ((PyObject*)p->__pyx_v_self);
32655   p->__pyx_v_self = ((struct __pyx_obj_2yt_8geometry_16particle_deposit_CICDeposit *)Py_None); Py_INCREF(Py_None);
32656   Py_XDECREF(tmp);
32657   return 0;
32658 }
32659 
32660 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize = {
32661   PyVarObject_HEAD_INIT(0, 0)
32662   "yt.geometry.particle_deposit.__pyx_scope_struct__initialize", /*tp_name*/
32663   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize), /*tp_basicsize*/
32664   0, /*tp_itemsize*/
32665   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize, /*tp_dealloc*/
32666   0, /*tp_print*/
32667   0, /*tp_getattr*/
32668   0, /*tp_setattr*/
32669   #if PY_MAJOR_VERSION < 3
32670   0, /*tp_compare*/
32671   #endif
32672   #if PY_MAJOR_VERSION >= 3
32673   0, /*tp_as_async*/
32674   #endif
32675   0, /*tp_repr*/
32676   0, /*tp_as_number*/
32677   0, /*tp_as_sequence*/
32678   0, /*tp_as_mapping*/
32679   0, /*tp_hash*/
32680   0, /*tp_call*/
32681   0, /*tp_str*/
32682   0, /*tp_getattro*/
32683   0, /*tp_setattro*/
32684   0, /*tp_as_buffer*/
32685   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32686   0, /*tp_doc*/
32687   __pyx_tp_traverse_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize, /*tp_traverse*/
32688   __pyx_tp_clear_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize, /*tp_clear*/
32689   0, /*tp_richcompare*/
32690   0, /*tp_weaklistoffset*/
32691   0, /*tp_iter*/
32692   0, /*tp_iternext*/
32693   0, /*tp_methods*/
32694   0, /*tp_members*/
32695   0, /*tp_getset*/
32696   0, /*tp_base*/
32697   0, /*tp_dict*/
32698   0, /*tp_descr_get*/
32699   0, /*tp_descr_set*/
32700   0, /*tp_dictoffset*/
32701   0, /*tp_init*/
32702   0, /*tp_alloc*/
32703   __pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize, /*tp_new*/
32704   0, /*tp_free*/
32705   0, /*tp_is_gc*/
32706   0, /*tp_bases*/
32707   0, /*tp_mro*/
32708   0, /*tp_cache*/
32709   0, /*tp_subclasses*/
32710   0, /*tp_weaklist*/
32711   0, /*tp_del*/
32712   0, /*tp_version_tag*/
32713   #if PY_VERSION_HEX >= 0x030400a1
32714   0, /*tp_finalize*/
32715   #endif
32716   #if PY_VERSION_HEX >= 0x030800b1
32717   0, /*tp_vectorcall*/
32718   #endif
32719 };
32720 
32721 static struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *__pyx_freelist_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr[8];
32722 static int __pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr = 0;
32723 
__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)32724 static PyObject *__pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
32725   PyObject *o;
32726   if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr)))) {
32727     o = (PyObject*)__pyx_freelist_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr[--__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr];
32728     memset(o, 0, sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr));
32729     (void) PyObject_INIT(o, t);
32730     PyObject_GC_Track(o);
32731   } else {
32732     o = (*t->tp_alloc)(t, 0);
32733     if (unlikely(!o)) return 0;
32734   }
32735   return o;
32736 }
32737 
__pyx_tp_dealloc_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyObject * o)32738 static void __pyx_tp_dealloc_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyObject *o) {
32739   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *)o;
32740   PyObject_GC_UnTrack(o);
32741   Py_CLEAR(p->__pyx_outer_scope);
32742   Py_CLEAR(p->__pyx_v__);
32743   if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr)))) {
32744     __pyx_freelist_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr[__pyx_freecount_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *)o);
32745   } else {
32746     (*Py_TYPE(o)->tp_free)(o);
32747   }
32748 }
32749 
__pyx_tp_traverse_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyObject * o,visitproc v,void * a)32750 static int __pyx_tp_traverse_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
32751   int e;
32752   struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr *)o;
32753   if (p->__pyx_outer_scope) {
32754     e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
32755   }
32756   if (p->__pyx_v__) {
32757     e = (*v)(p->__pyx_v__, a); if (e) return e;
32758   }
32759   return 0;
32760 }
32761 
32762 static PyTypeObject __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr = {
32763   PyVarObject_HEAD_INIT(0, 0)
32764   "yt.geometry.particle_deposit.__pyx_scope_struct_1_genexpr", /*tp_name*/
32765   sizeof(struct __pyx_obj_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
32766   0, /*tp_itemsize*/
32767   __pyx_tp_dealloc_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
32768   0, /*tp_print*/
32769   0, /*tp_getattr*/
32770   0, /*tp_setattr*/
32771   #if PY_MAJOR_VERSION < 3
32772   0, /*tp_compare*/
32773   #endif
32774   #if PY_MAJOR_VERSION >= 3
32775   0, /*tp_as_async*/
32776   #endif
32777   0, /*tp_repr*/
32778   0, /*tp_as_number*/
32779   0, /*tp_as_sequence*/
32780   0, /*tp_as_mapping*/
32781   0, /*tp_hash*/
32782   0, /*tp_call*/
32783   0, /*tp_str*/
32784   0, /*tp_getattro*/
32785   0, /*tp_setattro*/
32786   0, /*tp_as_buffer*/
32787   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32788   0, /*tp_doc*/
32789   __pyx_tp_traverse_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr, /*tp_traverse*/
32790   0, /*tp_clear*/
32791   0, /*tp_richcompare*/
32792   0, /*tp_weaklistoffset*/
32793   0, /*tp_iter*/
32794   0, /*tp_iternext*/
32795   0, /*tp_methods*/
32796   0, /*tp_members*/
32797   0, /*tp_getset*/
32798   0, /*tp_base*/
32799   0, /*tp_dict*/
32800   0, /*tp_descr_get*/
32801   0, /*tp_descr_set*/
32802   0, /*tp_dictoffset*/
32803   0, /*tp_init*/
32804   0, /*tp_alloc*/
32805   __pyx_tp_new_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr, /*tp_new*/
32806   0, /*tp_free*/
32807   0, /*tp_is_gc*/
32808   0, /*tp_bases*/
32809   0, /*tp_mro*/
32810   0, /*tp_cache*/
32811   0, /*tp_subclasses*/
32812   0, /*tp_weaklist*/
32813   0, /*tp_del*/
32814   0, /*tp_version_tag*/
32815   #if PY_VERSION_HEX >= 0x030400a1
32816   0, /*tp_finalize*/
32817   #endif
32818   #if PY_VERSION_HEX >= 0x030800b1
32819   0, /*tp_vectorcall*/
32820   #endif
32821 };
32822 static struct __pyx_vtabstruct_array __pyx_vtable_array;
32823 
__pyx_tp_new_array(PyTypeObject * t,PyObject * a,PyObject * k)32824 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
32825   struct __pyx_array_obj *p;
32826   PyObject *o;
32827   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
32828     o = (*t->tp_alloc)(t, 0);
32829   } else {
32830     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
32831   }
32832   if (unlikely(!o)) return 0;
32833   p = ((struct __pyx_array_obj *)o);
32834   p->__pyx_vtab = __pyx_vtabptr_array;
32835   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
32836   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
32837   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
32838   return o;
32839   bad:
32840   Py_DECREF(o); o = 0;
32841   return NULL;
32842 }
32843 
__pyx_tp_dealloc_array(PyObject * o)32844 static void __pyx_tp_dealloc_array(PyObject *o) {
32845   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
32846   #if CYTHON_USE_TP_FINALIZE
32847   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))) {
32848     if (PyObject_CallFinalizerFromDealloc(o)) return;
32849   }
32850   #endif
32851   {
32852     PyObject *etype, *eval, *etb;
32853     PyErr_Fetch(&etype, &eval, &etb);
32854     ++Py_REFCNT(o);
32855     __pyx_array___dealloc__(o);
32856     --Py_REFCNT(o);
32857     PyErr_Restore(etype, eval, etb);
32858   }
32859   Py_CLEAR(p->mode);
32860   Py_CLEAR(p->_format);
32861   (*Py_TYPE(o)->tp_free)(o);
32862 }
__pyx_sq_item_array(PyObject * o,Py_ssize_t i)32863 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
32864   PyObject *r;
32865   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
32866   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
32867   Py_DECREF(x);
32868   return r;
32869 }
32870 
__pyx_mp_ass_subscript_array(PyObject * o,PyObject * i,PyObject * v)32871 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
32872   if (v) {
32873     return __pyx_array___setitem__(o, i, v);
32874   }
32875   else {
32876     PyErr_Format(PyExc_NotImplementedError,
32877       "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
32878     return -1;
32879   }
32880 }
32881 
__pyx_tp_getattro_array(PyObject * o,PyObject * n)32882 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
32883   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
32884   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
32885     PyErr_Clear();
32886     v = __pyx_array___getattr__(o, n);
32887   }
32888   return v;
32889 }
32890 
__pyx_getprop___pyx_array_memview(PyObject * o,CYTHON_UNUSED void * x)32891 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
32892   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
32893 }
32894 
32895 static PyMethodDef __pyx_methods_array[] = {
32896   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
32897   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
32898   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
32899   {0, 0, 0, 0}
32900 };
32901 
32902 static struct PyGetSetDef __pyx_getsets_array[] = {
32903   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
32904   {0, 0, 0, 0, 0}
32905 };
32906 
32907 static PySequenceMethods __pyx_tp_as_sequence_array = {
32908   __pyx_array___len__, /*sq_length*/
32909   0, /*sq_concat*/
32910   0, /*sq_repeat*/
32911   __pyx_sq_item_array, /*sq_item*/
32912   0, /*sq_slice*/
32913   0, /*sq_ass_item*/
32914   0, /*sq_ass_slice*/
32915   0, /*sq_contains*/
32916   0, /*sq_inplace_concat*/
32917   0, /*sq_inplace_repeat*/
32918 };
32919 
32920 static PyMappingMethods __pyx_tp_as_mapping_array = {
32921   __pyx_array___len__, /*mp_length*/
32922   __pyx_array___getitem__, /*mp_subscript*/
32923   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
32924 };
32925 
32926 static PyBufferProcs __pyx_tp_as_buffer_array = {
32927   #if PY_MAJOR_VERSION < 3
32928   0, /*bf_getreadbuffer*/
32929   #endif
32930   #if PY_MAJOR_VERSION < 3
32931   0, /*bf_getwritebuffer*/
32932   #endif
32933   #if PY_MAJOR_VERSION < 3
32934   0, /*bf_getsegcount*/
32935   #endif
32936   #if PY_MAJOR_VERSION < 3
32937   0, /*bf_getcharbuffer*/
32938   #endif
32939   __pyx_array_getbuffer, /*bf_getbuffer*/
32940   0, /*bf_releasebuffer*/
32941 };
32942 
32943 static PyTypeObject __pyx_type___pyx_array = {
32944   PyVarObject_HEAD_INIT(0, 0)
32945   "yt.geometry.particle_deposit.array", /*tp_name*/
32946   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
32947   0, /*tp_itemsize*/
32948   __pyx_tp_dealloc_array, /*tp_dealloc*/
32949   0, /*tp_print*/
32950   0, /*tp_getattr*/
32951   0, /*tp_setattr*/
32952   #if PY_MAJOR_VERSION < 3
32953   0, /*tp_compare*/
32954   #endif
32955   #if PY_MAJOR_VERSION >= 3
32956   0, /*tp_as_async*/
32957   #endif
32958   0, /*tp_repr*/
32959   0, /*tp_as_number*/
32960   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
32961   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
32962   0, /*tp_hash*/
32963   0, /*tp_call*/
32964   0, /*tp_str*/
32965   __pyx_tp_getattro_array, /*tp_getattro*/
32966   0, /*tp_setattro*/
32967   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
32968   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
32969   0, /*tp_doc*/
32970   0, /*tp_traverse*/
32971   0, /*tp_clear*/
32972   0, /*tp_richcompare*/
32973   0, /*tp_weaklistoffset*/
32974   0, /*tp_iter*/
32975   0, /*tp_iternext*/
32976   __pyx_methods_array, /*tp_methods*/
32977   0, /*tp_members*/
32978   __pyx_getsets_array, /*tp_getset*/
32979   0, /*tp_base*/
32980   0, /*tp_dict*/
32981   0, /*tp_descr_get*/
32982   0, /*tp_descr_set*/
32983   0, /*tp_dictoffset*/
32984   0, /*tp_init*/
32985   0, /*tp_alloc*/
32986   __pyx_tp_new_array, /*tp_new*/
32987   0, /*tp_free*/
32988   0, /*tp_is_gc*/
32989   0, /*tp_bases*/
32990   0, /*tp_mro*/
32991   0, /*tp_cache*/
32992   0, /*tp_subclasses*/
32993   0, /*tp_weaklist*/
32994   0, /*tp_del*/
32995   0, /*tp_version_tag*/
32996   #if PY_VERSION_HEX >= 0x030400a1
32997   0, /*tp_finalize*/
32998   #endif
32999   #if PY_VERSION_HEX >= 0x030800b1
33000   0, /*tp_vectorcall*/
33001   #endif
33002 };
33003 
__pyx_tp_new_Enum(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)33004 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
33005   struct __pyx_MemviewEnum_obj *p;
33006   PyObject *o;
33007   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
33008     o = (*t->tp_alloc)(t, 0);
33009   } else {
33010     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
33011   }
33012   if (unlikely(!o)) return 0;
33013   p = ((struct __pyx_MemviewEnum_obj *)o);
33014   p->name = Py_None; Py_INCREF(Py_None);
33015   return o;
33016 }
33017 
__pyx_tp_dealloc_Enum(PyObject * o)33018 static void __pyx_tp_dealloc_Enum(PyObject *o) {
33019   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
33020   #if CYTHON_USE_TP_FINALIZE
33021   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
33022     if (PyObject_CallFinalizerFromDealloc(o)) return;
33023   }
33024   #endif
33025   PyObject_GC_UnTrack(o);
33026   Py_CLEAR(p->name);
33027   (*Py_TYPE(o)->tp_free)(o);
33028 }
33029 
__pyx_tp_traverse_Enum(PyObject * o,visitproc v,void * a)33030 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
33031   int e;
33032   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
33033   if (p->name) {
33034     e = (*v)(p->name, a); if (e) return e;
33035   }
33036   return 0;
33037 }
33038 
__pyx_tp_clear_Enum(PyObject * o)33039 static int __pyx_tp_clear_Enum(PyObject *o) {
33040   PyObject* tmp;
33041   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
33042   tmp = ((PyObject*)p->name);
33043   p->name = Py_None; Py_INCREF(Py_None);
33044   Py_XDECREF(tmp);
33045   return 0;
33046 }
33047 
33048 static PyMethodDef __pyx_methods_Enum[] = {
33049   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
33050   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
33051   {0, 0, 0, 0}
33052 };
33053 
33054 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
33055   PyVarObject_HEAD_INIT(0, 0)
33056   "yt.geometry.particle_deposit.Enum", /*tp_name*/
33057   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
33058   0, /*tp_itemsize*/
33059   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
33060   0, /*tp_print*/
33061   0, /*tp_getattr*/
33062   0, /*tp_setattr*/
33063   #if PY_MAJOR_VERSION < 3
33064   0, /*tp_compare*/
33065   #endif
33066   #if PY_MAJOR_VERSION >= 3
33067   0, /*tp_as_async*/
33068   #endif
33069   __pyx_MemviewEnum___repr__, /*tp_repr*/
33070   0, /*tp_as_number*/
33071   0, /*tp_as_sequence*/
33072   0, /*tp_as_mapping*/
33073   0, /*tp_hash*/
33074   0, /*tp_call*/
33075   0, /*tp_str*/
33076   0, /*tp_getattro*/
33077   0, /*tp_setattro*/
33078   0, /*tp_as_buffer*/
33079   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33080   0, /*tp_doc*/
33081   __pyx_tp_traverse_Enum, /*tp_traverse*/
33082   __pyx_tp_clear_Enum, /*tp_clear*/
33083   0, /*tp_richcompare*/
33084   0, /*tp_weaklistoffset*/
33085   0, /*tp_iter*/
33086   0, /*tp_iternext*/
33087   __pyx_methods_Enum, /*tp_methods*/
33088   0, /*tp_members*/
33089   0, /*tp_getset*/
33090   0, /*tp_base*/
33091   0, /*tp_dict*/
33092   0, /*tp_descr_get*/
33093   0, /*tp_descr_set*/
33094   0, /*tp_dictoffset*/
33095   __pyx_MemviewEnum___init__, /*tp_init*/
33096   0, /*tp_alloc*/
33097   __pyx_tp_new_Enum, /*tp_new*/
33098   0, /*tp_free*/
33099   0, /*tp_is_gc*/
33100   0, /*tp_bases*/
33101   0, /*tp_mro*/
33102   0, /*tp_cache*/
33103   0, /*tp_subclasses*/
33104   0, /*tp_weaklist*/
33105   0, /*tp_del*/
33106   0, /*tp_version_tag*/
33107   #if PY_VERSION_HEX >= 0x030400a1
33108   0, /*tp_finalize*/
33109   #endif
33110   #if PY_VERSION_HEX >= 0x030800b1
33111   0, /*tp_vectorcall*/
33112   #endif
33113 };
33114 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
33115 
__pyx_tp_new_memoryview(PyTypeObject * t,PyObject * a,PyObject * k)33116 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
33117   struct __pyx_memoryview_obj *p;
33118   PyObject *o;
33119   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
33120     o = (*t->tp_alloc)(t, 0);
33121   } else {
33122     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
33123   }
33124   if (unlikely(!o)) return 0;
33125   p = ((struct __pyx_memoryview_obj *)o);
33126   p->__pyx_vtab = __pyx_vtabptr_memoryview;
33127   p->obj = Py_None; Py_INCREF(Py_None);
33128   p->_size = Py_None; Py_INCREF(Py_None);
33129   p->_array_interface = Py_None; Py_INCREF(Py_None);
33130   p->view.obj = NULL;
33131   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
33132   return o;
33133   bad:
33134   Py_DECREF(o); o = 0;
33135   return NULL;
33136 }
33137 
__pyx_tp_dealloc_memoryview(PyObject * o)33138 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
33139   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
33140   #if CYTHON_USE_TP_FINALIZE
33141   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
33142     if (PyObject_CallFinalizerFromDealloc(o)) return;
33143   }
33144   #endif
33145   PyObject_GC_UnTrack(o);
33146   {
33147     PyObject *etype, *eval, *etb;
33148     PyErr_Fetch(&etype, &eval, &etb);
33149     ++Py_REFCNT(o);
33150     __pyx_memoryview___dealloc__(o);
33151     --Py_REFCNT(o);
33152     PyErr_Restore(etype, eval, etb);
33153   }
33154   Py_CLEAR(p->obj);
33155   Py_CLEAR(p->_size);
33156   Py_CLEAR(p->_array_interface);
33157   (*Py_TYPE(o)->tp_free)(o);
33158 }
33159 
__pyx_tp_traverse_memoryview(PyObject * o,visitproc v,void * a)33160 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
33161   int e;
33162   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
33163   if (p->obj) {
33164     e = (*v)(p->obj, a); if (e) return e;
33165   }
33166   if (p->_size) {
33167     e = (*v)(p->_size, a); if (e) return e;
33168   }
33169   if (p->_array_interface) {
33170     e = (*v)(p->_array_interface, a); if (e) return e;
33171   }
33172   if (p->view.obj) {
33173     e = (*v)(p->view.obj, a); if (e) return e;
33174   }
33175   return 0;
33176 }
33177 
__pyx_tp_clear_memoryview(PyObject * o)33178 static int __pyx_tp_clear_memoryview(PyObject *o) {
33179   PyObject* tmp;
33180   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
33181   tmp = ((PyObject*)p->obj);
33182   p->obj = Py_None; Py_INCREF(Py_None);
33183   Py_XDECREF(tmp);
33184   tmp = ((PyObject*)p->_size);
33185   p->_size = Py_None; Py_INCREF(Py_None);
33186   Py_XDECREF(tmp);
33187   tmp = ((PyObject*)p->_array_interface);
33188   p->_array_interface = Py_None; Py_INCREF(Py_None);
33189   Py_XDECREF(tmp);
33190   Py_CLEAR(p->view.obj);
33191   return 0;
33192 }
__pyx_sq_item_memoryview(PyObject * o,Py_ssize_t i)33193 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
33194   PyObject *r;
33195   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
33196   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
33197   Py_DECREF(x);
33198   return r;
33199 }
33200 
__pyx_mp_ass_subscript_memoryview(PyObject * o,PyObject * i,PyObject * v)33201 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
33202   if (v) {
33203     return __pyx_memoryview___setitem__(o, i, v);
33204   }
33205   else {
33206     PyErr_Format(PyExc_NotImplementedError,
33207       "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
33208     return -1;
33209   }
33210 }
33211 
__pyx_getprop___pyx_memoryview_T(PyObject * o,CYTHON_UNUSED void * x)33212 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
33213   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
33214 }
33215 
__pyx_getprop___pyx_memoryview_base(PyObject * o,CYTHON_UNUSED void * x)33216 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
33217   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
33218 }
33219 
__pyx_getprop___pyx_memoryview_shape(PyObject * o,CYTHON_UNUSED void * x)33220 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
33221   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
33222 }
33223 
__pyx_getprop___pyx_memoryview_strides(PyObject * o,CYTHON_UNUSED void * x)33224 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
33225   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
33226 }
33227 
__pyx_getprop___pyx_memoryview_suboffsets(PyObject * o,CYTHON_UNUSED void * x)33228 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
33229   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
33230 }
33231 
__pyx_getprop___pyx_memoryview_ndim(PyObject * o,CYTHON_UNUSED void * x)33232 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
33233   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
33234 }
33235 
__pyx_getprop___pyx_memoryview_itemsize(PyObject * o,CYTHON_UNUSED void * x)33236 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
33237   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
33238 }
33239 
__pyx_getprop___pyx_memoryview_nbytes(PyObject * o,CYTHON_UNUSED void * x)33240 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
33241   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
33242 }
33243 
__pyx_getprop___pyx_memoryview_size(PyObject * o,CYTHON_UNUSED void * x)33244 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
33245   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
33246 }
33247 
33248 static PyMethodDef __pyx_methods_memoryview[] = {
33249   {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
33250   {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
33251   {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
33252   {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
33253   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
33254   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
33255   {0, 0, 0, 0}
33256 };
33257 
33258 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
33259   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
33260   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
33261   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
33262   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
33263   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
33264   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
33265   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
33266   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
33267   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
33268   {0, 0, 0, 0, 0}
33269 };
33270 
33271 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
33272   __pyx_memoryview___len__, /*sq_length*/
33273   0, /*sq_concat*/
33274   0, /*sq_repeat*/
33275   __pyx_sq_item_memoryview, /*sq_item*/
33276   0, /*sq_slice*/
33277   0, /*sq_ass_item*/
33278   0, /*sq_ass_slice*/
33279   0, /*sq_contains*/
33280   0, /*sq_inplace_concat*/
33281   0, /*sq_inplace_repeat*/
33282 };
33283 
33284 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
33285   __pyx_memoryview___len__, /*mp_length*/
33286   __pyx_memoryview___getitem__, /*mp_subscript*/
33287   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
33288 };
33289 
33290 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
33291   #if PY_MAJOR_VERSION < 3
33292   0, /*bf_getreadbuffer*/
33293   #endif
33294   #if PY_MAJOR_VERSION < 3
33295   0, /*bf_getwritebuffer*/
33296   #endif
33297   #if PY_MAJOR_VERSION < 3
33298   0, /*bf_getsegcount*/
33299   #endif
33300   #if PY_MAJOR_VERSION < 3
33301   0, /*bf_getcharbuffer*/
33302   #endif
33303   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
33304   0, /*bf_releasebuffer*/
33305 };
33306 
33307 static PyTypeObject __pyx_type___pyx_memoryview = {
33308   PyVarObject_HEAD_INIT(0, 0)
33309   "yt.geometry.particle_deposit.memoryview", /*tp_name*/
33310   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
33311   0, /*tp_itemsize*/
33312   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
33313   0, /*tp_print*/
33314   0, /*tp_getattr*/
33315   0, /*tp_setattr*/
33316   #if PY_MAJOR_VERSION < 3
33317   0, /*tp_compare*/
33318   #endif
33319   #if PY_MAJOR_VERSION >= 3
33320   0, /*tp_as_async*/
33321   #endif
33322   __pyx_memoryview___repr__, /*tp_repr*/
33323   0, /*tp_as_number*/
33324   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
33325   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
33326   0, /*tp_hash*/
33327   0, /*tp_call*/
33328   __pyx_memoryview___str__, /*tp_str*/
33329   0, /*tp_getattro*/
33330   0, /*tp_setattro*/
33331   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
33332   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33333   0, /*tp_doc*/
33334   __pyx_tp_traverse_memoryview, /*tp_traverse*/
33335   __pyx_tp_clear_memoryview, /*tp_clear*/
33336   0, /*tp_richcompare*/
33337   0, /*tp_weaklistoffset*/
33338   0, /*tp_iter*/
33339   0, /*tp_iternext*/
33340   __pyx_methods_memoryview, /*tp_methods*/
33341   0, /*tp_members*/
33342   __pyx_getsets_memoryview, /*tp_getset*/
33343   0, /*tp_base*/
33344   0, /*tp_dict*/
33345   0, /*tp_descr_get*/
33346   0, /*tp_descr_set*/
33347   0, /*tp_dictoffset*/
33348   0, /*tp_init*/
33349   0, /*tp_alloc*/
33350   __pyx_tp_new_memoryview, /*tp_new*/
33351   0, /*tp_free*/
33352   0, /*tp_is_gc*/
33353   0, /*tp_bases*/
33354   0, /*tp_mro*/
33355   0, /*tp_cache*/
33356   0, /*tp_subclasses*/
33357   0, /*tp_weaklist*/
33358   0, /*tp_del*/
33359   0, /*tp_version_tag*/
33360   #if PY_VERSION_HEX >= 0x030400a1
33361   0, /*tp_finalize*/
33362   #endif
33363   #if PY_VERSION_HEX >= 0x030800b1
33364   0, /*tp_vectorcall*/
33365   #endif
33366 };
33367 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
33368 
__pyx_tp_new__memoryviewslice(PyTypeObject * t,PyObject * a,PyObject * k)33369 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
33370   struct __pyx_memoryviewslice_obj *p;
33371   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
33372   if (unlikely(!o)) return 0;
33373   p = ((struct __pyx_memoryviewslice_obj *)o);
33374   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
33375   p->from_object = Py_None; Py_INCREF(Py_None);
33376   p->from_slice.memview = NULL;
33377   return o;
33378 }
33379 
__pyx_tp_dealloc__memoryviewslice(PyObject * o)33380 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
33381   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
33382   #if CYTHON_USE_TP_FINALIZE
33383   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
33384     if (PyObject_CallFinalizerFromDealloc(o)) return;
33385   }
33386   #endif
33387   PyObject_GC_UnTrack(o);
33388   {
33389     PyObject *etype, *eval, *etb;
33390     PyErr_Fetch(&etype, &eval, &etb);
33391     ++Py_REFCNT(o);
33392     __pyx_memoryviewslice___dealloc__(o);
33393     --Py_REFCNT(o);
33394     PyErr_Restore(etype, eval, etb);
33395   }
33396   Py_CLEAR(p->from_object);
33397   PyObject_GC_Track(o);
33398   __pyx_tp_dealloc_memoryview(o);
33399 }
33400 
__pyx_tp_traverse__memoryviewslice(PyObject * o,visitproc v,void * a)33401 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
33402   int e;
33403   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
33404   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
33405   if (p->from_object) {
33406     e = (*v)(p->from_object, a); if (e) return e;
33407   }
33408   return 0;
33409 }
33410 
__pyx_tp_clear__memoryviewslice(PyObject * o)33411 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
33412   PyObject* tmp;
33413   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
33414   __pyx_tp_clear_memoryview(o);
33415   tmp = ((PyObject*)p->from_object);
33416   p->from_object = Py_None; Py_INCREF(Py_None);
33417   Py_XDECREF(tmp);
33418   __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
33419   return 0;
33420 }
33421 
__pyx_getprop___pyx_memoryviewslice_base(PyObject * o,CYTHON_UNUSED void * x)33422 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
33423   return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
33424 }
33425 
33426 static PyMethodDef __pyx_methods__memoryviewslice[] = {
33427   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
33428   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
33429   {0, 0, 0, 0}
33430 };
33431 
33432 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
33433   {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
33434   {0, 0, 0, 0, 0}
33435 };
33436 
33437 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
33438   PyVarObject_HEAD_INIT(0, 0)
33439   "yt.geometry.particle_deposit._memoryviewslice", /*tp_name*/
33440   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
33441   0, /*tp_itemsize*/
33442   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
33443   0, /*tp_print*/
33444   0, /*tp_getattr*/
33445   0, /*tp_setattr*/
33446   #if PY_MAJOR_VERSION < 3
33447   0, /*tp_compare*/
33448   #endif
33449   #if PY_MAJOR_VERSION >= 3
33450   0, /*tp_as_async*/
33451   #endif
33452   #if CYTHON_COMPILING_IN_PYPY
33453   __pyx_memoryview___repr__, /*tp_repr*/
33454   #else
33455   0, /*tp_repr*/
33456   #endif
33457   0, /*tp_as_number*/
33458   0, /*tp_as_sequence*/
33459   0, /*tp_as_mapping*/
33460   0, /*tp_hash*/
33461   0, /*tp_call*/
33462   #if CYTHON_COMPILING_IN_PYPY
33463   __pyx_memoryview___str__, /*tp_str*/
33464   #else
33465   0, /*tp_str*/
33466   #endif
33467   0, /*tp_getattro*/
33468   0, /*tp_setattro*/
33469   0, /*tp_as_buffer*/
33470   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33471   "Internal class for passing memoryview slices to Python", /*tp_doc*/
33472   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
33473   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
33474   0, /*tp_richcompare*/
33475   0, /*tp_weaklistoffset*/
33476   0, /*tp_iter*/
33477   0, /*tp_iternext*/
33478   __pyx_methods__memoryviewslice, /*tp_methods*/
33479   0, /*tp_members*/
33480   __pyx_getsets__memoryviewslice, /*tp_getset*/
33481   0, /*tp_base*/
33482   0, /*tp_dict*/
33483   0, /*tp_descr_get*/
33484   0, /*tp_descr_set*/
33485   0, /*tp_dictoffset*/
33486   0, /*tp_init*/
33487   0, /*tp_alloc*/
33488   __pyx_tp_new__memoryviewslice, /*tp_new*/
33489   0, /*tp_free*/
33490   0, /*tp_is_gc*/
33491   0, /*tp_bases*/
33492   0, /*tp_mro*/
33493   0, /*tp_cache*/
33494   0, /*tp_subclasses*/
33495   0, /*tp_weaklist*/
33496   0, /*tp_del*/
33497   0, /*tp_version_tag*/
33498   #if PY_VERSION_HEX >= 0x030400a1
33499   0, /*tp_finalize*/
33500   #endif
33501   #if PY_VERSION_HEX >= 0x030800b1
33502   0, /*tp_vectorcall*/
33503   #endif
33504 };
33505 
33506 static PyMethodDef __pyx_methods[] = {
33507   {0, 0, 0, 0}
33508 };
33509 
33510 #if PY_MAJOR_VERSION >= 3
33511 #if CYTHON_PEP489_MULTI_PHASE_INIT
33512 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
33513 static int __pyx_pymod_exec_particle_deposit(PyObject* module); /*proto*/
33514 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
33515   {Py_mod_create, (void*)__pyx_pymod_create},
33516   {Py_mod_exec, (void*)__pyx_pymod_exec_particle_deposit},
33517   {0, NULL}
33518 };
33519 #endif
33520 
33521 static struct PyModuleDef __pyx_moduledef = {
33522     PyModuleDef_HEAD_INIT,
33523     "particle_deposit",
33524     __pyx_k_Particle_Deposition_onto_Cells, /* m_doc */
33525   #if CYTHON_PEP489_MULTI_PHASE_INIT
33526     0, /* m_size */
33527   #else
33528     -1, /* m_size */
33529   #endif
33530     __pyx_methods /* m_methods */,
33531   #if CYTHON_PEP489_MULTI_PHASE_INIT
33532     __pyx_moduledef_slots, /* m_slots */
33533   #else
33534     NULL, /* m_reload */
33535   #endif
33536     NULL, /* m_traverse */
33537     NULL, /* m_clear */
33538     NULL /* m_free */
33539 };
33540 #endif
33541 #ifndef CYTHON_SMALL_CODE
33542 #if defined(__clang__)
33543     #define CYTHON_SMALL_CODE
33544 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
33545     #define CYTHON_SMALL_CODE __attribute__((cold))
33546 #else
33547     #define CYTHON_SMALL_CODE
33548 #endif
33549 #endif
33550 
33551 static __Pyx_StringTabEntry __pyx_string_tab[] = {
33552   {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
33553   {&__pyx_n_s_ActiveDimensions, __pyx_k_ActiveDimensions, sizeof(__pyx_k_ActiveDimensions), 0, 0, 1, 1},
33554   {&__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},
33555   {&__pyx_n_s_CICDeposit, __pyx_k_CICDeposit, sizeof(__pyx_k_CICDeposit), 0, 0, 1, 1},
33556   {&__pyx_kp_s_CIC_requires_minimum_of_2_zones, __pyx_k_CIC_requires_minimum_of_2_zones, sizeof(__pyx_k_CIC_requires_minimum_of_2_zones), 0, 0, 1, 0},
33557   {&__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},
33558   {&__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},
33559   {&__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},
33560   {&__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},
33561   {&__pyx_n_s_CellIdentifier, __pyx_k_CellIdentifier, sizeof(__pyx_k_CellIdentifier), 0, 0, 1, 1},
33562   {&__pyx_n_s_CountParticles, __pyx_k_CountParticles, sizeof(__pyx_k_CountParticles), 0, 0, 1, 1},
33563   {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
33564   {&__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},
33565   {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
33566   {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
33567   {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
33568   {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
33569   {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
33570   {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
33571   {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
33572   {&__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},
33573   {&__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},
33574   {&__pyx_n_s_LeftEdge, __pyx_k_LeftEdge, sizeof(__pyx_k_LeftEdge), 0, 0, 1, 1},
33575   {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
33576   {&__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},
33577   {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
33578   {&__pyx_n_s_MeshIdentifier, __pyx_k_MeshIdentifier, sizeof(__pyx_k_MeshIdentifier), 0, 0, 1, 1},
33579   {&__pyx_n_s_NNParticleField, __pyx_k_NNParticleField, sizeof(__pyx_k_NNParticleField), 0, 0, 1, 1},
33580   {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
33581   {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
33582   {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
33583   {&__pyx_n_s_OnceIndirect, __pyx_k_OnceIndirect, sizeof(__pyx_k_OnceIndirect), 0, 0, 1, 1},
33584   {&__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},
33585   {&__pyx_n_s_ParticleDepositOperation, __pyx_k_ParticleDepositOperation, sizeof(__pyx_k_ParticleDepositOperation), 0, 0, 1, 1},
33586   {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
33587   {&__pyx_n_s_RightEdge, __pyx_k_RightEdge, sizeof(__pyx_k_RightEdge), 0, 0, 1, 1},
33588   {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
33589   {&__pyx_n_s_SimpleSmooth, __pyx_k_SimpleSmooth, sizeof(__pyx_k_SimpleSmooth), 0, 0, 1, 1},
33590   {&__pyx_n_s_StdParticleField, __pyx_k_StdParticleField, sizeof(__pyx_k_StdParticleField), 0, 0, 1, 1},
33591   {&__pyx_n_s_SumParticleField, __pyx_k_SumParticleField, sizeof(__pyx_k_SumParticleField), 0, 0, 1, 1},
33592   {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
33593   {&__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},
33594   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
33595   {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
33596   {&__pyx_n_s_WeightedMeanParticleField, __pyx_k_WeightedMeanParticleField, sizeof(__pyx_k_WeightedMeanParticleField), 0, 0, 1, 1},
33597   {&__pyx_n_s_YTBoundsDefinitionError, __pyx_k_YTBoundsDefinitionError, sizeof(__pyx_k_YTBoundsDefinitionError), 0, 0, 1, 1},
33598   {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
33599   {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
33600   {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
33601   {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
33602   {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
33603   {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
33604   {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
33605   {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
33606   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
33607   {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
33608   {&__pyx_n_s_code_length, __pyx_k_code_length, sizeof(__pyx_k_code_length), 0, 0, 1, 1},
33609   {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
33610   {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
33611   {&__pyx_n_s_convert_to_units, __pyx_k_convert_to_units, sizeof(__pyx_k_convert_to_units), 0, 0, 1, 1},
33612   {&__pyx_n_s_cubic, __pyx_k_cubic, sizeof(__pyx_k_cubic), 0, 0, 1, 1},
33613   {&__pyx_n_s_dds, __pyx_k_dds, sizeof(__pyx_k_dds), 0, 0, 1, 1},
33614   {&__pyx_n_s_deposit_cell_id, __pyx_k_deposit_cell_id, sizeof(__pyx_k_deposit_cell_id), 0, 0, 1, 1},
33615   {&__pyx_n_s_deposit_cic, __pyx_k_deposit_cic, sizeof(__pyx_k_deposit_cic), 0, 0, 1, 1},
33616   {&__pyx_n_s_deposit_count, __pyx_k_deposit_count, sizeof(__pyx_k_deposit_count), 0, 0, 1, 1},
33617   {&__pyx_n_s_deposit_mesh_id, __pyx_k_deposit_mesh_id, sizeof(__pyx_k_deposit_mesh_id), 0, 0, 1, 1},
33618   {&__pyx_n_s_deposit_nearest, __pyx_k_deposit_nearest, sizeof(__pyx_k_deposit_nearest), 0, 0, 1, 1},
33619   {&__pyx_n_s_deposit_simple_smooth, __pyx_k_deposit_simple_smooth, sizeof(__pyx_k_deposit_simple_smooth), 0, 0, 1, 1},
33620   {&__pyx_n_s_deposit_std, __pyx_k_deposit_std, sizeof(__pyx_k_deposit_std), 0, 0, 1, 1},
33621   {&__pyx_n_s_deposit_sum, __pyx_k_deposit_sum, sizeof(__pyx_k_deposit_sum), 0, 0, 1, 1},
33622   {&__pyx_n_s_deposit_weighted_mean, __pyx_k_deposit_weighted_mean, sizeof(__pyx_k_deposit_weighted_mean), 0, 0, 1, 1},
33623   {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
33624   {&__pyx_n_s_divide, __pyx_k_divide, sizeof(__pyx_k_divide), 0, 0, 1, 1},
33625   {&__pyx_n_s_dom_ind, __pyx_k_dom_ind, sizeof(__pyx_k_dom_ind), 0, 0, 1, 1},
33626   {&__pyx_n_s_domain_id, __pyx_k_domain_id, sizeof(__pyx_k_domain_id), 0, 0, 1, 1},
33627   {&__pyx_n_s_domain_offset, __pyx_k_domain_offset, sizeof(__pyx_k_domain_offset), 0, 0, 1, 1},
33628   {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
33629   {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
33630   {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
33631   {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
33632   {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
33633   {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
33634   {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
33635   {&__pyx_n_s_errstate, __pyx_k_errstate, sizeof(__pyx_k_errstate), 0, 0, 1, 1},
33636   {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
33637   {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
33638   {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
33639   {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
33640   {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
33641   {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
33642   {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
33643   {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
33644   {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
33645   {&__pyx_n_s_gobj, __pyx_k_gobj, sizeof(__pyx_k_gobj), 0, 0, 1, 1},
33646   {&__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},
33647   {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
33648   {&__pyx_n_s_ignore, __pyx_k_ignore, sizeof(__pyx_k_ignore), 0, 0, 1, 1},
33649   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
33650   {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1},
33651   {&__pyx_n_s_initialize_locals_genexpr, __pyx_k_initialize_locals_genexpr, sizeof(__pyx_k_initialize_locals_genexpr), 0, 0, 1, 1},
33652   {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
33653   {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1},
33654   {&__pyx_n_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 1},
33655   {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
33656   {&__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},
33657   {&__pyx_n_s_kernel_name, __pyx_k_kernel_name, sizeof(__pyx_k_kernel_name), 0, 0, 1, 1},
33658   {&__pyx_n_s_lvlmax, __pyx_k_lvlmax, sizeof(__pyx_k_lvlmax), 0, 0, 1, 1},
33659   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
33660   {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
33661   {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
33662   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
33663   {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
33664   {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
33665   {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
33666   {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
33667   {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
33668   {&__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},
33669   {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
33670   {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
33671   {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
33672   {&__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},
33673   {&__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},
33674   {&__pyx_n_s_nvals, __pyx_k_nvals, sizeof(__pyx_k_nvals), 0, 0, 1, 1},
33675   {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
33676   {&__pyx_n_s_octree, __pyx_k_octree, sizeof(__pyx_k_octree), 0, 0, 1, 1},
33677   {&__pyx_n_s_odata, __pyx_k_odata, sizeof(__pyx_k_odata), 0, 0, 1, 1},
33678   {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
33679   {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
33680   {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
33681   {&__pyx_n_s_positions, __pyx_k_positions, sizeof(__pyx_k_positions), 0, 0, 1, 1},
33682   {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
33683   {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
33684   {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
33685   {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
33686   {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
33687   {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
33688   {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
33689   {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
33690   {&__pyx_n_s_quartic, __pyx_k_quartic, sizeof(__pyx_k_quartic), 0, 0, 1, 1},
33691   {&__pyx_n_s_quintic, __pyx_k_quintic, sizeof(__pyx_k_quintic), 0, 0, 1, 1},
33692   {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
33693   {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
33694   {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
33695   {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
33696   {&__pyx_kp_s_self_sph_kernel_cannot_be_conver, __pyx_k_self_sph_kernel_cannot_be_conver, sizeof(__pyx_k_self_sph_kernel_cannot_be_conver), 0, 0, 1, 0},
33697   {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
33698   {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
33699   {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
33700   {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
33701   {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
33702   {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
33703   {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
33704   {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
33705   {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
33706   {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
33707   {&__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},
33708   {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
33709   {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
33710   {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
33711   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
33712   {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
33713   {&__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},
33714   {&__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},
33715   {&__pyx_n_s_units, __pyx_k_units, sizeof(__pyx_k_units), 0, 0, 1, 1},
33716   {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
33717   {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
33718   {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
33719   {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
33720   {&__pyx_n_s_wendland2, __pyx_k_wendland2, sizeof(__pyx_k_wendland2), 0, 0, 1, 1},
33721   {&__pyx_n_s_wendland4, __pyx_k_wendland4, sizeof(__pyx_k_wendland4), 0, 0, 1, 1},
33722   {&__pyx_n_s_wendland6, __pyx_k_wendland6, sizeof(__pyx_k_wendland6), 0, 0, 1, 1},
33723   {&__pyx_n_s_yt_geometry_particle_deposit, __pyx_k_yt_geometry_particle_deposit, sizeof(__pyx_k_yt_geometry_particle_deposit), 0, 0, 1, 1},
33724   {&__pyx_n_s_yt_utilities_exceptions, __pyx_k_yt_utilities_exceptions, sizeof(__pyx_k_yt_utilities_exceptions), 0, 0, 1, 1},
33725   {&__pyx_n_s_yt_utilities_lib_misc_utilities, __pyx_k_yt_utilities_lib_misc_utilities, sizeof(__pyx_k_yt_utilities_lib_misc_utilities), 0, 0, 1, 1},
33726   {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
33727   {0, 0, 0, 0, 0, 0, 0}
33728 };
__Pyx_InitCachedBuiltins(void)33729 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
33730   __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 137, __pyx_L1_error)
33731   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 81, __pyx_L1_error)
33732   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(2, 2, __pyx_L1_error)
33733   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(3, 272, __pyx_L1_error)
33734   __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 856, __pyx_L1_error)
33735   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 1038, __pyx_L1_error)
33736   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 148, __pyx_L1_error)
33737   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(2, 151, __pyx_L1_error)
33738   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(2, 400, __pyx_L1_error)
33739   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(2, 609, __pyx_L1_error)
33740   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(2, 828, __pyx_L1_error)
33741   return 0;
33742   __pyx_L1_error:;
33743   return -1;
33744 }
33745 
__Pyx_InitCachedConstants(void)33746 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
33747   __Pyx_RefNannyDeclarations
33748   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
33749 
33750   /* "yt/geometry/particle_deposit.pyx":32
33751  *     # Avoid copies
33752  *     arr2 = arr.view()
33753  *     arr2.shape = arr2.shape + (1,) * (naxes - arr2.ndim)             # <<<<<<<<<<<<<<
33754  *     return arr2
33755  *
33756  */
33757   __pyx_tuple_ = PyTuple_New(1); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 32, __pyx_L1_error)
33758   __Pyx_GOTREF(__pyx_tuple_);
33759   __Pyx_INCREF(__pyx_int_1);
33760   __Pyx_GIVEREF(__pyx_int_1);
33761   PyTuple_SET_ITEM(__pyx_tuple_, 0, __pyx_int_1);
33762   __Pyx_GIVEREF(__pyx_tuple_);
33763 
33764   /* "(tree fragment)":2
33765  * def __reduce_cython__(self):
33766  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33767  * def __setstate_cython__(self, __pyx_state):
33768  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33769  */
33770   __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(2, 2, __pyx_L1_error)
33771   __Pyx_GOTREF(__pyx_tuple__2);
33772   __Pyx_GIVEREF(__pyx_tuple__2);
33773 
33774   /* "(tree fragment)":4
33775  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33776  * def __setstate_cython__(self, __pyx_state):
33777  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33778  */
33779   __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 4, __pyx_L1_error)
33780   __Pyx_GOTREF(__pyx_tuple__3);
33781   __Pyx_GIVEREF(__pyx_tuple__3);
33782 
33783   /* "(tree fragment)":2
33784  * def __reduce_cython__(self):
33785  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33786  * def __setstate_cython__(self, __pyx_state):
33787  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33788  */
33789   __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 2, __pyx_L1_error)
33790   __Pyx_GOTREF(__pyx_tuple__4);
33791   __Pyx_GIVEREF(__pyx_tuple__4);
33792 
33793   /* "(tree fragment)":4
33794  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33795  * def __setstate_cython__(self, __pyx_state):
33796  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33797  */
33798   __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 4, __pyx_L1_error)
33799   __Pyx_GOTREF(__pyx_tuple__5);
33800   __Pyx_GIVEREF(__pyx_tuple__5);
33801 
33802   /* "(tree fragment)":2
33803  * def __reduce_cython__(self):
33804  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33805  * def __setstate_cython__(self, __pyx_state):
33806  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33807  */
33808   __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 2, __pyx_L1_error)
33809   __Pyx_GOTREF(__pyx_tuple__6);
33810   __Pyx_GIVEREF(__pyx_tuple__6);
33811 
33812   /* "(tree fragment)":4
33813  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33814  * def __setstate_cython__(self, __pyx_state):
33815  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33816  */
33817   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 4, __pyx_L1_error)
33818   __Pyx_GOTREF(__pyx_tuple__7);
33819   __Pyx_GIVEREF(__pyx_tuple__7);
33820 
33821   /* "(tree fragment)":2
33822  * def __reduce_cython__(self):
33823  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33824  * def __setstate_cython__(self, __pyx_state):
33825  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33826  */
33827   __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 2, __pyx_L1_error)
33828   __Pyx_GOTREF(__pyx_tuple__8);
33829   __Pyx_GIVEREF(__pyx_tuple__8);
33830 
33831   /* "(tree fragment)":4
33832  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33833  * def __setstate_cython__(self, __pyx_state):
33834  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33835  */
33836   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 4, __pyx_L1_error)
33837   __Pyx_GOTREF(__pyx_tuple__9);
33838   __Pyx_GIVEREF(__pyx_tuple__9);
33839 
33840   /* "(tree fragment)":2
33841  * def __reduce_cython__(self):
33842  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33843  * def __setstate_cython__(self, __pyx_state):
33844  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33845  */
33846   __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 2, __pyx_L1_error)
33847   __Pyx_GOTREF(__pyx_tuple__10);
33848   __Pyx_GIVEREF(__pyx_tuple__10);
33849 
33850   /* "(tree fragment)":4
33851  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33852  * def __setstate_cython__(self, __pyx_state):
33853  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33854  */
33855   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 4, __pyx_L1_error)
33856   __Pyx_GOTREF(__pyx_tuple__11);
33857   __Pyx_GIVEREF(__pyx_tuple__11);
33858 
33859   /* "yt/geometry/particle_deposit.pyx":358
33860  *     cdef public object ofield
33861  *     def initialize(self):
33862  *         if not all(_ > 1 for _ in self.nvals[:-1]):             # <<<<<<<<<<<<<<
33863  *             from yt.utilities.exceptions import YTBoundsDefinitionError
33864  *             raise YTBoundsDefinitionError(
33865  */
33866   __pyx_slice__12 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(1, 358, __pyx_L1_error)
33867   __Pyx_GOTREF(__pyx_slice__12);
33868   __Pyx_GIVEREF(__pyx_slice__12);
33869 
33870   /* "(tree fragment)":2
33871  * def __reduce_cython__(self):
33872  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33873  * def __setstate_cython__(self, __pyx_state):
33874  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33875  */
33876   __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 2, __pyx_L1_error)
33877   __Pyx_GOTREF(__pyx_tuple__13);
33878   __Pyx_GIVEREF(__pyx_tuple__13);
33879 
33880   /* "(tree fragment)":4
33881  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33882  * def __setstate_cython__(self, __pyx_state):
33883  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33884  */
33885   __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 4, __pyx_L1_error)
33886   __Pyx_GOTREF(__pyx_tuple__14);
33887   __Pyx_GIVEREF(__pyx_tuple__14);
33888 
33889   /* "yt/geometry/particle_deposit.pyx":442
33890  *         wf = np.asarray(self.wf)
33891  *         w = np.asarray(self.w)
33892  *         with np.errstate(divide='ignore', invalid='ignore'):             # <<<<<<<<<<<<<<
33893  *             rv = wf / w
33894  *         rv.shape = self.nvals
33895  */
33896   __pyx_tuple__15 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 442, __pyx_L1_error)
33897   __Pyx_GOTREF(__pyx_tuple__15);
33898   __Pyx_GIVEREF(__pyx_tuple__15);
33899 
33900   /* "(tree fragment)":2
33901  * def __reduce_cython__(self):
33902  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33903  * def __setstate_cython__(self, __pyx_state):
33904  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33905  */
33906   __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 2, __pyx_L1_error)
33907   __Pyx_GOTREF(__pyx_tuple__16);
33908   __Pyx_GIVEREF(__pyx_tuple__16);
33909 
33910   /* "(tree fragment)":4
33911  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33912  * def __setstate_cython__(self, __pyx_state):
33913  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33914  */
33915   __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 4, __pyx_L1_error)
33916   __Pyx_GOTREF(__pyx_tuple__17);
33917   __Pyx_GIVEREF(__pyx_tuple__17);
33918 
33919   /* "(tree fragment)":2
33920  * def __reduce_cython__(self):
33921  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33922  * def __setstate_cython__(self, __pyx_state):
33923  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33924  */
33925   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 2, __pyx_L1_error)
33926   __Pyx_GOTREF(__pyx_tuple__18);
33927   __Pyx_GIVEREF(__pyx_tuple__18);
33928 
33929   /* "(tree fragment)":4
33930  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33931  * def __setstate_cython__(self, __pyx_state):
33932  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33933  */
33934   __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 4, __pyx_L1_error)
33935   __Pyx_GOTREF(__pyx_tuple__19);
33936   __Pyx_GIVEREF(__pyx_tuple__19);
33937 
33938   /* "(tree fragment)":2
33939  * def __reduce_cython__(self):
33940  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33941  * def __setstate_cython__(self, __pyx_state):
33942  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33943  */
33944   __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 2, __pyx_L1_error)
33945   __Pyx_GOTREF(__pyx_tuple__20);
33946   __Pyx_GIVEREF(__pyx_tuple__20);
33947 
33948   /* "(tree fragment)":4
33949  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33950  * def __setstate_cython__(self, __pyx_state):
33951  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33952  */
33953   __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 4, __pyx_L1_error)
33954   __Pyx_GOTREF(__pyx_tuple__21);
33955   __Pyx_GIVEREF(__pyx_tuple__21);
33956 
33957   /* "(tree fragment)":2
33958  * def __reduce_cython__(self):
33959  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33960  * def __setstate_cython__(self, __pyx_state):
33961  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33962  */
33963   __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 2, __pyx_L1_error)
33964   __Pyx_GOTREF(__pyx_tuple__22);
33965   __Pyx_GIVEREF(__pyx_tuple__22);
33966 
33967   /* "(tree fragment)":4
33968  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")
33969  * def __setstate_cython__(self, __pyx_state):
33970  *     raise TypeError("self.sph_kernel cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
33971  */
33972   __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_self_sph_kernel_cannot_be_conver); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(2, 4, __pyx_L1_error)
33973   __Pyx_GOTREF(__pyx_tuple__23);
33974   __Pyx_GIVEREF(__pyx_tuple__23);
33975 
33976   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
33977  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
33978  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
33979  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
33980  *
33981  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
33982  */
33983   __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(3, 272, __pyx_L1_error)
33984   __Pyx_GOTREF(__pyx_tuple__24);
33985   __Pyx_GIVEREF(__pyx_tuple__24);
33986 
33987   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
33988  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
33989  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
33990  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
33991  *
33992  *             info.buf = PyArray_DATA(self)
33993  */
33994   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(3, 276, __pyx_L1_error)
33995   __Pyx_GOTREF(__pyx_tuple__25);
33996   __Pyx_GIVEREF(__pyx_tuple__25);
33997 
33998   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
33999  *                 if ((descr.byteorder == c'>' and little_endian) or
34000  *                     (descr.byteorder == c'<' and not little_endian)):
34001  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
34002  *                 if   t == NPY_BYTE:        f = "b"
34003  *                 elif t == NPY_UBYTE:       f = "B"
34004  */
34005   __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(3, 306, __pyx_L1_error)
34006   __Pyx_GOTREF(__pyx_tuple__26);
34007   __Pyx_GIVEREF(__pyx_tuple__26);
34008 
34009   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
34010  *
34011  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
34012  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
34013  *
34014  *         if ((child.byteorder == c'>' and little_endian) or
34015  */
34016   __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 856, __pyx_L1_error)
34017   __Pyx_GOTREF(__pyx_tuple__27);
34018   __Pyx_GIVEREF(__pyx_tuple__27);
34019 
34020   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
34021  *             t = child.type_num
34022  *             if end - f < 5:
34023  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
34024  *
34025  *             # Until ticket #99 is fixed, use integers to avoid warnings
34026  */
34027   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(3, 880, __pyx_L1_error)
34028   __Pyx_GOTREF(__pyx_tuple__28);
34029   __Pyx_GIVEREF(__pyx_tuple__28);
34030 
34031   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
34032  *         _import_array()
34033  *     except Exception:
34034  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
34035  *
34036  * cdef inline int import_umath() except -1:
34037  */
34038   __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(3, 1038, __pyx_L1_error)
34039   __Pyx_GOTREF(__pyx_tuple__29);
34040   __Pyx_GIVEREF(__pyx_tuple__29);
34041 
34042   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
34043  *         _import_umath()
34044  *     except Exception:
34045  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
34046  *
34047  * cdef inline int import_ufunc() except -1:
34048  */
34049   __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(3, 1044, __pyx_L1_error)
34050   __Pyx_GOTREF(__pyx_tuple__30);
34051   __Pyx_GIVEREF(__pyx_tuple__30);
34052 
34053   /* "View.MemoryView":133
34054  *
34055  *         if not self.ndim:
34056  *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
34057  *
34058  *         if itemsize <= 0:
34059  */
34060   __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 133, __pyx_L1_error)
34061   __Pyx_GOTREF(__pyx_tuple__31);
34062   __Pyx_GIVEREF(__pyx_tuple__31);
34063 
34064   /* "View.MemoryView":136
34065  *
34066  *         if itemsize <= 0:
34067  *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
34068  *
34069  *         if not isinstance(format, bytes):
34070  */
34071   __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 136, __pyx_L1_error)
34072   __Pyx_GOTREF(__pyx_tuple__32);
34073   __Pyx_GIVEREF(__pyx_tuple__32);
34074 
34075   /* "View.MemoryView":148
34076  *
34077  *         if not self._shape:
34078  *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
34079  *
34080  *
34081  */
34082   __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 148, __pyx_L1_error)
34083   __Pyx_GOTREF(__pyx_tuple__33);
34084   __Pyx_GIVEREF(__pyx_tuple__33);
34085 
34086   /* "View.MemoryView":176
34087  *             self.data = <char *>malloc(self.len)
34088  *             if not self.data:
34089  *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
34090  *
34091  *             if self.dtype_is_object:
34092  */
34093   __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 176, __pyx_L1_error)
34094   __Pyx_GOTREF(__pyx_tuple__34);
34095   __Pyx_GIVEREF(__pyx_tuple__34);
34096 
34097   /* "View.MemoryView":192
34098  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
34099  *         if not (flags & bufmode):
34100  *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
34101  *         info.buf = self.data
34102  *         info.len = self.len
34103  */
34104   __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 192, __pyx_L1_error)
34105   __Pyx_GOTREF(__pyx_tuple__35);
34106   __Pyx_GIVEREF(__pyx_tuple__35);
34107 
34108   /* "(tree fragment)":2
34109  * def __reduce_cython__(self):
34110  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
34111  * def __setstate_cython__(self, __pyx_state):
34112  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
34113  */
34114   __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 2, __pyx_L1_error)
34115   __Pyx_GOTREF(__pyx_tuple__36);
34116   __Pyx_GIVEREF(__pyx_tuple__36);
34117 
34118   /* "(tree fragment)":4
34119  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
34120  * def __setstate_cython__(self, __pyx_state):
34121  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
34122  */
34123   __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 4, __pyx_L1_error)
34124   __Pyx_GOTREF(__pyx_tuple__37);
34125   __Pyx_GIVEREF(__pyx_tuple__37);
34126 
34127   /* "View.MemoryView":414
34128  *     def __setitem__(memoryview self, object index, object value):
34129  *         if self.view.readonly:
34130  *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
34131  *
34132  *         have_slices, index = _unellipsify(index, self.view.ndim)
34133  */
34134   __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(2, 414, __pyx_L1_error)
34135   __Pyx_GOTREF(__pyx_tuple__38);
34136   __Pyx_GIVEREF(__pyx_tuple__38);
34137 
34138   /* "View.MemoryView":491
34139  *             result = struct.unpack(self.view.format, bytesitem)
34140  *         except struct.error:
34141  *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
34142  *         else:
34143  *             if len(self.view.format) == 1:
34144  */
34145   __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(2, 491, __pyx_L1_error)
34146   __Pyx_GOTREF(__pyx_tuple__39);
34147   __Pyx_GIVEREF(__pyx_tuple__39);
34148 
34149   /* "View.MemoryView":516
34150  *     def __getbuffer__(self, Py_buffer *info, int flags):
34151  *         if flags & PyBUF_WRITABLE and self.view.readonly:
34152  *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
34153  *
34154  *         if flags & PyBUF_ND:
34155  */
34156   __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 516, __pyx_L1_error)
34157   __Pyx_GOTREF(__pyx_tuple__40);
34158   __Pyx_GIVEREF(__pyx_tuple__40);
34159 
34160   /* "View.MemoryView":566
34161  *         if self.view.strides == NULL:
34162  *
34163  *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
34164  *
34165  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
34166  */
34167   __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 566, __pyx_L1_error)
34168   __Pyx_GOTREF(__pyx_tuple__41);
34169   __Pyx_GIVEREF(__pyx_tuple__41);
34170 
34171   /* "View.MemoryView":573
34172  *     def suboffsets(self):
34173  *         if self.view.suboffsets == NULL:
34174  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
34175  *
34176  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
34177  */
34178   __pyx_tuple__42 = PyTuple_New(1); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 573, __pyx_L1_error)
34179   __Pyx_GOTREF(__pyx_tuple__42);
34180   __Pyx_INCREF(__pyx_int_neg_1);
34181   __Pyx_GIVEREF(__pyx_int_neg_1);
34182   PyTuple_SET_ITEM(__pyx_tuple__42, 0, __pyx_int_neg_1);
34183   __Pyx_GIVEREF(__pyx_tuple__42);
34184 
34185   /* "(tree fragment)":2
34186  * def __reduce_cython__(self):
34187  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
34188  * def __setstate_cython__(self, __pyx_state):
34189  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
34190  */
34191   __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 2, __pyx_L1_error)
34192   __Pyx_GOTREF(__pyx_tuple__43);
34193   __Pyx_GIVEREF(__pyx_tuple__43);
34194 
34195   /* "(tree fragment)":4
34196  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
34197  * def __setstate_cython__(self, __pyx_state):
34198  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
34199  */
34200   __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 4, __pyx_L1_error)
34201   __Pyx_GOTREF(__pyx_tuple__44);
34202   __Pyx_GIVEREF(__pyx_tuple__44);
34203 
34204   /* "View.MemoryView":678
34205  *         if item is Ellipsis:
34206  *             if not seen_ellipsis:
34207  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
34208  *                 seen_ellipsis = True
34209  *             else:
34210  */
34211   __pyx_slice__45 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__45)) __PYX_ERR(2, 678, __pyx_L1_error)
34212   __Pyx_GOTREF(__pyx_slice__45);
34213   __Pyx_GIVEREF(__pyx_slice__45);
34214 
34215   /* "View.MemoryView":699
34216  *     for suboffset in suboffsets[:ndim]:
34217  *         if suboffset >= 0:
34218  *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
34219  *
34220  *
34221  */
34222   __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 699, __pyx_L1_error)
34223   __Pyx_GOTREF(__pyx_tuple__46);
34224   __Pyx_GIVEREF(__pyx_tuple__46);
34225 
34226   /* "(tree fragment)":2
34227  * def __reduce_cython__(self):
34228  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
34229  * def __setstate_cython__(self, __pyx_state):
34230  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
34231  */
34232   __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 2, __pyx_L1_error)
34233   __Pyx_GOTREF(__pyx_tuple__47);
34234   __Pyx_GIVEREF(__pyx_tuple__47);
34235 
34236   /* "(tree fragment)":4
34237  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
34238  * def __setstate_cython__(self, __pyx_state):
34239  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
34240  */
34241   __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 4, __pyx_L1_error)
34242   __Pyx_GOTREF(__pyx_tuple__48);
34243   __Pyx_GIVEREF(__pyx_tuple__48);
34244 
34245   /* "View.MemoryView":286
34246  *         return self.name
34247  *
34248  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
34249  * cdef strided = Enum("<strided and direct>") # default
34250  * cdef indirect = Enum("<strided and indirect>")
34251  */
34252   __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(2, 286, __pyx_L1_error)
34253   __Pyx_GOTREF(__pyx_tuple__49);
34254   __Pyx_GIVEREF(__pyx_tuple__49);
34255 
34256   /* "View.MemoryView":287
34257  *
34258  * cdef generic = Enum("<strided and direct or indirect>")
34259  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
34260  * cdef indirect = Enum("<strided and indirect>")
34261  *
34262  */
34263   __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(2, 287, __pyx_L1_error)
34264   __Pyx_GOTREF(__pyx_tuple__50);
34265   __Pyx_GIVEREF(__pyx_tuple__50);
34266 
34267   /* "View.MemoryView":288
34268  * cdef generic = Enum("<strided and direct or indirect>")
34269  * cdef strided = Enum("<strided and direct>") # default
34270  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
34271  *
34272  *
34273  */
34274   __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(2, 288, __pyx_L1_error)
34275   __Pyx_GOTREF(__pyx_tuple__51);
34276   __Pyx_GIVEREF(__pyx_tuple__51);
34277 
34278   /* "View.MemoryView":291
34279  *
34280  *
34281  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
34282  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
34283  *
34284  */
34285   __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(2, 291, __pyx_L1_error)
34286   __Pyx_GOTREF(__pyx_tuple__52);
34287   __Pyx_GIVEREF(__pyx_tuple__52);
34288 
34289   /* "View.MemoryView":292
34290  *
34291  * cdef contiguous = Enum("<contiguous and direct>")
34292  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
34293  *
34294  *
34295  */
34296   __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(2, 292, __pyx_L1_error)
34297   __Pyx_GOTREF(__pyx_tuple__53);
34298   __Pyx_GIVEREF(__pyx_tuple__53);
34299 
34300   /* "(tree fragment)":1
34301  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
34302  *     cdef object __pyx_PickleError
34303  *     cdef object __pyx_result
34304  */
34305   __pyx_tuple__54 = 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__54)) __PYX_ERR(2, 1, __pyx_L1_error)
34306   __Pyx_GOTREF(__pyx_tuple__54);
34307   __Pyx_GIVEREF(__pyx_tuple__54);
34308   __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(2, 1, __pyx_L1_error)
34309   __Pyx_RefNannyFinishContext();
34310   return 0;
34311   __pyx_L1_error:;
34312   __Pyx_RefNannyFinishContext();
34313   return -1;
34314 }
34315 
__Pyx_InitGlobals(void)34316 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
34317   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
34318   __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(1, 1, __pyx_L1_error)
34319   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
34320   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
34321   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(1, 1, __pyx_L1_error)
34322   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error)
34323   return 0;
34324   __pyx_L1_error:;
34325   return -1;
34326 }
34327 
34328 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
34329 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
34330 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
34331 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
34332 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
34333 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
34334 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
34335 
__Pyx_modinit_global_init_code(void)34336 static int __Pyx_modinit_global_init_code(void) {
34337   __Pyx_RefNannyDeclarations
34338   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
34339   /*--- Global init code ---*/
34340   generic = Py_None; Py_INCREF(Py_None);
34341   strided = Py_None; Py_INCREF(Py_None);
34342   indirect = Py_None; Py_INCREF(Py_None);
34343   contiguous = Py_None; Py_INCREF(Py_None);
34344   indirect_contiguous = Py_None; Py_INCREF(Py_None);
34345   __Pyx_RefNannyFinishContext();
34346   return 0;
34347 }
34348 
__Pyx_modinit_variable_export_code(void)34349 static int __Pyx_modinit_variable_export_code(void) {
34350   __Pyx_RefNannyDeclarations
34351   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
34352   /*--- Variable export code ---*/
34353   __Pyx_RefNannyFinishContext();
34354   return 0;
34355 }
34356 
__Pyx_modinit_function_export_code(void)34357 static int __Pyx_modinit_function_export_code(void) {
34358   __Pyx_RefNannyDeclarations
34359   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
34360   /*--- Function export code ---*/
34361   __Pyx_RefNannyFinishContext();
34362   return 0;
34363 }
34364 
__Pyx_modinit_type_init_code(void)34365 static int __Pyx_modinit_type_init_code(void) {
34366   __Pyx_RefNannyDeclarations
34367   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
34368   /*--- Type init code ---*/
34369   __pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation = &__pyx_vtable_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34370   __pyx_vtable_2yt_8geometry_16particle_deposit_ParticleDepositOperation.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_24ParticleDepositOperation_process;
34371   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
34372   #if PY_VERSION_HEX < 0x030800B1
34373   __pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation.tp_print = 0;
34374   #endif
34375   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation.tp_getattro == PyObject_GenericGetAttr)) {
34376     __pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34377   }
34378   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
34379   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ParticleDepositOperation, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
34380   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
34381   __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation = &__pyx_type_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34382   __pyx_vtabptr_2yt_8geometry_16particle_deposit_CountParticles = &__pyx_vtable_2yt_8geometry_16particle_deposit_CountParticles;
34383   __pyx_vtable_2yt_8geometry_16particle_deposit_CountParticles.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34384   __pyx_vtable_2yt_8geometry_16particle_deposit_CountParticles.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_14CountParticles_process;
34385   __pyx_type_2yt_8geometry_16particle_deposit_CountParticles.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34386   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_CountParticles) < 0) __PYX_ERR(1, 166, __pyx_L1_error)
34387   #if PY_VERSION_HEX < 0x030800B1
34388   __pyx_type_2yt_8geometry_16particle_deposit_CountParticles.tp_print = 0;
34389   #endif
34390   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_CountParticles.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_CountParticles.tp_getattro == PyObject_GenericGetAttr)) {
34391     __pyx_type_2yt_8geometry_16particle_deposit_CountParticles.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34392   }
34393   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_CountParticles.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_CountParticles) < 0) __PYX_ERR(1, 166, __pyx_L1_error)
34394   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CountParticles, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_CountParticles) < 0) __PYX_ERR(1, 166, __pyx_L1_error)
34395   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_CountParticles) < 0) __PYX_ERR(1, 166, __pyx_L1_error)
34396   __pyx_ptype_2yt_8geometry_16particle_deposit_CountParticles = &__pyx_type_2yt_8geometry_16particle_deposit_CountParticles;
34397   __pyx_vtabptr_2yt_8geometry_16particle_deposit_SimpleSmooth = &__pyx_vtable_2yt_8geometry_16particle_deposit_SimpleSmooth;
34398   __pyx_vtable_2yt_8geometry_16particle_deposit_SimpleSmooth.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34399   __pyx_vtable_2yt_8geometry_16particle_deposit_SimpleSmooth.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_12SimpleSmooth_process;
34400   __pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34401   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth) < 0) __PYX_ERR(1, 198, __pyx_L1_error)
34402   #if PY_VERSION_HEX < 0x030800B1
34403   __pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth.tp_print = 0;
34404   #endif
34405   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth.tp_getattro == PyObject_GenericGetAttr)) {
34406     __pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34407   }
34408   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_SimpleSmooth) < 0) __PYX_ERR(1, 198, __pyx_L1_error)
34409   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SimpleSmooth, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth) < 0) __PYX_ERR(1, 198, __pyx_L1_error)
34410   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth) < 0) __PYX_ERR(1, 198, __pyx_L1_error)
34411   __pyx_ptype_2yt_8geometry_16particle_deposit_SimpleSmooth = &__pyx_type_2yt_8geometry_16particle_deposit_SimpleSmooth;
34412   __pyx_vtabptr_2yt_8geometry_16particle_deposit_SumParticleField = &__pyx_vtable_2yt_8geometry_16particle_deposit_SumParticleField;
34413   __pyx_vtable_2yt_8geometry_16particle_deposit_SumParticleField.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34414   __pyx_vtable_2yt_8geometry_16particle_deposit_SumParticleField.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_16SumParticleField_process;
34415   __pyx_type_2yt_8geometry_16particle_deposit_SumParticleField.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34416   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_SumParticleField) < 0) __PYX_ERR(1, 266, __pyx_L1_error)
34417   #if PY_VERSION_HEX < 0x030800B1
34418   __pyx_type_2yt_8geometry_16particle_deposit_SumParticleField.tp_print = 0;
34419   #endif
34420   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_SumParticleField.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_SumParticleField.tp_getattro == PyObject_GenericGetAttr)) {
34421     __pyx_type_2yt_8geometry_16particle_deposit_SumParticleField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34422   }
34423   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_SumParticleField.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_SumParticleField) < 0) __PYX_ERR(1, 266, __pyx_L1_error)
34424   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SumParticleField, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_SumParticleField) < 0) __PYX_ERR(1, 266, __pyx_L1_error)
34425   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_SumParticleField) < 0) __PYX_ERR(1, 266, __pyx_L1_error)
34426   __pyx_ptype_2yt_8geometry_16particle_deposit_SumParticleField = &__pyx_type_2yt_8geometry_16particle_deposit_SumParticleField;
34427   __pyx_vtabptr_2yt_8geometry_16particle_deposit_StdParticleField = &__pyx_vtable_2yt_8geometry_16particle_deposit_StdParticleField;
34428   __pyx_vtable_2yt_8geometry_16particle_deposit_StdParticleField.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34429   __pyx_vtable_2yt_8geometry_16particle_deposit_StdParticleField.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_16StdParticleField_process;
34430   __pyx_type_2yt_8geometry_16particle_deposit_StdParticleField.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34431   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_StdParticleField) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
34432   #if PY_VERSION_HEX < 0x030800B1
34433   __pyx_type_2yt_8geometry_16particle_deposit_StdParticleField.tp_print = 0;
34434   #endif
34435   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_StdParticleField.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_StdParticleField.tp_getattro == PyObject_GenericGetAttr)) {
34436     __pyx_type_2yt_8geometry_16particle_deposit_StdParticleField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34437   }
34438   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_StdParticleField.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_StdParticleField) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
34439   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StdParticleField, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_StdParticleField) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
34440   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_StdParticleField) < 0) __PYX_ERR(1, 296, __pyx_L1_error)
34441   __pyx_ptype_2yt_8geometry_16particle_deposit_StdParticleField = &__pyx_type_2yt_8geometry_16particle_deposit_StdParticleField;
34442   __pyx_vtabptr_2yt_8geometry_16particle_deposit_CICDeposit = &__pyx_vtable_2yt_8geometry_16particle_deposit_CICDeposit;
34443   __pyx_vtable_2yt_8geometry_16particle_deposit_CICDeposit.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34444   __pyx_vtable_2yt_8geometry_16particle_deposit_CICDeposit.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_10CICDeposit_process;
34445   __pyx_type_2yt_8geometry_16particle_deposit_CICDeposit.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34446   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_CICDeposit) < 0) __PYX_ERR(1, 354, __pyx_L1_error)
34447   #if PY_VERSION_HEX < 0x030800B1
34448   __pyx_type_2yt_8geometry_16particle_deposit_CICDeposit.tp_print = 0;
34449   #endif
34450   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_CICDeposit.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_CICDeposit.tp_getattro == PyObject_GenericGetAttr)) {
34451     __pyx_type_2yt_8geometry_16particle_deposit_CICDeposit.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34452   }
34453   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_CICDeposit.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_CICDeposit) < 0) __PYX_ERR(1, 354, __pyx_L1_error)
34454   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CICDeposit, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_CICDeposit) < 0) __PYX_ERR(1, 354, __pyx_L1_error)
34455   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_CICDeposit) < 0) __PYX_ERR(1, 354, __pyx_L1_error)
34456   __pyx_ptype_2yt_8geometry_16particle_deposit_CICDeposit = &__pyx_type_2yt_8geometry_16particle_deposit_CICDeposit;
34457   __pyx_vtabptr_2yt_8geometry_16particle_deposit_WeightedMeanParticleField = &__pyx_vtable_2yt_8geometry_16particle_deposit_WeightedMeanParticleField;
34458   __pyx_vtable_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34459   __pyx_vtable_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_25WeightedMeanParticleField_process;
34460   __pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34461   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField) < 0) __PYX_ERR(1, 410, __pyx_L1_error)
34462   #if PY_VERSION_HEX < 0x030800B1
34463   __pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.tp_print = 0;
34464   #endif
34465   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.tp_getattro == PyObject_GenericGetAttr)) {
34466     __pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34467   }
34468   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_WeightedMeanParticleField) < 0) __PYX_ERR(1, 410, __pyx_L1_error)
34469   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WeightedMeanParticleField, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField) < 0) __PYX_ERR(1, 410, __pyx_L1_error)
34470   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField) < 0) __PYX_ERR(1, 410, __pyx_L1_error)
34471   __pyx_ptype_2yt_8geometry_16particle_deposit_WeightedMeanParticleField = &__pyx_type_2yt_8geometry_16particle_deposit_WeightedMeanParticleField;
34472   __pyx_vtabptr_2yt_8geometry_16particle_deposit_MeshIdentifier = &__pyx_vtable_2yt_8geometry_16particle_deposit_MeshIdentifier;
34473   __pyx_vtable_2yt_8geometry_16particle_deposit_MeshIdentifier.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34474   __pyx_vtable_2yt_8geometry_16particle_deposit_MeshIdentifier.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_14MeshIdentifier_process;
34475   __pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34476   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier) < 0) __PYX_ERR(1, 449, __pyx_L1_error)
34477   #if PY_VERSION_HEX < 0x030800B1
34478   __pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier.tp_print = 0;
34479   #endif
34480   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier.tp_getattro == PyObject_GenericGetAttr)) {
34481     __pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34482   }
34483   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_MeshIdentifier) < 0) __PYX_ERR(1, 449, __pyx_L1_error)
34484   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MeshIdentifier, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier) < 0) __PYX_ERR(1, 449, __pyx_L1_error)
34485   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier) < 0) __PYX_ERR(1, 449, __pyx_L1_error)
34486   __pyx_ptype_2yt_8geometry_16particle_deposit_MeshIdentifier = &__pyx_type_2yt_8geometry_16particle_deposit_MeshIdentifier;
34487   __pyx_vtabptr_2yt_8geometry_16particle_deposit_CellIdentifier = &__pyx_vtable_2yt_8geometry_16particle_deposit_CellIdentifier;
34488   __pyx_vtable_2yt_8geometry_16particle_deposit_CellIdentifier.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34489   __pyx_vtable_2yt_8geometry_16particle_deposit_CellIdentifier.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_14CellIdentifier_process;
34490   __pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34491   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier) < 0) __PYX_ERR(1, 474, __pyx_L1_error)
34492   #if PY_VERSION_HEX < 0x030800B1
34493   __pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier.tp_print = 0;
34494   #endif
34495   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier.tp_getattro == PyObject_GenericGetAttr)) {
34496     __pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34497   }
34498   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_CellIdentifier) < 0) __PYX_ERR(1, 474, __pyx_L1_error)
34499   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CellIdentifier, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier) < 0) __PYX_ERR(1, 474, __pyx_L1_error)
34500   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier) < 0) __PYX_ERR(1, 474, __pyx_L1_error)
34501   __pyx_ptype_2yt_8geometry_16particle_deposit_CellIdentifier = &__pyx_type_2yt_8geometry_16particle_deposit_CellIdentifier;
34502   __pyx_vtabptr_2yt_8geometry_16particle_deposit_NNParticleField = &__pyx_vtable_2yt_8geometry_16particle_deposit_NNParticleField;
34503   __pyx_vtable_2yt_8geometry_16particle_deposit_NNParticleField.__pyx_base = *__pyx_vtabptr_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34504   __pyx_vtable_2yt_8geometry_16particle_deposit_NNParticleField.__pyx_base.process = (int (*)(struct __pyx_obj_2yt_8geometry_16particle_deposit_ParticleDepositOperation *, int *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_float64_t *, __Pyx_memviewslice, __pyx_t_5numpy_int64_t))__pyx_f_2yt_8geometry_16particle_deposit_15NNParticleField_process;
34505   __pyx_type_2yt_8geometry_16particle_deposit_NNParticleField.tp_base = __pyx_ptype_2yt_8geometry_16particle_deposit_ParticleDepositOperation;
34506   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit_NNParticleField) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
34507   #if PY_VERSION_HEX < 0x030800B1
34508   __pyx_type_2yt_8geometry_16particle_deposit_NNParticleField.tp_print = 0;
34509   #endif
34510   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit_NNParticleField.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit_NNParticleField.tp_getattro == PyObject_GenericGetAttr)) {
34511     __pyx_type_2yt_8geometry_16particle_deposit_NNParticleField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34512   }
34513   if (__Pyx_SetVtable(__pyx_type_2yt_8geometry_16particle_deposit_NNParticleField.tp_dict, __pyx_vtabptr_2yt_8geometry_16particle_deposit_NNParticleField) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
34514   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NNParticleField, (PyObject *)&__pyx_type_2yt_8geometry_16particle_deposit_NNParticleField) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
34515   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_8geometry_16particle_deposit_NNParticleField) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
34516   __pyx_ptype_2yt_8geometry_16particle_deposit_NNParticleField = &__pyx_type_2yt_8geometry_16particle_deposit_NNParticleField;
34517   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize) < 0) __PYX_ERR(1, 357, __pyx_L1_error)
34518   #if PY_VERSION_HEX < 0x030800B1
34519   __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize.tp_print = 0;
34520   #endif
34521   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize.tp_getattro == PyObject_GenericGetAttr)) {
34522     __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
34523   }
34524   __pyx_ptype_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize = &__pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct__initialize;
34525   if (PyType_Ready(&__pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(1, 358, __pyx_L1_error)
34526   #if PY_VERSION_HEX < 0x030800B1
34527   __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr.tp_print = 0;
34528   #endif
34529   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
34530     __pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
34531   }
34532   __pyx_ptype_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr = &__pyx_type_2yt_8geometry_16particle_deposit___pyx_scope_struct_1_genexpr;
34533   __pyx_vtabptr_array = &__pyx_vtable_array;
34534   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
34535   if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
34536   #if PY_VERSION_HEX < 0x030800B1
34537   __pyx_type___pyx_array.tp_print = 0;
34538   #endif
34539   if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
34540   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
34541   __pyx_array_type = &__pyx_type___pyx_array;
34542   if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
34543   #if PY_VERSION_HEX < 0x030800B1
34544   __pyx_type___pyx_MemviewEnum.tp_print = 0;
34545   #endif
34546   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
34547     __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34548   }
34549   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
34550   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
34551   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
34552   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
34553   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
34554   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
34555   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
34556   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
34557   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
34558   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
34559   if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
34560   #if PY_VERSION_HEX < 0x030800B1
34561   __pyx_type___pyx_memoryview.tp_print = 0;
34562   #endif
34563   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
34564     __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34565   }
34566   if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
34567   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
34568   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
34569   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
34570   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
34571   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
34572   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
34573   __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
34574   if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
34575   #if PY_VERSION_HEX < 0x030800B1
34576   __pyx_type___pyx_memoryviewslice.tp_print = 0;
34577   #endif
34578   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
34579     __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
34580   }
34581   if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
34582   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
34583   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
34584   __Pyx_RefNannyFinishContext();
34585   return 0;
34586   __pyx_L1_error:;
34587   __Pyx_RefNannyFinishContext();
34588   return -1;
34589 }
34590 
__Pyx_modinit_type_import_code(void)34591 static int __Pyx_modinit_type_import_code(void) {
34592   __Pyx_RefNannyDeclarations
34593   PyObject *__pyx_t_1 = NULL;
34594   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
34595   /*--- Type import code ---*/
34596   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error)
34597   __Pyx_GOTREF(__pyx_t_1);
34598   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
34599   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
34600   sizeof(PyTypeObject),
34601   #else
34602   sizeof(PyHeapTypeObject),
34603   #endif
34604   __Pyx_ImportType_CheckSize_Warn);
34605    if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(6, 9, __pyx_L1_error)
34606   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34607   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 206, __pyx_L1_error)
34608   __Pyx_GOTREF(__pyx_t_1);
34609   __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
34610    if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 206, __pyx_L1_error)
34611   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
34612    if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 229, __pyx_L1_error)
34613   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
34614    if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 233, __pyx_L1_error)
34615   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
34616    if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 242, __pyx_L1_error)
34617   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
34618    if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 918, __pyx_L1_error)
34619   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34620   __pyx_t_1 = PyImport_ImportModule("yt.geometry.oct_visitors"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 33, __pyx_L1_error)
34621   __Pyx_GOTREF(__pyx_t_1);
34622   __pyx_ptype_2yt_8geometry_12oct_visitors_OctVisitor = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "OctVisitor", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_OctVisitor), __Pyx_ImportType_CheckSize_Warn);
34623    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_OctVisitor) __PYX_ERR(7, 33, __pyx_L1_error)
34624   __pyx_vtabptr_2yt_8geometry_12oct_visitors_OctVisitor = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_OctVisitor*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_OctVisitor->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_OctVisitor)) __PYX_ERR(7, 33, __pyx_L1_error)
34625   __pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "CountTotalOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_CountTotalOcts), __Pyx_ImportType_CheckSize_Warn);
34626    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalOcts) __PYX_ERR(7, 59, __pyx_L1_error)
34627   __pyx_vtabptr_2yt_8geometry_12oct_visitors_CountTotalOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountTotalOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_CountTotalOcts)) __PYX_ERR(7, 59, __pyx_L1_error)
34628   __pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalCells = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "CountTotalCells", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_CountTotalCells), __Pyx_ImportType_CheckSize_Warn);
34629    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalCells) __PYX_ERR(7, 62, __pyx_L1_error)
34630   __pyx_vtabptr_2yt_8geometry_12oct_visitors_CountTotalCells = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountTotalCells*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_CountTotalCells->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_CountTotalCells)) __PYX_ERR(7, 62, __pyx_L1_error)
34631   __pyx_ptype_2yt_8geometry_12oct_visitors_MarkOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "MarkOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_MarkOcts), __Pyx_ImportType_CheckSize_Warn);
34632    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_MarkOcts) __PYX_ERR(7, 65, __pyx_L1_error)
34633   __pyx_vtabptr_2yt_8geometry_12oct_visitors_MarkOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MarkOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_MarkOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_MarkOcts)) __PYX_ERR(7, 65, __pyx_L1_error)
34634   __pyx_ptype_2yt_8geometry_12oct_visitors_MaskOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "MaskOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_MaskOcts), __Pyx_ImportType_CheckSize_Warn);
34635    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_MaskOcts) __PYX_ERR(7, 69, __pyx_L1_error)
34636   __pyx_vtabptr_2yt_8geometry_12oct_visitors_MaskOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MaskOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_MaskOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_MaskOcts)) __PYX_ERR(7, 69, __pyx_L1_error)
34637   __pyx_ptype_2yt_8geometry_12oct_visitors_IndexOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "IndexOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_IndexOcts), __Pyx_ImportType_CheckSize_Warn);
34638    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_IndexOcts) __PYX_ERR(7, 72, __pyx_L1_error)
34639   __pyx_vtabptr_2yt_8geometry_12oct_visitors_IndexOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IndexOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_IndexOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_IndexOcts)) __PYX_ERR(7, 72, __pyx_L1_error)
34640   __pyx_ptype_2yt_8geometry_12oct_visitors_MaskedIndexOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "MaskedIndexOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_MaskedIndexOcts), __Pyx_ImportType_CheckSize_Warn);
34641    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_MaskedIndexOcts) __PYX_ERR(7, 75, __pyx_L1_error)
34642   __pyx_vtabptr_2yt_8geometry_12oct_visitors_MaskedIndexOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MaskedIndexOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_MaskedIndexOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_MaskedIndexOcts)) __PYX_ERR(7, 75, __pyx_L1_error)
34643   __pyx_ptype_2yt_8geometry_12oct_visitors_IndexMaskMapOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "IndexMaskMapOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_IndexMaskMapOcts), __Pyx_ImportType_CheckSize_Warn);
34644    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_IndexMaskMapOcts) __PYX_ERR(7, 79, __pyx_L1_error)
34645   __pyx_vtabptr_2yt_8geometry_12oct_visitors_IndexMaskMapOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IndexMaskMapOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_IndexMaskMapOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_IndexMaskMapOcts)) __PYX_ERR(7, 79, __pyx_L1_error)
34646   __pyx_ptype_2yt_8geometry_12oct_visitors_ICoordsOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "ICoordsOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_ICoordsOcts), __Pyx_ImportType_CheckSize_Warn);
34647    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_ICoordsOcts) __PYX_ERR(7, 85, __pyx_L1_error)
34648   __pyx_vtabptr_2yt_8geometry_12oct_visitors_ICoordsOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_ICoordsOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_ICoordsOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_ICoordsOcts)) __PYX_ERR(7, 85, __pyx_L1_error)
34649   __pyx_ptype_2yt_8geometry_12oct_visitors_IResOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "IResOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_IResOcts), __Pyx_ImportType_CheckSize_Warn);
34650    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_IResOcts) __PYX_ERR(7, 88, __pyx_L1_error)
34651   __pyx_vtabptr_2yt_8geometry_12oct_visitors_IResOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IResOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_IResOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_IResOcts)) __PYX_ERR(7, 88, __pyx_L1_error)
34652   __pyx_ptype_2yt_8geometry_12oct_visitors_FCoordsOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "FCoordsOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_FCoordsOcts), __Pyx_ImportType_CheckSize_Warn);
34653    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_FCoordsOcts) __PYX_ERR(7, 91, __pyx_L1_error)
34654   __pyx_vtabptr_2yt_8geometry_12oct_visitors_FCoordsOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FCoordsOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_FCoordsOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_FCoordsOcts)) __PYX_ERR(7, 91, __pyx_L1_error)
34655   __pyx_ptype_2yt_8geometry_12oct_visitors_FWidthOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "FWidthOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_FWidthOcts), __Pyx_ImportType_CheckSize_Warn);
34656    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_FWidthOcts) __PYX_ERR(7, 94, __pyx_L1_error)
34657   __pyx_vtabptr_2yt_8geometry_12oct_visitors_FWidthOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FWidthOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_FWidthOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_FWidthOcts)) __PYX_ERR(7, 94, __pyx_L1_error)
34658   __pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayI64 = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "CopyArrayI64", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyArrayI64), __Pyx_ImportType_CheckSize_Warn);
34659    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayI64) __PYX_ERR(7, 97, __pyx_L1_error)
34660   __pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyArrayI64 = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyArrayI64*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayI64->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyArrayI64)) __PYX_ERR(7, 97, __pyx_L1_error)
34661   __pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayF64 = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "CopyArrayF64", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyArrayF64), __Pyx_ImportType_CheckSize_Warn);
34662    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayF64) __PYX_ERR(7, 101, __pyx_L1_error)
34663   __pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyArrayF64 = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyArrayF64*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_CopyArrayF64->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyArrayF64)) __PYX_ERR(7, 101, __pyx_L1_error)
34664   __pyx_ptype_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8 = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "CopyFileIndArrayI8", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8), __Pyx_ImportType_CheckSize_Warn);
34665    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8) __PYX_ERR(7, 105, __pyx_L1_error)
34666   __pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8 = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_CopyFileIndArrayI8)) __PYX_ERR(7, 105, __pyx_L1_error)
34667   __pyx_ptype_2yt_8geometry_12oct_visitors_IdentifyOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "IdentifyOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_IdentifyOcts), __Pyx_ImportType_CheckSize_Warn);
34668    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_IdentifyOcts) __PYX_ERR(7, 110, __pyx_L1_error)
34669   __pyx_vtabptr_2yt_8geometry_12oct_visitors_IdentifyOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_IdentifyOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_IdentifyOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_IdentifyOcts)) __PYX_ERR(7, 110, __pyx_L1_error)
34670   __pyx_ptype_2yt_8geometry_12oct_visitors_AssignDomainInd = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "AssignDomainInd", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_AssignDomainInd), __Pyx_ImportType_CheckSize_Warn);
34671    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_AssignDomainInd) __PYX_ERR(7, 113, __pyx_L1_error)
34672   __pyx_vtabptr_2yt_8geometry_12oct_visitors_AssignDomainInd = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_AssignDomainInd*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_AssignDomainInd->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_AssignDomainInd)) __PYX_ERR(7, 113, __pyx_L1_error)
34673   __pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesO = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "FillFileIndicesO", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_FillFileIndicesO), __Pyx_ImportType_CheckSize_Warn);
34674    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesO) __PYX_ERR(7, 116, __pyx_L1_error)
34675   __pyx_vtabptr_2yt_8geometry_12oct_visitors_FillFileIndicesO = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FillFileIndicesO*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesO->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_FillFileIndicesO)) __PYX_ERR(7, 116, __pyx_L1_error)
34676   __pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesR = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "FillFileIndicesR", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_FillFileIndicesR), __Pyx_ImportType_CheckSize_Warn);
34677    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesR) __PYX_ERR(7, 121, __pyx_L1_error)
34678   __pyx_vtabptr_2yt_8geometry_12oct_visitors_FillFileIndicesR = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_FillFileIndicesR*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_FillFileIndicesR->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_FillFileIndicesR)) __PYX_ERR(7, 121, __pyx_L1_error)
34679   __pyx_ptype_2yt_8geometry_12oct_visitors_CountByDomain = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "CountByDomain", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_CountByDomain), __Pyx_ImportType_CheckSize_Warn);
34680    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_CountByDomain) __PYX_ERR(7, 126, __pyx_L1_error)
34681   __pyx_vtabptr_2yt_8geometry_12oct_visitors_CountByDomain = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_CountByDomain*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_CountByDomain->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_CountByDomain)) __PYX_ERR(7, 126, __pyx_L1_error)
34682   __pyx_ptype_2yt_8geometry_12oct_visitors_StoreOctree = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "StoreOctree", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_StoreOctree), __Pyx_ImportType_CheckSize_Warn);
34683    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_StoreOctree) __PYX_ERR(7, 129, __pyx_L1_error)
34684   __pyx_vtabptr_2yt_8geometry_12oct_visitors_StoreOctree = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_StoreOctree*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_StoreOctree->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_StoreOctree)) __PYX_ERR(7, 129, __pyx_L1_error)
34685   __pyx_ptype_2yt_8geometry_12oct_visitors_LoadOctree = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "LoadOctree", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_LoadOctree), __Pyx_ImportType_CheckSize_Warn);
34686    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_LoadOctree) __PYX_ERR(7, 132, __pyx_L1_error)
34687   __pyx_vtabptr_2yt_8geometry_12oct_visitors_LoadOctree = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_LoadOctree*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_LoadOctree->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_LoadOctree)) __PYX_ERR(7, 132, __pyx_L1_error)
34688   __pyx_ptype_2yt_8geometry_12oct_visitors_MortonIndexOcts = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "MortonIndexOcts", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_MortonIndexOcts), __Pyx_ImportType_CheckSize_Warn);
34689    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_MortonIndexOcts) __PYX_ERR(7, 138, __pyx_L1_error)
34690   __pyx_vtabptr_2yt_8geometry_12oct_visitors_MortonIndexOcts = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_MortonIndexOcts*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_MortonIndexOcts->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_MortonIndexOcts)) __PYX_ERR(7, 138, __pyx_L1_error)
34691   __pyx_ptype_2yt_8geometry_12oct_visitors_StoreIndex = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "StoreIndex", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_StoreIndex), __Pyx_ImportType_CheckSize_Warn);
34692    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_StoreIndex) __PYX_ERR(7, 149, __pyx_L1_error)
34693   __pyx_vtabptr_2yt_8geometry_12oct_visitors_StoreIndex = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_StoreIndex*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_StoreIndex->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_StoreIndex)) __PYX_ERR(7, 149, __pyx_L1_error)
34694   __pyx_ptype_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "BaseNeighbourVisitor", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor), __Pyx_ImportType_CheckSize_Warn);
34695    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor) __PYX_ERR(7, 153, __pyx_L1_error)
34696   __pyx_vtabptr_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_BaseNeighbourVisitor)) __PYX_ERR(7, 153, __pyx_L1_error)
34697   __pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "NeighbourCellIndexVisitor", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor), __Pyx_ImportType_CheckSize_Warn);
34698    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor) __PYX_ERR(7, 169, __pyx_L1_error)
34699   __pyx_vtabptr_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_NeighbourCellIndexVisitor)) __PYX_ERR(7, 169, __pyx_L1_error)
34700   __pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellVisitor = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_visitors", "NeighbourCellVisitor", sizeof(struct __pyx_obj_2yt_8geometry_12oct_visitors_NeighbourCellVisitor), __Pyx_ImportType_CheckSize_Warn);
34701    if (!__pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellVisitor) __PYX_ERR(7, 173, __pyx_L1_error)
34702   __pyx_vtabptr_2yt_8geometry_12oct_visitors_NeighbourCellVisitor = (struct __pyx_vtabstruct_2yt_8geometry_12oct_visitors_NeighbourCellVisitor*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_12oct_visitors_NeighbourCellVisitor->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_12oct_visitors_NeighbourCellVisitor)) __PYX_ERR(7, 173, __pyx_L1_error)
34703   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34704   __pyx_t_1 = PyImport_ImportModule("yt.geometry.selection_routines"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 24, __pyx_L1_error)
34705   __Pyx_GOTREF(__pyx_t_1);
34706   __pyx_ptype_2yt_8geometry_18selection_routines_SelectorObject = __Pyx_ImportType(__pyx_t_1, "yt.geometry.selection_routines", "SelectorObject", sizeof(struct __pyx_obj_2yt_8geometry_18selection_routines_SelectorObject), __Pyx_ImportType_CheckSize_Warn);
34707    if (!__pyx_ptype_2yt_8geometry_18selection_routines_SelectorObject) __PYX_ERR(8, 24, __pyx_L1_error)
34708   __pyx_vtabptr_2yt_8geometry_18selection_routines_SelectorObject = (struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_SelectorObject*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_18selection_routines_SelectorObject->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_18selection_routines_SelectorObject)) __PYX_ERR(8, 24, __pyx_L1_error)
34709   __pyx_ptype_2yt_8geometry_18selection_routines_AlwaysSelector = __Pyx_ImportType(__pyx_t_1, "yt.geometry.selection_routines", "AlwaysSelector", sizeof(struct __pyx_obj_2yt_8geometry_18selection_routines_AlwaysSelector), __Pyx_ImportType_CheckSize_Warn);
34710    if (!__pyx_ptype_2yt_8geometry_18selection_routines_AlwaysSelector) __PYX_ERR(8, 70, __pyx_L1_error)
34711   __pyx_vtabptr_2yt_8geometry_18selection_routines_AlwaysSelector = (struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_AlwaysSelector*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_18selection_routines_AlwaysSelector->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_18selection_routines_AlwaysSelector)) __PYX_ERR(8, 70, __pyx_L1_error)
34712   __pyx_ptype_2yt_8geometry_18selection_routines_OctreeSubsetSelector = __Pyx_ImportType(__pyx_t_1, "yt.geometry.selection_routines", "OctreeSubsetSelector", sizeof(struct __pyx_obj_2yt_8geometry_18selection_routines_OctreeSubsetSelector), __Pyx_ImportType_CheckSize_Warn);
34713    if (!__pyx_ptype_2yt_8geometry_18selection_routines_OctreeSubsetSelector) __PYX_ERR(8, 73, __pyx_L1_error)
34714   __pyx_vtabptr_2yt_8geometry_18selection_routines_OctreeSubsetSelector = (struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_OctreeSubsetSelector*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_18selection_routines_OctreeSubsetSelector->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_18selection_routines_OctreeSubsetSelector)) __PYX_ERR(8, 73, __pyx_L1_error)
34715   __pyx_ptype_2yt_8geometry_18selection_routines_BooleanSelector = __Pyx_ImportType(__pyx_t_1, "yt.geometry.selection_routines", "BooleanSelector", sizeof(struct __pyx_obj_2yt_8geometry_18selection_routines_BooleanSelector), __Pyx_ImportType_CheckSize_Warn);
34716    if (!__pyx_ptype_2yt_8geometry_18selection_routines_BooleanSelector) __PYX_ERR(8, 77, __pyx_L1_error)
34717   __pyx_vtabptr_2yt_8geometry_18selection_routines_BooleanSelector = (struct __pyx_vtabstruct_2yt_8geometry_18selection_routines_BooleanSelector*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_18selection_routines_BooleanSelector->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_18selection_routines_BooleanSelector)) __PYX_ERR(8, 77, __pyx_L1_error)
34718   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34719   __pyx_t_1 = PyImport_ImportModule("yt.utilities.lib.allocation_container"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 20, __pyx_L1_error)
34720   __Pyx_GOTREF(__pyx_t_1);
34721   __pyx_ptype_2yt_9utilities_3lib_20allocation_container_ObjectPool = __Pyx_ImportType(__pyx_t_1, "yt.utilities.lib.allocation_container", "ObjectPool", sizeof(struct __pyx_obj_2yt_9utilities_3lib_20allocation_container_ObjectPool), __Pyx_ImportType_CheckSize_Warn);
34722    if (!__pyx_ptype_2yt_9utilities_3lib_20allocation_container_ObjectPool) __PYX_ERR(9, 20, __pyx_L1_error)
34723   __pyx_vtabptr_2yt_9utilities_3lib_20allocation_container_ObjectPool = (struct __pyx_vtabstruct_2yt_9utilities_3lib_20allocation_container_ObjectPool*)__Pyx_GetVtable(__pyx_ptype_2yt_9utilities_3lib_20allocation_container_ObjectPool->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_9utilities_3lib_20allocation_container_ObjectPool)) __PYX_ERR(9, 20, __pyx_L1_error)
34724   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34725   __pyx_t_1 = PyImport_ImportModule("yt.geometry.oct_container"); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 47, __pyx_L1_error)
34726   __Pyx_GOTREF(__pyx_t_1);
34727   __pyx_ptype_2yt_8geometry_13oct_container_OctObjectPool = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_container", "OctObjectPool", sizeof(struct __pyx_obj_2yt_8geometry_13oct_container_OctObjectPool), __Pyx_ImportType_CheckSize_Warn);
34728    if (!__pyx_ptype_2yt_8geometry_13oct_container_OctObjectPool) __PYX_ERR(10, 47, __pyx_L1_error)
34729   __pyx_vtabptr_2yt_8geometry_13oct_container_OctObjectPool = (struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctObjectPool*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_13oct_container_OctObjectPool->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_13oct_container_OctObjectPool)) __PYX_ERR(10, 47, __pyx_L1_error)
34730   __pyx_ptype_2yt_8geometry_13oct_container_OctreeContainer = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_container", "OctreeContainer", sizeof(struct __pyx_obj_2yt_8geometry_13oct_container_OctreeContainer), __Pyx_ImportType_CheckSize_Warn);
34731    if (!__pyx_ptype_2yt_8geometry_13oct_container_OctreeContainer) __PYX_ERR(10, 55, __pyx_L1_error)
34732   __pyx_vtabptr_2yt_8geometry_13oct_container_OctreeContainer = (struct __pyx_vtabstruct_2yt_8geometry_13oct_container_OctreeContainer*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_13oct_container_OctreeContainer->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_13oct_container_OctreeContainer)) __PYX_ERR(10, 55, __pyx_L1_error)
34733   __pyx_ptype_2yt_8geometry_13oct_container_SparseOctreeContainer = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_container", "SparseOctreeContainer", sizeof(struct __pyx_obj_2yt_8geometry_13oct_container_SparseOctreeContainer), __Pyx_ImportType_CheckSize_Warn);
34734    if (!__pyx_ptype_2yt_8geometry_13oct_container_SparseOctreeContainer) __PYX_ERR(10, 85, __pyx_L1_error)
34735   __pyx_vtabptr_2yt_8geometry_13oct_container_SparseOctreeContainer = (struct __pyx_vtabstruct_2yt_8geometry_13oct_container_SparseOctreeContainer*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_13oct_container_SparseOctreeContainer->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_13oct_container_SparseOctreeContainer)) __PYX_ERR(10, 85, __pyx_L1_error)
34736   __pyx_ptype_2yt_8geometry_13oct_container_RAMSESOctreeContainer = __Pyx_ImportType(__pyx_t_1, "yt.geometry.oct_container", "RAMSESOctreeContainer", sizeof(struct __pyx_obj_2yt_8geometry_13oct_container_RAMSESOctreeContainer), __Pyx_ImportType_CheckSize_Warn);
34737    if (!__pyx_ptype_2yt_8geometry_13oct_container_RAMSESOctreeContainer) __PYX_ERR(10, 93, __pyx_L1_error)
34738   __pyx_vtabptr_2yt_8geometry_13oct_container_RAMSESOctreeContainer = (struct __pyx_vtabstruct_2yt_8geometry_13oct_container_RAMSESOctreeContainer*)__Pyx_GetVtable(__pyx_ptype_2yt_8geometry_13oct_container_RAMSESOctreeContainer->tp_dict); if (unlikely(!__pyx_vtabptr_2yt_8geometry_13oct_container_RAMSESOctreeContainer)) __PYX_ERR(10, 93, __pyx_L1_error)
34739   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34740   __Pyx_RefNannyFinishContext();
34741   return 0;
34742   __pyx_L1_error:;
34743   __Pyx_XDECREF(__pyx_t_1);
34744   __Pyx_RefNannyFinishContext();
34745   return -1;
34746 }
34747 
__Pyx_modinit_variable_import_code(void)34748 static int __Pyx_modinit_variable_import_code(void) {
34749   __Pyx_RefNannyDeclarations
34750   PyObject *__pyx_t_1 = NULL;
34751   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
34752   /*--- Variable import code ---*/
34753   __pyx_t_1 = PyImport_ImportModule("yt.geometry.oct_container"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error)
34754   if (__Pyx_ImportVoidPtr(__pyx_t_1, "ORDER_MAX", (void **)&__pyx_vp_2yt_8geometry_13oct_container_ORDER_MAX, "int") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34755   Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34756   __Pyx_RefNannyFinishContext();
34757   return 0;
34758   __pyx_L1_error:;
34759   __Pyx_XDECREF(__pyx_t_1);
34760   __Pyx_RefNannyFinishContext();
34761   return -1;
34762 }
34763 
__Pyx_modinit_function_import_code(void)34764 static int __Pyx_modinit_function_import_code(void) {
34765   __Pyx_RefNannyDeclarations
34766   PyObject *__pyx_t_1 = NULL;
34767   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
34768   /*--- Function import code ---*/
34769   __pyx_t_1 = PyImport_ImportModule("yt.geometry.grid_visitors"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error)
34770   if (__Pyx_ImportFunction(__pyx_t_1, "check_child_masked", (void (**)(void))&__pyx_f_2yt_8geometry_13grid_visitors_check_child_masked, "__pyx_t_5numpy_uint8_t (struct __pyx_t_2yt_8geometry_13grid_visitors_GridVisitorData *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34771   Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34772   __Pyx_RefNannyFinishContext();
34773   return 0;
34774   __pyx_L1_error:;
34775   __Pyx_XDECREF(__pyx_t_1);
34776   __Pyx_RefNannyFinishContext();
34777   return -1;
34778 }
34779 
34780 
34781 #if PY_MAJOR_VERSION < 3
34782 #ifdef CYTHON_NO_PYINIT_EXPORT
34783 #define __Pyx_PyMODINIT_FUNC void
34784 #else
34785 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
34786 #endif
34787 #else
34788 #ifdef CYTHON_NO_PYINIT_EXPORT
34789 #define __Pyx_PyMODINIT_FUNC PyObject *
34790 #else
34791 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
34792 #endif
34793 #endif
34794 
34795 
34796 #if PY_MAJOR_VERSION < 3
34797 __Pyx_PyMODINIT_FUNC initparticle_deposit(void) CYTHON_SMALL_CODE; /*proto*/
initparticle_deposit(void)34798 __Pyx_PyMODINIT_FUNC initparticle_deposit(void)
34799 #else
34800 __Pyx_PyMODINIT_FUNC PyInit_particle_deposit(void) CYTHON_SMALL_CODE; /*proto*/
34801 __Pyx_PyMODINIT_FUNC PyInit_particle_deposit(void)
34802 #if CYTHON_PEP489_MULTI_PHASE_INIT
34803 {
34804   return PyModuleDef_Init(&__pyx_moduledef);
34805 }
34806 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
34807     #if PY_VERSION_HEX >= 0x030700A1
34808     static PY_INT64_T main_interpreter_id = -1;
34809     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
34810     if (main_interpreter_id == -1) {
34811         main_interpreter_id = current_id;
34812         return (unlikely(current_id == -1)) ? -1 : 0;
34813     } else if (unlikely(main_interpreter_id != current_id))
34814     #else
34815     static PyInterpreterState *main_interpreter = NULL;
34816     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
34817     if (!main_interpreter) {
34818         main_interpreter = current_interpreter;
34819     } else if (unlikely(main_interpreter != current_interpreter))
34820     #endif
34821     {
34822         PyErr_SetString(
34823             PyExc_ImportError,
34824             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
34825         return -1;
34826     }
34827     return 0;
34828 }
34829 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) {
34830     PyObject *value = PyObject_GetAttrString(spec, from_name);
34831     int result = 0;
34832     if (likely(value)) {
34833         if (allow_none || value != Py_None) {
34834             result = PyDict_SetItemString(moddict, to_name, value);
34835         }
34836         Py_DECREF(value);
34837     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
34838         PyErr_Clear();
34839     } else {
34840         result = -1;
34841     }
34842     return result;
34843 }
34844 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
34845     PyObject *module = NULL, *moddict, *modname;
34846     if (__Pyx_check_single_interpreter())
34847         return NULL;
34848     if (__pyx_m)
34849         return __Pyx_NewRef(__pyx_m);
34850     modname = PyObject_GetAttrString(spec, "name");
34851     if (unlikely(!modname)) goto bad;
34852     module = PyModule_NewObject(modname);
34853     Py_DECREF(modname);
34854     if (unlikely(!module)) goto bad;
34855     moddict = PyModule_GetDict(module);
34856     if (unlikely(!moddict)) goto bad;
34857     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
34858     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
34859     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
34860     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
34861     return module;
34862 bad:
34863     Py_XDECREF(module);
34864     return NULL;
34865 }
34866 
34867 
34868 static CYTHON_SMALL_CODE int __pyx_pymod_exec_particle_deposit(PyObject *__pyx_pyinit_module)
34869 #endif
34870 #endif
34871 {
34872   PyObject *__pyx_t_1 = NULL;
34873   PyObject *__pyx_t_2 = NULL;
34874   static PyThread_type_lock __pyx_t_3[8];
34875   __Pyx_RefNannyDeclarations
34876   #if CYTHON_PEP489_MULTI_PHASE_INIT
34877   if (__pyx_m) {
34878     if (__pyx_m == __pyx_pyinit_module) return 0;
34879     PyErr_SetString(PyExc_RuntimeError, "Module 'particle_deposit' has already been imported. Re-initialisation is not supported.");
34880     return -1;
34881   }
34882   #elif PY_MAJOR_VERSION >= 3
34883   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
34884   #endif
34885   #if CYTHON_REFNANNY
34886 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
34887 if (!__Pyx_RefNanny) {
34888   PyErr_Clear();
34889   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
34890   if (!__Pyx_RefNanny)
34891       Py_FatalError("failed to import 'refnanny' module");
34892 }
34893 #endif
34894   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_particle_deposit(void)", 0);
34895   if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34896   #ifdef __Pxy_PyFrame_Initialize_Offsets
34897   __Pxy_PyFrame_Initialize_Offsets();
34898   #endif
34899   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
34900   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
34901   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
34902   #ifdef __Pyx_CyFunction_USED
34903   if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34904   #endif
34905   #ifdef __Pyx_FusedFunction_USED
34906   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34907   #endif
34908   #ifdef __Pyx_Coroutine_USED
34909   if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34910   #endif
34911   #ifdef __Pyx_Generator_USED
34912   if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34913   #endif
34914   #ifdef __Pyx_AsyncGen_USED
34915   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34916   #endif
34917   #ifdef __Pyx_StopAsyncIteration_USED
34918   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34919   #endif
34920   /*--- Library function declarations ---*/
34921   /*--- Threads initialization code ---*/
34922   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
34923   #ifdef WITH_THREAD /* Python build with threading support? */
34924   PyEval_InitThreads();
34925   #endif
34926   #endif
34927   /*--- Module creation code ---*/
34928   #if CYTHON_PEP489_MULTI_PHASE_INIT
34929   __pyx_m = __pyx_pyinit_module;
34930   Py_INCREF(__pyx_m);
34931   #else
34932   #if PY_MAJOR_VERSION < 3
34933   __pyx_m = Py_InitModule4("particle_deposit", __pyx_methods, __pyx_k_Particle_Deposition_onto_Cells, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
34934   #else
34935   __pyx_m = PyModule_Create(&__pyx_moduledef);
34936   #endif
34937   if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
34938   #endif
34939   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
34940   Py_INCREF(__pyx_d);
34941   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
34942   Py_INCREF(__pyx_b);
34943   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
34944   Py_INCREF(__pyx_cython_runtime);
34945   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
34946   /*--- Initialize various global constants etc. ---*/
34947   if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34948   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
34949   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34950   #endif
34951   if (__pyx_module_is_main_yt__geometry__particle_deposit) {
34952     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34953   }
34954   #if PY_MAJOR_VERSION >= 3
34955   {
34956     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
34957     if (!PyDict_GetItemString(modules, "yt.geometry.particle_deposit")) {
34958       if (unlikely(PyDict_SetItemString(modules, "yt.geometry.particle_deposit", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
34959     }
34960   }
34961   #endif
34962   /*--- Builtin init code ---*/
34963   if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
34964   /*--- Constants init code ---*/
34965   if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
34966   /*--- Global type/function init code ---*/
34967   (void)__Pyx_modinit_global_init_code();
34968   (void)__Pyx_modinit_variable_export_code();
34969   (void)__Pyx_modinit_function_export_code();
34970   if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
34971   if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
34972   if (unlikely(__Pyx_modinit_variable_import_code() != 0)) goto __pyx_L1_error;
34973   if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error;
34974   /*--- Execution code ---*/
34975   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
34976   if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
34977   #endif
34978 
34979   /* "yt/geometry/particle_deposit.pyx":14
34980  * cimport numpy as np
34981  *
34982  * import numpy as np             # <<<<<<<<<<<<<<
34983  *
34984  * cimport cython
34985  */
34986   __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
34987   __Pyx_GOTREF(__pyx_t_1);
34988   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
34989   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34990 
34991   /* "yt/geometry/particle_deposit.pyx":24
34992  * from yt.utilities.lib.fp_utils cimport *
34993  *
34994  * from yt.utilities.lib.misc_utilities import OnceIndirect             # <<<<<<<<<<<<<<
34995  *
34996  *
34997  */
34998   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error)
34999   __Pyx_GOTREF(__pyx_t_1);
35000   __Pyx_INCREF(__pyx_n_s_OnceIndirect);
35001   __Pyx_GIVEREF(__pyx_n_s_OnceIndirect);
35002   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OnceIndirect);
35003   __pyx_t_2 = __Pyx_Import(__pyx_n_s_yt_utilities_lib_misc_utilities, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 24, __pyx_L1_error)
35004   __Pyx_GOTREF(__pyx_t_2);
35005   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35006   __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OnceIndirect); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error)
35007   __Pyx_GOTREF(__pyx_t_1);
35008   if (PyDict_SetItem(__pyx_d, __pyx_n_s_OnceIndirect, __pyx_t_1) < 0) __PYX_ERR(1, 24, __pyx_L1_error)
35009   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35010   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35011 
35012   /* "yt/geometry/particle_deposit.pyx":196
35013  *         return arr.astype("float64")
35014  *
35015  * deposit_count = CountParticles             # <<<<<<<<<<<<<<
35016  *
35017  * cdef class SimpleSmooth(ParticleDepositOperation):
35018  */
35019   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_count, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_CountParticles)) < 0) __PYX_ERR(1, 196, __pyx_L1_error)
35020 
35021   /* "yt/geometry/particle_deposit.pyx":264
35022  *         return self.odata
35023  *
35024  * deposit_simple_smooth = SimpleSmooth             # <<<<<<<<<<<<<<
35025  *
35026  * cdef class SumParticleField(ParticleDepositOperation):
35027  */
35028   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_simple_smooth, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_SimpleSmooth)) < 0) __PYX_ERR(1, 264, __pyx_L1_error)
35029 
35030   /* "yt/geometry/particle_deposit.pyx":294
35031  *         return sum
35032  *
35033  * deposit_sum = SumParticleField             # <<<<<<<<<<<<<<
35034  *
35035  * cdef class StdParticleField(ParticleDepositOperation):
35036  */
35037   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_sum, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_SumParticleField)) < 0) __PYX_ERR(1, 294, __pyx_L1_error)
35038 
35039   /* "yt/geometry/particle_deposit.pyx":352
35040  *         return np.sqrt(std2)
35041  *
35042  * deposit_std = StdParticleField             # <<<<<<<<<<<<<<
35043  *
35044  * cdef class CICDeposit(ParticleDepositOperation):
35045  */
35046   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_std, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_StdParticleField)) < 0) __PYX_ERR(1, 352, __pyx_L1_error)
35047 
35048   /* "yt/geometry/particle_deposit.pyx":408
35049  *         return rv
35050  *
35051  * deposit_cic = CICDeposit             # <<<<<<<<<<<<<<
35052  *
35053  * cdef class WeightedMeanParticleField(ParticleDepositOperation):
35054  */
35055   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_cic, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_CICDeposit)) < 0) __PYX_ERR(1, 408, __pyx_L1_error)
35056 
35057   /* "yt/geometry/particle_deposit.pyx":447
35058  *         return rv
35059  *
35060  * deposit_weighted_mean = WeightedMeanParticleField             # <<<<<<<<<<<<<<
35061  *
35062  * cdef class MeshIdentifier(ParticleDepositOperation):
35063  */
35064   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_weighted_mean, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_WeightedMeanParticleField)) < 0) __PYX_ERR(1, 447, __pyx_L1_error)
35065 
35066   /* "yt/geometry/particle_deposit.pyx":472
35067  *         return
35068  *
35069  * deposit_mesh_id = MeshIdentifier             # <<<<<<<<<<<<<<
35070  *
35071  * cdef class CellIdentifier(ParticleDepositOperation):
35072  */
35073   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_mesh_id, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_MeshIdentifier)) < 0) __PYX_ERR(1, 472, __pyx_L1_error)
35074 
35075   /* "yt/geometry/particle_deposit.pyx":508
35076  *         return np.asarray(self.indexes), np.asarray(self.cell_index)
35077  *
35078  * deposit_cell_id = CellIdentifier             # <<<<<<<<<<<<<<
35079  *
35080  * cdef class NNParticleField(ParticleDepositOperation):
35081  */
35082   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_cell_id, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_CellIdentifier)) < 0) __PYX_ERR(1, 508, __pyx_L1_error)
35083 
35084   /* "yt/geometry/particle_deposit.pyx":558
35085  *         return nn
35086  *
35087  * deposit_nearest = NNParticleField             # <<<<<<<<<<<<<<
35088  */
35089   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deposit_nearest, ((PyObject *)__pyx_ptype_2yt_8geometry_16particle_deposit_NNParticleField)) < 0) __PYX_ERR(1, 558, __pyx_L1_error)
35090 
35091   /* "yt/geometry/particle_deposit.pyx":1
35092  * # distutils: include_dirs = LIB_DIR             # <<<<<<<<<<<<<<
35093  * # distutils: libraries = STD_LIBS
35094  * """
35095  */
35096   __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
35097   __Pyx_GOTREF(__pyx_t_2);
35098   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
35099   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35100 
35101   /* "View.MemoryView":209
35102  *         info.obj = self
35103  *
35104  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
35105  *
35106  *     def __dealloc__(array self):
35107  */
35108   __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 209, __pyx_L1_error)
35109   __Pyx_GOTREF(__pyx_t_2);
35110   if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(2, 209, __pyx_L1_error)
35111   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35112   PyType_Modified(__pyx_array_type);
35113 
35114   /* "View.MemoryView":286
35115  *         return self.name
35116  *
35117  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
35118  * cdef strided = Enum("<strided and direct>") # default
35119  * cdef indirect = Enum("<strided and indirect>")
35120  */
35121   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 286, __pyx_L1_error)
35122   __Pyx_GOTREF(__pyx_t_2);
35123   __Pyx_XGOTREF(generic);
35124   __Pyx_DECREF_SET(generic, __pyx_t_2);
35125   __Pyx_GIVEREF(__pyx_t_2);
35126   __pyx_t_2 = 0;
35127 
35128   /* "View.MemoryView":287
35129  *
35130  * cdef generic = Enum("<strided and direct or indirect>")
35131  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
35132  * cdef indirect = Enum("<strided and indirect>")
35133  *
35134  */
35135   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 287, __pyx_L1_error)
35136   __Pyx_GOTREF(__pyx_t_2);
35137   __Pyx_XGOTREF(strided);
35138   __Pyx_DECREF_SET(strided, __pyx_t_2);
35139   __Pyx_GIVEREF(__pyx_t_2);
35140   __pyx_t_2 = 0;
35141 
35142   /* "View.MemoryView":288
35143  * cdef generic = Enum("<strided and direct or indirect>")
35144  * cdef strided = Enum("<strided and direct>") # default
35145  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
35146  *
35147  *
35148  */
35149   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 288, __pyx_L1_error)
35150   __Pyx_GOTREF(__pyx_t_2);
35151   __Pyx_XGOTREF(indirect);
35152   __Pyx_DECREF_SET(indirect, __pyx_t_2);
35153   __Pyx_GIVEREF(__pyx_t_2);
35154   __pyx_t_2 = 0;
35155 
35156   /* "View.MemoryView":291
35157  *
35158  *
35159  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
35160  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
35161  *
35162  */
35163   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 291, __pyx_L1_error)
35164   __Pyx_GOTREF(__pyx_t_2);
35165   __Pyx_XGOTREF(contiguous);
35166   __Pyx_DECREF_SET(contiguous, __pyx_t_2);
35167   __Pyx_GIVEREF(__pyx_t_2);
35168   __pyx_t_2 = 0;
35169 
35170   /* "View.MemoryView":292
35171  *
35172  * cdef contiguous = Enum("<contiguous and direct>")
35173  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
35174  *
35175  *
35176  */
35177   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 292, __pyx_L1_error)
35178   __Pyx_GOTREF(__pyx_t_2);
35179   __Pyx_XGOTREF(indirect_contiguous);
35180   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_2);
35181   __Pyx_GIVEREF(__pyx_t_2);
35182   __pyx_t_2 = 0;
35183 
35184   /* "View.MemoryView":316
35185  *
35186  * DEF THREAD_LOCKS_PREALLOCATED = 8
35187  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
35188  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
35189  *     PyThread_allocate_lock(),
35190  */
35191   __pyx_memoryview_thread_locks_used = 0;
35192 
35193   /* "View.MemoryView":317
35194  * DEF THREAD_LOCKS_PREALLOCATED = 8
35195  * cdef int __pyx_memoryview_thread_locks_used = 0
35196  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
35197  *     PyThread_allocate_lock(),
35198  *     PyThread_allocate_lock(),
35199  */
35200   __pyx_t_3[0] = PyThread_allocate_lock();
35201   __pyx_t_3[1] = PyThread_allocate_lock();
35202   __pyx_t_3[2] = PyThread_allocate_lock();
35203   __pyx_t_3[3] = PyThread_allocate_lock();
35204   __pyx_t_3[4] = PyThread_allocate_lock();
35205   __pyx_t_3[5] = PyThread_allocate_lock();
35206   __pyx_t_3[6] = PyThread_allocate_lock();
35207   __pyx_t_3[7] = PyThread_allocate_lock();
35208   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_3, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
35209 
35210   /* "View.MemoryView":545
35211  *         info.obj = self
35212  *
35213  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
35214  *
35215  *
35216  */
35217   __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 545, __pyx_L1_error)
35218   __Pyx_GOTREF(__pyx_t_2);
35219   if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(2, 545, __pyx_L1_error)
35220   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35221   PyType_Modified(__pyx_memoryview_type);
35222 
35223   /* "View.MemoryView":991
35224  *         return self.from_object
35225  *
35226  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
35227  *
35228  *
35229  */
35230   __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 991, __pyx_L1_error)
35231   __Pyx_GOTREF(__pyx_t_2);
35232   if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(2, 991, __pyx_L1_error)
35233   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35234   PyType_Modified(__pyx_memoryviewslice_type);
35235 
35236   /* "(tree fragment)":1
35237  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
35238  *     cdef object __pyx_PickleError
35239  *     cdef object __pyx_result
35240  */
35241   __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
35242   __Pyx_GOTREF(__pyx_t_2);
35243   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
35244   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35245 
35246   /* "(tree fragment)":11
35247  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
35248  *     return __pyx_result
35249  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
35250  *     __pyx_result.name = __pyx_state[0]
35251  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
35252  */
35253 
35254   /*--- Wrapped vars code ---*/
35255 
35256   goto __pyx_L0;
35257   __pyx_L1_error:;
35258   __Pyx_XDECREF(__pyx_t_1);
35259   __Pyx_XDECREF(__pyx_t_2);
35260   if (__pyx_m) {
35261     if (__pyx_d) {
35262       __Pyx_AddTraceback("init yt.geometry.particle_deposit", __pyx_clineno, __pyx_lineno, __pyx_filename);
35263     }
35264     Py_CLEAR(__pyx_m);
35265   } else if (!PyErr_Occurred()) {
35266     PyErr_SetString(PyExc_ImportError, "init yt.geometry.particle_deposit");
35267   }
35268   __pyx_L0:;
35269   __Pyx_RefNannyFinishContext();
35270   #if CYTHON_PEP489_MULTI_PHASE_INIT
35271   return (__pyx_m != NULL) ? 0 : -1;
35272   #elif PY_MAJOR_VERSION >= 3
35273   return __pyx_m;
35274   #else
35275   return;
35276   #endif
35277 }
35278 
35279 /* --- Runtime support code --- */
35280 /* Refnanny */
35281 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)35282 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
35283     PyObject *m = NULL, *p = NULL;
35284     void *r = NULL;
35285     m = PyImport_ImportModule(modname);
35286     if (!m) goto end;
35287     p = PyObject_GetAttrString(m, "RefNannyAPI");
35288     if (!p) goto end;
35289     r = PyLong_AsVoidPtr(p);
35290 end:
35291     Py_XDECREF(p);
35292     Py_XDECREF(m);
35293     return (__Pyx_RefNannyAPIStruct *)r;
35294 }
35295 #endif
35296 
35297 /* PyObjectGetAttrStr */
35298 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)35299 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
35300     PyTypeObject* tp = Py_TYPE(obj);
35301     if (likely(tp->tp_getattro))
35302         return tp->tp_getattro(obj, attr_name);
35303 #if PY_MAJOR_VERSION < 3
35304     if (likely(tp->tp_getattr))
35305         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
35306 #endif
35307     return PyObject_GetAttr(obj, attr_name);
35308 }
35309 #endif
35310 
35311 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)35312 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
35313     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
35314     if (unlikely(!result)) {
35315         PyErr_Format(PyExc_NameError,
35316 #if PY_MAJOR_VERSION >= 3
35317             "name '%U' is not defined", name);
35318 #else
35319             "name '%.200s' is not defined", PyString_AS_STRING(name));
35320 #endif
35321     }
35322     return result;
35323 }
35324 
35325 /* PyFunctionFastCall */
35326 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)35327 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
35328                                                PyObject *globals) {
35329     PyFrameObject *f;
35330     PyThreadState *tstate = __Pyx_PyThreadState_Current;
35331     PyObject **fastlocals;
35332     Py_ssize_t i;
35333     PyObject *result;
35334     assert(globals != NULL);
35335     /* XXX Perhaps we should create a specialized
35336        PyFrame_New() that doesn't take locals, but does
35337        take builtins without sanity checking them.
35338        */
35339     assert(tstate != NULL);
35340     f = PyFrame_New(tstate, co, globals, NULL);
35341     if (f == NULL) {
35342         return NULL;
35343     }
35344     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
35345     for (i = 0; i < na; i++) {
35346         Py_INCREF(*args);
35347         fastlocals[i] = *args++;
35348     }
35349     result = PyEval_EvalFrameEx(f,0);
35350     ++tstate->recursion_depth;
35351     Py_DECREF(f);
35352     --tstate->recursion_depth;
35353     return result;
35354 }
35355 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)35356 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
35357     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
35358     PyObject *globals = PyFunction_GET_GLOBALS(func);
35359     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
35360     PyObject *closure;
35361 #if PY_MAJOR_VERSION >= 3
35362     PyObject *kwdefs;
35363 #endif
35364     PyObject *kwtuple, **k;
35365     PyObject **d;
35366     Py_ssize_t nd;
35367     Py_ssize_t nk;
35368     PyObject *result;
35369     assert(kwargs == NULL || PyDict_Check(kwargs));
35370     nk = kwargs ? PyDict_Size(kwargs) : 0;
35371     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
35372         return NULL;
35373     }
35374     if (
35375 #if PY_MAJOR_VERSION >= 3
35376             co->co_kwonlyargcount == 0 &&
35377 #endif
35378             likely(kwargs == NULL || nk == 0) &&
35379             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
35380         if (argdefs == NULL && co->co_argcount == nargs) {
35381             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
35382             goto done;
35383         }
35384         else if (nargs == 0 && argdefs != NULL
35385                  && co->co_argcount == Py_SIZE(argdefs)) {
35386             /* function called with no arguments, but all parameters have
35387                a default value: use default values as arguments .*/
35388             args = &PyTuple_GET_ITEM(argdefs, 0);
35389             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
35390             goto done;
35391         }
35392     }
35393     if (kwargs != NULL) {
35394         Py_ssize_t pos, i;
35395         kwtuple = PyTuple_New(2 * nk);
35396         if (kwtuple == NULL) {
35397             result = NULL;
35398             goto done;
35399         }
35400         k = &PyTuple_GET_ITEM(kwtuple, 0);
35401         pos = i = 0;
35402         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
35403             Py_INCREF(k[i]);
35404             Py_INCREF(k[i+1]);
35405             i += 2;
35406         }
35407         nk = i / 2;
35408     }
35409     else {
35410         kwtuple = NULL;
35411         k = NULL;
35412     }
35413     closure = PyFunction_GET_CLOSURE(func);
35414 #if PY_MAJOR_VERSION >= 3
35415     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
35416 #endif
35417     if (argdefs != NULL) {
35418         d = &PyTuple_GET_ITEM(argdefs, 0);
35419         nd = Py_SIZE(argdefs);
35420     }
35421     else {
35422         d = NULL;
35423         nd = 0;
35424     }
35425 #if PY_MAJOR_VERSION >= 3
35426     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
35427                                args, (int)nargs,
35428                                k, (int)nk,
35429                                d, (int)nd, kwdefs, closure);
35430 #else
35431     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
35432                                args, (int)nargs,
35433                                k, (int)nk,
35434                                d, (int)nd, closure);
35435 #endif
35436     Py_XDECREF(kwtuple);
35437 done:
35438     Py_LeaveRecursiveCall();
35439     return result;
35440 }
35441 #endif
35442 #endif
35443 
35444 /* PyObjectCall */
35445 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)35446 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
35447     PyObject *result;
35448     ternaryfunc call = func->ob_type->tp_call;
35449     if (unlikely(!call))
35450         return PyObject_Call(func, arg, kw);
35451     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
35452         return NULL;
35453     result = (*call)(func, arg, kw);
35454     Py_LeaveRecursiveCall();
35455     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
35456         PyErr_SetString(
35457             PyExc_SystemError,
35458             "NULL result without error in PyObject_Call");
35459     }
35460     return result;
35461 }
35462 #endif
35463 
35464 /* PyObjectCallMethO */
35465 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)35466 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
35467     PyObject *self, *result;
35468     PyCFunction cfunc;
35469     cfunc = PyCFunction_GET_FUNCTION(func);
35470     self = PyCFunction_GET_SELF(func);
35471     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
35472         return NULL;
35473     result = cfunc(self, arg);
35474     Py_LeaveRecursiveCall();
35475     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
35476         PyErr_SetString(
35477             PyExc_SystemError,
35478             "NULL result without error in PyObject_Call");
35479     }
35480     return result;
35481 }
35482 #endif
35483 
35484 /* PyObjectCallNoArg */
35485 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)35486 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
35487 #if CYTHON_FAST_PYCALL
35488     if (PyFunction_Check(func)) {
35489         return __Pyx_PyFunction_FastCall(func, NULL, 0);
35490     }
35491 #endif
35492 #ifdef __Pyx_CyFunction_USED
35493     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
35494 #else
35495     if (likely(PyCFunction_Check(func)))
35496 #endif
35497     {
35498         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
35499             return __Pyx_PyObject_CallMethO(func, NULL);
35500         }
35501     }
35502     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
35503 }
35504 #endif
35505 
35506 /* PyCFunctionFastCall */
35507 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)35508 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
35509     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
35510     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
35511     PyObject *self = PyCFunction_GET_SELF(func);
35512     int flags = PyCFunction_GET_FLAGS(func);
35513     assert(PyCFunction_Check(func));
35514     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
35515     assert(nargs >= 0);
35516     assert(nargs == 0 || args != NULL);
35517     /* _PyCFunction_FastCallDict() must not be called with an exception set,
35518        because it may clear it (directly or indirectly) and so the
35519        caller loses its exception */
35520     assert(!PyErr_Occurred());
35521     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
35522         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
35523     } else {
35524         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
35525     }
35526 }
35527 #endif
35528 
35529 /* PyObjectCallOneArg */
35530 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)35531 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
35532     PyObject *result;
35533     PyObject *args = PyTuple_New(1);
35534     if (unlikely(!args)) return NULL;
35535     Py_INCREF(arg);
35536     PyTuple_SET_ITEM(args, 0, arg);
35537     result = __Pyx_PyObject_Call(func, args, NULL);
35538     Py_DECREF(args);
35539     return result;
35540 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)35541 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
35542 #if CYTHON_FAST_PYCALL
35543     if (PyFunction_Check(func)) {
35544         return __Pyx_PyFunction_FastCall(func, &arg, 1);
35545     }
35546 #endif
35547     if (likely(PyCFunction_Check(func))) {
35548         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
35549             return __Pyx_PyObject_CallMethO(func, arg);
35550 #if CYTHON_FAST_PYCCALL
35551         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
35552             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
35553 #endif
35554         }
35555     }
35556     return __Pyx__PyObject_CallOneArg(func, arg);
35557 }
35558 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)35559 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
35560     PyObject *result;
35561     PyObject *args = PyTuple_Pack(1, arg);
35562     if (unlikely(!args)) return NULL;
35563     result = __Pyx_PyObject_Call(func, args, NULL);
35564     Py_DECREF(args);
35565     return result;
35566 }
35567 #endif
35568 
35569 /* PyObjectSetAttrStr */
35570 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_SetAttrStr(PyObject * obj,PyObject * attr_name,PyObject * value)35571 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
35572     PyTypeObject* tp = Py_TYPE(obj);
35573     if (likely(tp->tp_setattro))
35574         return tp->tp_setattro(obj, attr_name, value);
35575 #if PY_MAJOR_VERSION < 3
35576     if (likely(tp->tp_setattr))
35577         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
35578 #endif
35579     return PyObject_SetAttr(obj, attr_name, value);
35580 }
35581 #endif
35582 
35583 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)35584 static void __Pyx_RaiseArgtupleInvalid(
35585     const char* func_name,
35586     int exact,
35587     Py_ssize_t num_min,
35588     Py_ssize_t num_max,
35589     Py_ssize_t num_found)
35590 {
35591     Py_ssize_t num_expected;
35592     const char *more_or_less;
35593     if (num_found < num_min) {
35594         num_expected = num_min;
35595         more_or_less = "at least";
35596     } else {
35597         num_expected = num_max;
35598         more_or_less = "at most";
35599     }
35600     if (exact) {
35601         more_or_less = "exactly";
35602     }
35603     PyErr_Format(PyExc_TypeError,
35604                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
35605                  func_name, more_or_less, num_expected,
35606                  (num_expected == 1) ? "" : "s", num_found);
35607 }
35608 
35609 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)35610 static void __Pyx_RaiseDoubleKeywordsError(
35611     const char* func_name,
35612     PyObject* kw_name)
35613 {
35614     PyErr_Format(PyExc_TypeError,
35615         #if PY_MAJOR_VERSION >= 3
35616         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
35617         #else
35618         "%s() got multiple values for keyword argument '%s'", func_name,
35619         PyString_AsString(kw_name));
35620         #endif
35621 }
35622 
35623 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)35624 static int __Pyx_ParseOptionalKeywords(
35625     PyObject *kwds,
35626     PyObject **argnames[],
35627     PyObject *kwds2,
35628     PyObject *values[],
35629     Py_ssize_t num_pos_args,
35630     const char* function_name)
35631 {
35632     PyObject *key = 0, *value = 0;
35633     Py_ssize_t pos = 0;
35634     PyObject*** name;
35635     PyObject*** first_kw_arg = argnames + num_pos_args;
35636     while (PyDict_Next(kwds, &pos, &key, &value)) {
35637         name = first_kw_arg;
35638         while (*name && (**name != key)) name++;
35639         if (*name) {
35640             values[name-argnames] = value;
35641             continue;
35642         }
35643         name = first_kw_arg;
35644         #if PY_MAJOR_VERSION < 3
35645         if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
35646             while (*name) {
35647                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
35648                         && _PyString_Eq(**name, key)) {
35649                     values[name-argnames] = value;
35650                     break;
35651                 }
35652                 name++;
35653             }
35654             if (*name) continue;
35655             else {
35656                 PyObject*** argname = argnames;
35657                 while (argname != first_kw_arg) {
35658                     if ((**argname == key) || (
35659                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
35660                              && _PyString_Eq(**argname, key))) {
35661                         goto arg_passed_twice;
35662                     }
35663                     argname++;
35664                 }
35665             }
35666         } else
35667         #endif
35668         if (likely(PyUnicode_Check(key))) {
35669             while (*name) {
35670                 int cmp = (**name == key) ? 0 :
35671                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
35672                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
35673                 #endif
35674                     PyUnicode_Compare(**name, key);
35675                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
35676                 if (cmp == 0) {
35677                     values[name-argnames] = value;
35678                     break;
35679                 }
35680                 name++;
35681             }
35682             if (*name) continue;
35683             else {
35684                 PyObject*** argname = argnames;
35685                 while (argname != first_kw_arg) {
35686                     int cmp = (**argname == key) ? 0 :
35687                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
35688                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
35689                     #endif
35690                         PyUnicode_Compare(**argname, key);
35691                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
35692                     if (cmp == 0) goto arg_passed_twice;
35693                     argname++;
35694                 }
35695             }
35696         } else
35697             goto invalid_keyword_type;
35698         if (kwds2) {
35699             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
35700         } else {
35701             goto invalid_keyword;
35702         }
35703     }
35704     return 0;
35705 arg_passed_twice:
35706     __Pyx_RaiseDoubleKeywordsError(function_name, key);
35707     goto bad;
35708 invalid_keyword_type:
35709     PyErr_Format(PyExc_TypeError,
35710         "%.200s() keywords must be strings", function_name);
35711     goto bad;
35712 invalid_keyword:
35713     PyErr_Format(PyExc_TypeError,
35714     #if PY_MAJOR_VERSION < 3
35715         "%.200s() got an unexpected keyword argument '%.200s'",
35716         function_name, PyString_AsString(key));
35717     #else
35718         "%s() got an unexpected keyword argument '%U'",
35719         function_name, key);
35720     #endif
35721 bad:
35722     return -1;
35723 }
35724 
35725 /* KeywordStringCheck */
__Pyx_CheckKeywordStrings(PyObject * kwdict,const char * function_name,int kw_allowed)35726 static int __Pyx_CheckKeywordStrings(
35727     PyObject *kwdict,
35728     const char* function_name,
35729     int kw_allowed)
35730 {
35731     PyObject* key = 0;
35732     Py_ssize_t pos = 0;
35733 #if CYTHON_COMPILING_IN_PYPY
35734     if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
35735         goto invalid_keyword;
35736     return 1;
35737 #else
35738     while (PyDict_Next(kwdict, &pos, &key, 0)) {
35739         #if PY_MAJOR_VERSION < 3
35740         if (unlikely(!PyString_Check(key)))
35741         #endif
35742             if (unlikely(!PyUnicode_Check(key)))
35743                 goto invalid_keyword_type;
35744     }
35745     if ((!kw_allowed) && unlikely(key))
35746         goto invalid_keyword;
35747     return 1;
35748 invalid_keyword_type:
35749     PyErr_Format(PyExc_TypeError,
35750         "%.200s() keywords must be strings", function_name);
35751     return 0;
35752 #endif
35753 invalid_keyword:
35754     PyErr_Format(PyExc_TypeError,
35755     #if PY_MAJOR_VERSION < 3
35756         "%.200s() got an unexpected keyword argument '%.200s'",
35757         function_name, PyString_AsString(key));
35758     #else
35759         "%s() got an unexpected keyword argument '%U'",
35760         function_name, key);
35761     #endif
35762     return 0;
35763 }
35764 
35765 /* PyErrFetchRestore */
35766 #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)35767 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
35768     PyObject *tmp_type, *tmp_value, *tmp_tb;
35769     tmp_type = tstate->curexc_type;
35770     tmp_value = tstate->curexc_value;
35771     tmp_tb = tstate->curexc_traceback;
35772     tstate->curexc_type = type;
35773     tstate->curexc_value = value;
35774     tstate->curexc_traceback = tb;
35775     Py_XDECREF(tmp_type);
35776     Py_XDECREF(tmp_value);
35777     Py_XDECREF(tmp_tb);
35778 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)35779 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
35780     *type = tstate->curexc_type;
35781     *value = tstate->curexc_value;
35782     *tb = tstate->curexc_traceback;
35783     tstate->curexc_type = 0;
35784     tstate->curexc_value = 0;
35785     tstate->curexc_traceback = 0;
35786 }
35787 #endif
35788 
35789 /* RaiseException */
35790 #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)35791 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
35792                         CYTHON_UNUSED PyObject *cause) {
35793     __Pyx_PyThreadState_declare
35794     Py_XINCREF(type);
35795     if (!value || value == Py_None)
35796         value = NULL;
35797     else
35798         Py_INCREF(value);
35799     if (!tb || tb == Py_None)
35800         tb = NULL;
35801     else {
35802         Py_INCREF(tb);
35803         if (!PyTraceBack_Check(tb)) {
35804             PyErr_SetString(PyExc_TypeError,
35805                 "raise: arg 3 must be a traceback or None");
35806             goto raise_error;
35807         }
35808     }
35809     if (PyType_Check(type)) {
35810 #if CYTHON_COMPILING_IN_PYPY
35811         if (!value) {
35812             Py_INCREF(Py_None);
35813             value = Py_None;
35814         }
35815 #endif
35816         PyErr_NormalizeException(&type, &value, &tb);
35817     } else {
35818         if (value) {
35819             PyErr_SetString(PyExc_TypeError,
35820                 "instance exception may not have a separate value");
35821             goto raise_error;
35822         }
35823         value = type;
35824         type = (PyObject*) Py_TYPE(type);
35825         Py_INCREF(type);
35826         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
35827             PyErr_SetString(PyExc_TypeError,
35828                 "raise: exception class must be a subclass of BaseException");
35829             goto raise_error;
35830         }
35831     }
35832     __Pyx_PyThreadState_assign
35833     __Pyx_ErrRestore(type, value, tb);
35834     return;
35835 raise_error:
35836     Py_XDECREF(value);
35837     Py_XDECREF(type);
35838     Py_XDECREF(tb);
35839     return;
35840 }
35841 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)35842 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
35843     PyObject* owned_instance = NULL;
35844     if (tb == Py_None) {
35845         tb = 0;
35846     } else if (tb && !PyTraceBack_Check(tb)) {
35847         PyErr_SetString(PyExc_TypeError,
35848             "raise: arg 3 must be a traceback or None");
35849         goto bad;
35850     }
35851     if (value == Py_None)
35852         value = 0;
35853     if (PyExceptionInstance_Check(type)) {
35854         if (value) {
35855             PyErr_SetString(PyExc_TypeError,
35856                 "instance exception may not have a separate value");
35857             goto bad;
35858         }
35859         value = type;
35860         type = (PyObject*) Py_TYPE(value);
35861     } else if (PyExceptionClass_Check(type)) {
35862         PyObject *instance_class = NULL;
35863         if (value && PyExceptionInstance_Check(value)) {
35864             instance_class = (PyObject*) Py_TYPE(value);
35865             if (instance_class != type) {
35866                 int is_subclass = PyObject_IsSubclass(instance_class, type);
35867                 if (!is_subclass) {
35868                     instance_class = NULL;
35869                 } else if (unlikely(is_subclass == -1)) {
35870                     goto bad;
35871                 } else {
35872                     type = instance_class;
35873                 }
35874             }
35875         }
35876         if (!instance_class) {
35877             PyObject *args;
35878             if (!value)
35879                 args = PyTuple_New(0);
35880             else if (PyTuple_Check(value)) {
35881                 Py_INCREF(value);
35882                 args = value;
35883             } else
35884                 args = PyTuple_Pack(1, value);
35885             if (!args)
35886                 goto bad;
35887             owned_instance = PyObject_Call(type, args, NULL);
35888             Py_DECREF(args);
35889             if (!owned_instance)
35890                 goto bad;
35891             value = owned_instance;
35892             if (!PyExceptionInstance_Check(value)) {
35893                 PyErr_Format(PyExc_TypeError,
35894                              "calling %R should have returned an instance of "
35895                              "BaseException, not %R",
35896                              type, Py_TYPE(value));
35897                 goto bad;
35898             }
35899         }
35900     } else {
35901         PyErr_SetString(PyExc_TypeError,
35902             "raise: exception class must be a subclass of BaseException");
35903         goto bad;
35904     }
35905     if (cause) {
35906         PyObject *fixed_cause;
35907         if (cause == Py_None) {
35908             fixed_cause = NULL;
35909         } else if (PyExceptionClass_Check(cause)) {
35910             fixed_cause = PyObject_CallObject(cause, NULL);
35911             if (fixed_cause == NULL)
35912                 goto bad;
35913         } else if (PyExceptionInstance_Check(cause)) {
35914             fixed_cause = cause;
35915             Py_INCREF(fixed_cause);
35916         } else {
35917             PyErr_SetString(PyExc_TypeError,
35918                             "exception causes must derive from "
35919                             "BaseException");
35920             goto bad;
35921         }
35922         PyException_SetCause(value, fixed_cause);
35923     }
35924     PyErr_SetObject(type, value);
35925     if (tb) {
35926 #if CYTHON_COMPILING_IN_PYPY
35927         PyObject *tmp_type, *tmp_value, *tmp_tb;
35928         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
35929         Py_INCREF(tb);
35930         PyErr_Restore(tmp_type, tmp_value, tb);
35931         Py_XDECREF(tmp_tb);
35932 #else
35933         PyThreadState *tstate = __Pyx_PyThreadState_Current;
35934         PyObject* tmp_tb = tstate->curexc_traceback;
35935         if (tb != tmp_tb) {
35936             Py_INCREF(tb);
35937             tstate->curexc_traceback = tb;
35938             Py_XDECREF(tmp_tb);
35939         }
35940 #endif
35941     }
35942 bad:
35943     Py_XDECREF(owned_instance);
35944     return;
35945 }
35946 #endif
35947 
35948 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)35949 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
35950 {
35951     if (unlikely(!type)) {
35952         PyErr_SetString(PyExc_SystemError, "Missing type object");
35953         return 0;
35954     }
35955     else if (exact) {
35956         #if PY_MAJOR_VERSION == 2
35957         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
35958         #endif
35959     }
35960     else {
35961         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
35962     }
35963     PyErr_Format(PyExc_TypeError,
35964         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
35965         name, type->tp_name, Py_TYPE(obj)->tp_name);
35966     return 0;
35967 }
35968 
35969 /* IsLittleEndian */
__Pyx_Is_Little_Endian(void)35970 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
35971 {
35972   union {
35973     uint32_t u32;
35974     uint8_t u8[4];
35975   } S;
35976   S.u32 = 0x01020304;
35977   return S.u8[0] == 4;
35978 }
35979 
35980 /* BufferFormatCheck */
__Pyx_BufFmt_Init(__Pyx_BufFmt_Context * ctx,__Pyx_BufFmt_StackElem * stack,__Pyx_TypeInfo * type)35981 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
35982                               __Pyx_BufFmt_StackElem* stack,
35983                               __Pyx_TypeInfo* type) {
35984   stack[0].field = &ctx->root;
35985   stack[0].parent_offset = 0;
35986   ctx->root.type = type;
35987   ctx->root.name = "buffer dtype";
35988   ctx->root.offset = 0;
35989   ctx->head = stack;
35990   ctx->head->field = &ctx->root;
35991   ctx->fmt_offset = 0;
35992   ctx->head->parent_offset = 0;
35993   ctx->new_packmode = '@';
35994   ctx->enc_packmode = '@';
35995   ctx->new_count = 1;
35996   ctx->enc_count = 0;
35997   ctx->enc_type = 0;
35998   ctx->is_complex = 0;
35999   ctx->is_valid_array = 0;
36000   ctx->struct_alignment = 0;
36001   while (type->typegroup == 'S') {
36002     ++ctx->head;
36003     ctx->head->field = type->fields;
36004     ctx->head->parent_offset = 0;
36005     type = type->fields->type;
36006   }
36007 }
__Pyx_BufFmt_ParseNumber(const char ** ts)36008 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
36009     int count;
36010     const char* t = *ts;
36011     if (*t < '0' || *t > '9') {
36012       return -1;
36013     } else {
36014         count = *t++ - '0';
36015         while (*t >= '0' && *t <= '9') {
36016             count *= 10;
36017             count += *t++ - '0';
36018         }
36019     }
36020     *ts = t;
36021     return count;
36022 }
__Pyx_BufFmt_ExpectNumber(const char ** ts)36023 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
36024     int number = __Pyx_BufFmt_ParseNumber(ts);
36025     if (number == -1)
36026         PyErr_Format(PyExc_ValueError,\
36027                      "Does not understand character buffer dtype format string ('%c')", **ts);
36028     return number;
36029 }
__Pyx_BufFmt_RaiseUnexpectedChar(char ch)36030 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
36031   PyErr_Format(PyExc_ValueError,
36032                "Unexpected format string character: '%c'", ch);
36033 }
__Pyx_BufFmt_DescribeTypeChar(char ch,int is_complex)36034 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
36035   switch (ch) {
36036     case 'c': return "'char'";
36037     case 'b': return "'signed char'";
36038     case 'B': return "'unsigned char'";
36039     case 'h': return "'short'";
36040     case 'H': return "'unsigned short'";
36041     case 'i': return "'int'";
36042     case 'I': return "'unsigned int'";
36043     case 'l': return "'long'";
36044     case 'L': return "'unsigned long'";
36045     case 'q': return "'long long'";
36046     case 'Q': return "'unsigned long long'";
36047     case 'f': return (is_complex ? "'complex float'" : "'float'");
36048     case 'd': return (is_complex ? "'complex double'" : "'double'");
36049     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
36050     case 'T': return "a struct";
36051     case 'O': return "Python object";
36052     case 'P': return "a pointer";
36053     case 's': case 'p': return "a string";
36054     case 0: return "end";
36055     default: return "unparseable format string";
36056   }
36057 }
__Pyx_BufFmt_TypeCharToStandardSize(char ch,int is_complex)36058 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
36059   switch (ch) {
36060     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
36061     case 'h': case 'H': return 2;
36062     case 'i': case 'I': case 'l': case 'L': return 4;
36063     case 'q': case 'Q': return 8;
36064     case 'f': return (is_complex ? 8 : 4);
36065     case 'd': return (is_complex ? 16 : 8);
36066     case 'g': {
36067       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
36068       return 0;
36069     }
36070     case 'O': case 'P': return sizeof(void*);
36071     default:
36072       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
36073       return 0;
36074     }
36075 }
__Pyx_BufFmt_TypeCharToNativeSize(char ch,int is_complex)36076 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
36077   switch (ch) {
36078     case 'c': case 'b': case 'B': case 's': case 'p': return 1;
36079     case 'h': case 'H': return sizeof(short);
36080     case 'i': case 'I': return sizeof(int);
36081     case 'l': case 'L': return sizeof(long);
36082     #ifdef HAVE_LONG_LONG
36083     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
36084     #endif
36085     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
36086     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
36087     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
36088     case 'O': case 'P': return sizeof(void*);
36089     default: {
36090       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
36091       return 0;
36092     }
36093   }
36094 }
36095 typedef struct { char c; short x; } __Pyx_st_short;
36096 typedef struct { char c; int x; } __Pyx_st_int;
36097 typedef struct { char c; long x; } __Pyx_st_long;
36098 typedef struct { char c; float x; } __Pyx_st_float;
36099 typedef struct { char c; double x; } __Pyx_st_double;
36100 typedef struct { char c; long double x; } __Pyx_st_longdouble;
36101 typedef struct { char c; void *x; } __Pyx_st_void_p;
36102 #ifdef HAVE_LONG_LONG
36103 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
36104 #endif
__Pyx_BufFmt_TypeCharToAlignment(char ch,CYTHON_UNUSED int is_complex)36105 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
36106   switch (ch) {
36107     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
36108     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
36109     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
36110     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
36111 #ifdef HAVE_LONG_LONG
36112     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
36113 #endif
36114     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
36115     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
36116     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
36117     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
36118     default:
36119       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
36120       return 0;
36121     }
36122 }
36123 /* These are for computing the padding at the end of the struct to align
36124    on the first member of the struct. This will probably the same as above,
36125    but we don't have any guarantees.
36126  */
36127 typedef struct { short x; char c; } __Pyx_pad_short;
36128 typedef struct { int x; char c; } __Pyx_pad_int;
36129 typedef struct { long x; char c; } __Pyx_pad_long;
36130 typedef struct { float x; char c; } __Pyx_pad_float;
36131 typedef struct { double x; char c; } __Pyx_pad_double;
36132 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
36133 typedef struct { void *x; char c; } __Pyx_pad_void_p;
36134 #ifdef HAVE_LONG_LONG
36135 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
36136 #endif
__Pyx_BufFmt_TypeCharToPadding(char ch,CYTHON_UNUSED int is_complex)36137 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
36138   switch (ch) {
36139     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
36140     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
36141     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
36142     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
36143 #ifdef HAVE_LONG_LONG
36144     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
36145 #endif
36146     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
36147     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
36148     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
36149     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
36150     default:
36151       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
36152       return 0;
36153     }
36154 }
__Pyx_BufFmt_TypeCharToGroup(char ch,int is_complex)36155 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
36156   switch (ch) {
36157     case 'c':
36158         return 'H';
36159     case 'b': case 'h': case 'i':
36160     case 'l': case 'q': case 's': case 'p':
36161         return 'I';
36162     case 'B': case 'H': case 'I': case 'L': case 'Q':
36163         return 'U';
36164     case 'f': case 'd': case 'g':
36165         return (is_complex ? 'C' : 'R');
36166     case 'O':
36167         return 'O';
36168     case 'P':
36169         return 'P';
36170     default: {
36171       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
36172       return 0;
36173     }
36174   }
36175 }
__Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context * ctx)36176 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
36177   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
36178     const char* expected;
36179     const char* quote;
36180     if (ctx->head == NULL) {
36181       expected = "end";
36182       quote = "";
36183     } else {
36184       expected = ctx->head->field->type->name;
36185       quote = "'";
36186     }
36187     PyErr_Format(PyExc_ValueError,
36188                  "Buffer dtype mismatch, expected %s%s%s but got %s",
36189                  quote, expected, quote,
36190                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
36191   } else {
36192     __Pyx_StructField* field = ctx->head->field;
36193     __Pyx_StructField* parent = (ctx->head - 1)->field;
36194     PyErr_Format(PyExc_ValueError,
36195                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
36196                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
36197                  parent->type->name, field->name);
36198   }
36199 }
__Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context * ctx)36200 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
36201   char group;
36202   size_t size, offset, arraysize = 1;
36203   if (ctx->enc_type == 0) return 0;
36204   if (ctx->head->field->type->arraysize[0]) {
36205     int i, ndim = 0;
36206     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
36207         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
36208         ndim = 1;
36209         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
36210             PyErr_Format(PyExc_ValueError,
36211                          "Expected a dimension of size %zu, got %zu",
36212                          ctx->head->field->type->arraysize[0], ctx->enc_count);
36213             return -1;
36214         }
36215     }
36216     if (!ctx->is_valid_array) {
36217       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
36218                    ctx->head->field->type->ndim, ndim);
36219       return -1;
36220     }
36221     for (i = 0; i < ctx->head->field->type->ndim; i++) {
36222       arraysize *= ctx->head->field->type->arraysize[i];
36223     }
36224     ctx->is_valid_array = 0;
36225     ctx->enc_count = 1;
36226   }
36227   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
36228   do {
36229     __Pyx_StructField* field = ctx->head->field;
36230     __Pyx_TypeInfo* type = field->type;
36231     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
36232       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
36233     } else {
36234       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
36235     }
36236     if (ctx->enc_packmode == '@') {
36237       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
36238       size_t align_mod_offset;
36239       if (align_at == 0) return -1;
36240       align_mod_offset = ctx->fmt_offset % align_at;
36241       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
36242       if (ctx->struct_alignment == 0)
36243           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
36244                                                                  ctx->is_complex);
36245     }
36246     if (type->size != size || type->typegroup != group) {
36247       if (type->typegroup == 'C' && type->fields != NULL) {
36248         size_t parent_offset = ctx->head->parent_offset + field->offset;
36249         ++ctx->head;
36250         ctx->head->field = type->fields;
36251         ctx->head->parent_offset = parent_offset;
36252         continue;
36253       }
36254       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
36255       } else {
36256           __Pyx_BufFmt_RaiseExpected(ctx);
36257           return -1;
36258       }
36259     }
36260     offset = ctx->head->parent_offset + field->offset;
36261     if (ctx->fmt_offset != offset) {
36262       PyErr_Format(PyExc_ValueError,
36263                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
36264                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
36265       return -1;
36266     }
36267     ctx->fmt_offset += size;
36268     if (arraysize)
36269       ctx->fmt_offset += (arraysize - 1) * size;
36270     --ctx->enc_count;
36271     while (1) {
36272       if (field == &ctx->root) {
36273         ctx->head = NULL;
36274         if (ctx->enc_count != 0) {
36275           __Pyx_BufFmt_RaiseExpected(ctx);
36276           return -1;
36277         }
36278         break;
36279       }
36280       ctx->head->field = ++field;
36281       if (field->type == NULL) {
36282         --ctx->head;
36283         field = ctx->head->field;
36284         continue;
36285       } else if (field->type->typegroup == 'S') {
36286         size_t parent_offset = ctx->head->parent_offset + field->offset;
36287         if (field->type->fields->type == NULL) continue;
36288         field = field->type->fields;
36289         ++ctx->head;
36290         ctx->head->field = field;
36291         ctx->head->parent_offset = parent_offset;
36292         break;
36293       } else {
36294         break;
36295       }
36296     }
36297   } while (ctx->enc_count);
36298   ctx->enc_type = 0;
36299   ctx->is_complex = 0;
36300   return 0;
36301 }
36302 static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context * ctx,const char ** tsp)36303 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
36304 {
36305     const char *ts = *tsp;
36306     int i = 0, number;
36307     int ndim = ctx->head->field->type->ndim;
36308 ;
36309     ++ts;
36310     if (ctx->new_count != 1) {
36311         PyErr_SetString(PyExc_ValueError,
36312                         "Cannot handle repeated arrays in format string");
36313         return NULL;
36314     }
36315     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
36316     while (*ts && *ts != ')') {
36317         switch (*ts) {
36318             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
36319             default:  break;
36320         }
36321         number = __Pyx_BufFmt_ExpectNumber(&ts);
36322         if (number == -1) return NULL;
36323         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
36324             return PyErr_Format(PyExc_ValueError,
36325                         "Expected a dimension of size %zu, got %d",
36326                         ctx->head->field->type->arraysize[i], number);
36327         if (*ts != ',' && *ts != ')')
36328             return PyErr_Format(PyExc_ValueError,
36329                                 "Expected a comma in format string, got '%c'", *ts);
36330         if (*ts == ',') ts++;
36331         i++;
36332     }
36333     if (i != ndim)
36334         return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
36335                             ctx->head->field->type->ndim, i);
36336     if (!*ts) {
36337         PyErr_SetString(PyExc_ValueError,
36338                         "Unexpected end of format string, expected ')'");
36339         return NULL;
36340     }
36341     ctx->is_valid_array = 1;
36342     ctx->new_count = 1;
36343     *tsp = ++ts;
36344     return Py_None;
36345 }
__Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context * ctx,const char * ts)36346 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
36347   int got_Z = 0;
36348   while (1) {
36349     switch(*ts) {
36350       case 0:
36351         if (ctx->enc_type != 0 && ctx->head == NULL) {
36352           __Pyx_BufFmt_RaiseExpected(ctx);
36353           return NULL;
36354         }
36355         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
36356         if (ctx->head != NULL) {
36357           __Pyx_BufFmt_RaiseExpected(ctx);
36358           return NULL;
36359         }
36360         return ts;
36361       case ' ':
36362       case '\r':
36363       case '\n':
36364         ++ts;
36365         break;
36366       case '<':
36367         if (!__Pyx_Is_Little_Endian()) {
36368           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
36369           return NULL;
36370         }
36371         ctx->new_packmode = '=';
36372         ++ts;
36373         break;
36374       case '>':
36375       case '!':
36376         if (__Pyx_Is_Little_Endian()) {
36377           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
36378           return NULL;
36379         }
36380         ctx->new_packmode = '=';
36381         ++ts;
36382         break;
36383       case '=':
36384       case '@':
36385       case '^':
36386         ctx->new_packmode = *ts++;
36387         break;
36388       case 'T':
36389         {
36390           const char* ts_after_sub;
36391           size_t i, struct_count = ctx->new_count;
36392           size_t struct_alignment = ctx->struct_alignment;
36393           ctx->new_count = 1;
36394           ++ts;
36395           if (*ts != '{') {
36396             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
36397             return NULL;
36398           }
36399           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
36400           ctx->enc_type = 0;
36401           ctx->enc_count = 0;
36402           ctx->struct_alignment = 0;
36403           ++ts;
36404           ts_after_sub = ts;
36405           for (i = 0; i != struct_count; ++i) {
36406             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
36407             if (!ts_after_sub) return NULL;
36408           }
36409           ts = ts_after_sub;
36410           if (struct_alignment) ctx->struct_alignment = struct_alignment;
36411         }
36412         break;
36413       case '}':
36414         {
36415           size_t alignment = ctx->struct_alignment;
36416           ++ts;
36417           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
36418           ctx->enc_type = 0;
36419           if (alignment && ctx->fmt_offset % alignment) {
36420             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
36421           }
36422         }
36423         return ts;
36424       case 'x':
36425         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
36426         ctx->fmt_offset += ctx->new_count;
36427         ctx->new_count = 1;
36428         ctx->enc_count = 0;
36429         ctx->enc_type = 0;
36430         ctx->enc_packmode = ctx->new_packmode;
36431         ++ts;
36432         break;
36433       case 'Z':
36434         got_Z = 1;
36435         ++ts;
36436         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
36437           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
36438           return NULL;
36439         }
36440         CYTHON_FALLTHROUGH;
36441       case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
36442       case 'l': case 'L': case 'q': case 'Q':
36443       case 'f': case 'd': case 'g':
36444       case 'O': case 'p':
36445         if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
36446             ctx->enc_packmode == ctx->new_packmode) {
36447           ctx->enc_count += ctx->new_count;
36448           ctx->new_count = 1;
36449           got_Z = 0;
36450           ++ts;
36451           break;
36452         }
36453         CYTHON_FALLTHROUGH;
36454       case 's':
36455         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
36456         ctx->enc_count = ctx->new_count;
36457         ctx->enc_packmode = ctx->new_packmode;
36458         ctx->enc_type = *ts;
36459         ctx->is_complex = got_Z;
36460         ++ts;
36461         ctx->new_count = 1;
36462         got_Z = 0;
36463         break;
36464       case ':':
36465         ++ts;
36466         while(*ts != ':') ++ts;
36467         ++ts;
36468         break;
36469       case '(':
36470         if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
36471         break;
36472       default:
36473         {
36474           int number = __Pyx_BufFmt_ExpectNumber(&ts);
36475           if (number == -1) return NULL;
36476           ctx->new_count = (size_t)number;
36477         }
36478     }
36479   }
36480 }
36481 
36482 /* BufferGetAndValidate */
__Pyx_SafeReleaseBuffer(Py_buffer * info)36483   static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
36484   if (unlikely(info->buf == NULL)) return;
36485   if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
36486   __Pyx_ReleaseBuffer(info);
36487 }
__Pyx_ZeroBuffer(Py_buffer * buf)36488 static void __Pyx_ZeroBuffer(Py_buffer* buf) {
36489   buf->buf = NULL;
36490   buf->obj = NULL;
36491   buf->strides = __Pyx_zeros;
36492   buf->shape = __Pyx_zeros;
36493   buf->suboffsets = __Pyx_minusones;
36494 }
__Pyx__GetBufferAndValidate(Py_buffer * buf,PyObject * obj,__Pyx_TypeInfo * dtype,int flags,int nd,int cast,__Pyx_BufFmt_StackElem * stack)36495 static int __Pyx__GetBufferAndValidate(
36496         Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
36497         int nd, int cast, __Pyx_BufFmt_StackElem* stack)
36498 {
36499   buf->buf = NULL;
36500   if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
36501     __Pyx_ZeroBuffer(buf);
36502     return -1;
36503   }
36504   if (unlikely(buf->ndim != nd)) {
36505     PyErr_Format(PyExc_ValueError,
36506                  "Buffer has wrong number of dimensions (expected %d, got %d)",
36507                  nd, buf->ndim);
36508     goto fail;
36509   }
36510   if (!cast) {
36511     __Pyx_BufFmt_Context ctx;
36512     __Pyx_BufFmt_Init(&ctx, stack, dtype);
36513     if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
36514   }
36515   if (unlikely((size_t)buf->itemsize != dtype->size)) {
36516     PyErr_Format(PyExc_ValueError,
36517       "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
36518       buf->itemsize, (buf->itemsize > 1) ? "s" : "",
36519       dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
36520     goto fail;
36521   }
36522   if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
36523   return 0;
36524 fail:;
36525   __Pyx_SafeReleaseBuffer(buf);
36526   return -1;
36527 }
36528 
36529 /* PyDictVersioning */
36530   #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)36531 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
36532     PyObject *dict = Py_TYPE(obj)->tp_dict;
36533     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
36534 }
__Pyx_get_object_dict_version(PyObject * obj)36535 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
36536     PyObject **dictptr = NULL;
36537     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
36538     if (offset) {
36539 #if CYTHON_COMPILING_IN_CPYTHON
36540         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
36541 #else
36542         dictptr = _PyObject_GetDictPtr(obj);
36543 #endif
36544     }
36545     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
36546 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)36547 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
36548     PyObject *dict = Py_TYPE(obj)->tp_dict;
36549     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
36550         return 0;
36551     return obj_dict_version == __Pyx_get_object_dict_version(obj);
36552 }
36553 #endif
36554 
36555 /* GetModuleGlobalName */
36556   #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)36557 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
36558 #else
36559 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
36560 #endif
36561 {
36562     PyObject *result;
36563 #if !CYTHON_AVOID_BORROWED_REFS
36564 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
36565     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
36566     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
36567     if (likely(result)) {
36568         return __Pyx_NewRef(result);
36569     } else if (unlikely(PyErr_Occurred())) {
36570         return NULL;
36571     }
36572 #else
36573     result = PyDict_GetItem(__pyx_d, name);
36574     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
36575     if (likely(result)) {
36576         return __Pyx_NewRef(result);
36577     }
36578 #endif
36579 #else
36580     result = PyObject_GetItem(__pyx_d, name);
36581     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
36582     if (likely(result)) {
36583         return __Pyx_NewRef(result);
36584     }
36585     PyErr_Clear();
36586 #endif
36587     return __Pyx_GetBuiltinName(name);
36588 }
36589 
36590 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)36591   static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
36592     PyObject *args, *result = NULL;
36593     #if CYTHON_FAST_PYCALL
36594     if (PyFunction_Check(function)) {
36595         PyObject *args[2] = {arg1, arg2};
36596         return __Pyx_PyFunction_FastCall(function, args, 2);
36597     }
36598     #endif
36599     #if CYTHON_FAST_PYCCALL
36600     if (__Pyx_PyFastCFunction_Check(function)) {
36601         PyObject *args[2] = {arg1, arg2};
36602         return __Pyx_PyCFunction_FastCall(function, args, 2);
36603     }
36604     #endif
36605     args = PyTuple_New(2);
36606     if (unlikely(!args)) goto done;
36607     Py_INCREF(arg1);
36608     PyTuple_SET_ITEM(args, 0, arg1);
36609     Py_INCREF(arg2);
36610     PyTuple_SET_ITEM(args, 1, arg2);
36611     Py_INCREF(function);
36612     result = __Pyx_PyObject_Call(function, args, NULL);
36613     Py_DECREF(args);
36614     Py_DECREF(function);
36615 done:
36616     return result;
36617 }
36618 
36619 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)36620   static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
36621     if (unlikely(!type)) {
36622         PyErr_SetString(PyExc_SystemError, "Missing type object");
36623         return 0;
36624     }
36625     if (likely(__Pyx_TypeCheck(obj, type)))
36626         return 1;
36627     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
36628                  Py_TYPE(obj)->tp_name, type->tp_name);
36629     return 0;
36630 }
36631 
36632 /* None */
__Pyx_RaiseUnboundLocalError(const char * varname)36633   static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
36634     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
36635 }
36636 
36637 /* MemviewSliceInit */
36638   static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj * memview,int ndim,__Pyx_memviewslice * memviewslice,int memview_is_new_reference)36639 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
36640                         int ndim,
36641                         __Pyx_memviewslice *memviewslice,
36642                         int memview_is_new_reference)
36643 {
36644     __Pyx_RefNannyDeclarations
36645     int i, retval=-1;
36646     Py_buffer *buf = &memview->view;
36647     __Pyx_RefNannySetupContext("init_memviewslice", 0);
36648     if (memviewslice->memview || memviewslice->data) {
36649         PyErr_SetString(PyExc_ValueError,
36650             "memviewslice is already initialized!");
36651         goto fail;
36652     }
36653     if (buf->strides) {
36654         for (i = 0; i < ndim; i++) {
36655             memviewslice->strides[i] = buf->strides[i];
36656         }
36657     } else {
36658         Py_ssize_t stride = buf->itemsize;
36659         for (i = ndim - 1; i >= 0; i--) {
36660             memviewslice->strides[i] = stride;
36661             stride *= buf->shape[i];
36662         }
36663     }
36664     for (i = 0; i < ndim; i++) {
36665         memviewslice->shape[i]   = buf->shape[i];
36666         if (buf->suboffsets) {
36667             memviewslice->suboffsets[i] = buf->suboffsets[i];
36668         } else {
36669             memviewslice->suboffsets[i] = -1;
36670         }
36671     }
36672     memviewslice->memview = memview;
36673     memviewslice->data = (char *)buf->buf;
36674     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
36675         Py_INCREF(memview);
36676     }
36677     retval = 0;
36678     goto no_fail;
36679 fail:
36680     memviewslice->memview = 0;
36681     memviewslice->data = 0;
36682     retval = -1;
36683 no_fail:
36684     __Pyx_RefNannyFinishContext();
36685     return retval;
36686 }
36687 #ifndef Py_NO_RETURN
36688 #define Py_NO_RETURN
36689 #endif
__pyx_fatalerror(const char * fmt,...)36690 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
36691     va_list vargs;
36692     char msg[200];
36693 #ifdef HAVE_STDARG_PROTOTYPES
36694     va_start(vargs, fmt);
36695 #else
36696     va_start(vargs);
36697 #endif
36698     vsnprintf(msg, 200, fmt, vargs);
36699     va_end(vargs);
36700     Py_FatalError(msg);
36701 }
36702 static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int * acquisition_count,PyThread_type_lock lock)36703 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
36704                                    PyThread_type_lock lock)
36705 {
36706     int result;
36707     PyThread_acquire_lock(lock, 1);
36708     result = (*acquisition_count)++;
36709     PyThread_release_lock(lock);
36710     return result;
36711 }
36712 static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int * acquisition_count,PyThread_type_lock lock)36713 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
36714                                    PyThread_type_lock lock)
36715 {
36716     int result;
36717     PyThread_acquire_lock(lock, 1);
36718     result = (*acquisition_count)--;
36719     PyThread_release_lock(lock);
36720     return result;
36721 }
36722 static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice * memslice,int have_gil,int lineno)36723 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
36724 {
36725     int first_time;
36726     struct __pyx_memoryview_obj *memview = memslice->memview;
36727     if (!memview || (PyObject *) memview == Py_None)
36728         return;
36729     if (__pyx_get_slice_count(memview) < 0)
36730         __pyx_fatalerror("Acquisition count is %d (line %d)",
36731                          __pyx_get_slice_count(memview), lineno);
36732     first_time = __pyx_add_acquisition_count(memview) == 0;
36733     if (first_time) {
36734         if (have_gil) {
36735             Py_INCREF((PyObject *) memview);
36736         } else {
36737             PyGILState_STATE _gilstate = PyGILState_Ensure();
36738             Py_INCREF((PyObject *) memview);
36739             PyGILState_Release(_gilstate);
36740         }
36741     }
36742 }
__Pyx_XDEC_MEMVIEW(__Pyx_memviewslice * memslice,int have_gil,int lineno)36743 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
36744                                              int have_gil, int lineno) {
36745     int last_time;
36746     struct __pyx_memoryview_obj *memview = memslice->memview;
36747     if (!memview ) {
36748         return;
36749     } else if ((PyObject *) memview == Py_None) {
36750         memslice->memview = NULL;
36751         return;
36752     }
36753     if (__pyx_get_slice_count(memview) <= 0)
36754         __pyx_fatalerror("Acquisition count is %d (line %d)",
36755                          __pyx_get_slice_count(memview), lineno);
36756     last_time = __pyx_sub_acquisition_count(memview) == 1;
36757     memslice->data = NULL;
36758     if (last_time) {
36759         if (have_gil) {
36760             Py_CLEAR(memslice->memview);
36761         } else {
36762             PyGILState_STATE _gilstate = PyGILState_Ensure();
36763             Py_CLEAR(memslice->memview);
36764             PyGILState_Release(_gilstate);
36765         }
36766     } else {
36767         memslice->memview = NULL;
36768     }
36769 }
36770 
36771 /* PyErrExceptionMatches */
36772   #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)36773 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
36774     Py_ssize_t i, n;
36775     n = PyTuple_GET_SIZE(tuple);
36776 #if PY_MAJOR_VERSION >= 3
36777     for (i=0; i<n; i++) {
36778         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
36779     }
36780 #endif
36781     for (i=0; i<n; i++) {
36782         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
36783     }
36784     return 0;
36785 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)36786 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
36787     PyObject *exc_type = tstate->curexc_type;
36788     if (exc_type == err) return 1;
36789     if (unlikely(!exc_type)) return 0;
36790     if (unlikely(PyTuple_Check(err)))
36791         return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
36792     return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
36793 }
36794 #endif
36795 
36796 /* GetAttr */
__Pyx_GetAttr(PyObject * o,PyObject * n)36797   static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
36798 #if CYTHON_USE_TYPE_SLOTS
36799 #if PY_MAJOR_VERSION >= 3
36800     if (likely(PyUnicode_Check(n)))
36801 #else
36802     if (likely(PyString_Check(n)))
36803 #endif
36804         return __Pyx_PyObject_GetAttrStr(o, n);
36805 #endif
36806     return PyObject_GetAttr(o, n);
36807 }
36808 
36809 /* GetAttr3 */
__Pyx_GetAttr3Default(PyObject * d)36810   static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
36811     __Pyx_PyThreadState_declare
36812     __Pyx_PyThreadState_assign
36813     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
36814         return NULL;
36815     __Pyx_PyErr_Clear();
36816     Py_INCREF(d);
36817     return d;
36818 }
__Pyx_GetAttr3(PyObject * o,PyObject * n,PyObject * d)36819 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
36820     PyObject *r = __Pyx_GetAttr(o, n);
36821     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
36822 }
36823 
36824 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)36825   static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
36826     PyObject *r;
36827     if (!j) return NULL;
36828     r = PyObject_GetItem(o, j);
36829     Py_DECREF(j);
36830     return r;
36831 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)36832 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
36833                                                               CYTHON_NCP_UNUSED int wraparound,
36834                                                               CYTHON_NCP_UNUSED int boundscheck) {
36835 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36836     Py_ssize_t wrapped_i = i;
36837     if (wraparound & unlikely(i < 0)) {
36838         wrapped_i += PyList_GET_SIZE(o);
36839     }
36840     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
36841         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
36842         Py_INCREF(r);
36843         return r;
36844     }
36845     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
36846 #else
36847     return PySequence_GetItem(o, i);
36848 #endif
36849 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)36850 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
36851                                                               CYTHON_NCP_UNUSED int wraparound,
36852                                                               CYTHON_NCP_UNUSED int boundscheck) {
36853 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36854     Py_ssize_t wrapped_i = i;
36855     if (wraparound & unlikely(i < 0)) {
36856         wrapped_i += PyTuple_GET_SIZE(o);
36857     }
36858     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
36859         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
36860         Py_INCREF(r);
36861         return r;
36862     }
36863     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
36864 #else
36865     return PySequence_GetItem(o, i);
36866 #endif
36867 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)36868 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
36869                                                      CYTHON_NCP_UNUSED int wraparound,
36870                                                      CYTHON_NCP_UNUSED int boundscheck) {
36871 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
36872     if (is_list || PyList_CheckExact(o)) {
36873         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
36874         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
36875             PyObject *r = PyList_GET_ITEM(o, n);
36876             Py_INCREF(r);
36877             return r;
36878         }
36879     }
36880     else if (PyTuple_CheckExact(o)) {
36881         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
36882         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
36883             PyObject *r = PyTuple_GET_ITEM(o, n);
36884             Py_INCREF(r);
36885             return r;
36886         }
36887     } else {
36888         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
36889         if (likely(m && m->sq_item)) {
36890             if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
36891                 Py_ssize_t l = m->sq_length(o);
36892                 if (likely(l >= 0)) {
36893                     i += l;
36894                 } else {
36895                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
36896                         return NULL;
36897                     PyErr_Clear();
36898                 }
36899             }
36900             return m->sq_item(o, i);
36901         }
36902     }
36903 #else
36904     if (is_list || PySequence_Check(o)) {
36905         return PySequence_GetItem(o, i);
36906     }
36907 #endif
36908     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
36909 }
36910 
36911 /* PyFloatBinop */
36912   #if !CYTHON_COMPILING_IN_PYPY
__Pyx_PyFloat_EqObjC(PyObject * op1,PyObject * op2,double floatval,int inplace,int zerodivision_check)36913 static PyObject* __Pyx_PyFloat_EqObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
36914     const double b = floatval;
36915     double a;
36916     (void)inplace;
36917     (void)zerodivision_check;
36918     if (op1 == op2) {
36919         Py_RETURN_TRUE;
36920     }
36921     if (likely(PyFloat_CheckExact(op1))) {
36922         a = PyFloat_AS_DOUBLE(op1);
36923 
36924     } else
36925     #if PY_MAJOR_VERSION < 3
36926     if (likely(PyInt_CheckExact(op1))) {
36927         a = (double) PyInt_AS_LONG(op1);
36928 
36929     } else
36930     #endif
36931     if (likely(PyLong_CheckExact(op1))) {
36932         #if CYTHON_USE_PYLONG_INTERNALS
36933         const digit* digits = ((PyLongObject*)op1)->ob_digit;
36934         const Py_ssize_t size = Py_SIZE(op1);
36935         switch (size) {
36936             case  0: a = 0.0; break;
36937             case -1: a = -(double) digits[0]; break;
36938             case  1: a = (double) digits[0]; break;
36939             case -2:
36940             case 2:
36941                 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
36942                     a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
36943                     if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
36944                         if (size == -2)
36945                             a = -a;
36946                         break;
36947                     }
36948                 }
36949                 CYTHON_FALLTHROUGH;
36950             case -3:
36951             case 3:
36952                 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
36953                     a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
36954                     if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
36955                         if (size == -3)
36956                             a = -a;
36957                         break;
36958                     }
36959                 }
36960                 CYTHON_FALLTHROUGH;
36961             case -4:
36962             case 4:
36963                 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
36964                     a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
36965                     if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
36966                         if (size == -4)
36967                             a = -a;
36968                         break;
36969                     }
36970                 }
36971                 CYTHON_FALLTHROUGH;
36972             default:
36973         #else
36974         {
36975         #endif
36976             return (
36977                 PyFloat_Type.tp_richcompare(op2, op1, Py_EQ));
36978         }
36979     } else {
36980         return (
36981             PyObject_RichCompare(op1, op2, Py_EQ));
36982     }
36983         if (a == b) {
36984             Py_RETURN_TRUE;
36985         } else {
36986             Py_RETURN_FALSE;
36987         }
36988 }
36989 #endif
36990 
36991 /* None */
36992     static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
36993     PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
36994 }
36995 
36996 /* SliceObject */
36997     static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
36998         Py_ssize_t cstart, Py_ssize_t cstop,
36999         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
37000         int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
37001 #if CYTHON_USE_TYPE_SLOTS
37002     PyMappingMethods* mp;
37003 #if PY_MAJOR_VERSION < 3
37004     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
37005     if (likely(ms && ms->sq_slice)) {
37006         if (!has_cstart) {
37007             if (_py_start && (*_py_start != Py_None)) {
37008                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
37009                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
37010             } else
37011                 cstart = 0;
37012         }
37013         if (!has_cstop) {
37014             if (_py_stop && (*_py_stop != Py_None)) {
37015                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
37016                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
37017             } else
37018                 cstop = PY_SSIZE_T_MAX;
37019         }
37020         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
37021             Py_ssize_t l = ms->sq_length(obj);
37022             if (likely(l >= 0)) {
37023                 if (cstop < 0) {
37024                     cstop += l;
37025                     if (cstop < 0) cstop = 0;
37026                 }
37027                 if (cstart < 0) {
37028                     cstart += l;
37029                     if (cstart < 0) cstart = 0;
37030                 }
37031             } else {
37032                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
37033                     goto bad;
37034                 PyErr_Clear();
37035             }
37036         }
37037         return ms->sq_slice(obj, cstart, cstop);
37038     }
37039 #endif
37040     mp = Py_TYPE(obj)->tp_as_mapping;
37041     if (likely(mp && mp->mp_subscript))
37042 #endif
37043     {
37044         PyObject* result;
37045         PyObject *py_slice, *py_start, *py_stop;
37046         if (_py_slice) {
37047             py_slice = *_py_slice;
37048         } else {
37049             PyObject* owned_start = NULL;
37050             PyObject* owned_stop = NULL;
37051             if (_py_start) {
37052                 py_start = *_py_start;
37053             } else {
37054                 if (has_cstart) {
37055                     owned_start = py_start = PyInt_FromSsize_t(cstart);
37056                     if (unlikely(!py_start)) goto bad;
37057                 } else
37058                     py_start = Py_None;
37059             }
37060             if (_py_stop) {
37061                 py_stop = *_py_stop;
37062             } else {
37063                 if (has_cstop) {
37064                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
37065                     if (unlikely(!py_stop)) {
37066                         Py_XDECREF(owned_start);
37067                         goto bad;
37068                     }
37069                 } else
37070                     py_stop = Py_None;
37071             }
37072             py_slice = PySlice_New(py_start, py_stop, Py_None);
37073             Py_XDECREF(owned_start);
37074             Py_XDECREF(owned_stop);
37075             if (unlikely(!py_slice)) goto bad;
37076         }
37077 #if CYTHON_USE_TYPE_SLOTS
37078         result = mp->mp_subscript(obj, py_slice);
37079 #else
37080         result = PyObject_GetItem(obj, py_slice);
37081 #endif
37082         if (!_py_slice) {
37083             Py_DECREF(py_slice);
37084         }
37085         return result;
37086     }
37087     PyErr_Format(PyExc_TypeError,
37088         "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
37089 bad:
37090     return NULL;
37091 }
37092 
37093 /* Import */
37094     static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
37095     PyObject *empty_list = 0;
37096     PyObject *module = 0;
37097     PyObject *global_dict = 0;
37098     PyObject *empty_dict = 0;
37099     PyObject *list;
37100     #if PY_MAJOR_VERSION < 3
37101     PyObject *py_import;
37102     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
37103     if (!py_import)
37104         goto bad;
37105     #endif
37106     if (from_list)
37107         list = from_list;
37108     else {
37109         empty_list = PyList_New(0);
37110         if (!empty_list)
37111             goto bad;
37112         list = empty_list;
37113     }
37114     global_dict = PyModule_GetDict(__pyx_m);
37115     if (!global_dict)
37116         goto bad;
37117     empty_dict = PyDict_New();
37118     if (!empty_dict)
37119         goto bad;
37120     {
37121         #if PY_MAJOR_VERSION >= 3
37122         if (level == -1) {
37123             if (strchr(__Pyx_MODULE_NAME, '.')) {
37124                 module = PyImport_ImportModuleLevelObject(
37125                     name, global_dict, empty_dict, list, 1);
37126                 if (!module) {
37127                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
37128                         goto bad;
37129                     PyErr_Clear();
37130                 }
37131             }
37132             level = 0;
37133         }
37134         #endif
37135         if (!module) {
37136             #if PY_MAJOR_VERSION < 3
37137             PyObject *py_level = PyInt_FromLong(level);
37138             if (!py_level)
37139                 goto bad;
37140             module = PyObject_CallFunctionObjArgs(py_import,
37141                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
37142             Py_DECREF(py_level);
37143             #else
37144             module = PyImport_ImportModuleLevelObject(
37145                 name, global_dict, empty_dict, list, level);
37146             #endif
37147         }
37148     }
37149 bad:
37150     #if PY_MAJOR_VERSION < 3
37151     Py_XDECREF(py_import);
37152     #endif
37153     Py_XDECREF(empty_list);
37154     Py_XDECREF(empty_dict);
37155     return module;
37156 }
37157 
37158 /* ImportFrom */
37159     static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
37160     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
37161     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
37162         PyErr_Format(PyExc_ImportError,
37163         #if PY_MAJOR_VERSION < 3
37164             "cannot import name %.230s", PyString_AS_STRING(name));
37165         #else
37166             "cannot import name %S", name);
37167         #endif
37168     }
37169     return value;
37170 }
37171 
37172 /* GetTopmostException */
37173     #if CYTHON_USE_EXC_INFO_STACK
37174 static _PyErr_StackItem *
37175 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
37176 {
37177     _PyErr_StackItem *exc_info = tstate->exc_info;
37178     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
37179            exc_info->previous_item != NULL)
37180     {
37181         exc_info = exc_info->previous_item;
37182     }
37183     return exc_info;
37184 }
37185 #endif
37186 
37187 /* SaveResetException */
37188     #if CYTHON_FAST_THREAD_STATE
37189 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
37190     #if CYTHON_USE_EXC_INFO_STACK
37191     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
37192     *type = exc_info->exc_type;
37193     *value = exc_info->exc_value;
37194     *tb = exc_info->exc_traceback;
37195     #else
37196     *type = tstate->exc_type;
37197     *value = tstate->exc_value;
37198     *tb = tstate->exc_traceback;
37199     #endif
37200     Py_XINCREF(*type);
37201     Py_XINCREF(*value);
37202     Py_XINCREF(*tb);
37203 }
37204 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
37205     PyObject *tmp_type, *tmp_value, *tmp_tb;
37206     #if CYTHON_USE_EXC_INFO_STACK
37207     _PyErr_StackItem *exc_info = tstate->exc_info;
37208     tmp_type = exc_info->exc_type;
37209     tmp_value = exc_info->exc_value;
37210     tmp_tb = exc_info->exc_traceback;
37211     exc_info->exc_type = type;
37212     exc_info->exc_value = value;
37213     exc_info->exc_traceback = tb;
37214     #else
37215     tmp_type = tstate->exc_type;
37216     tmp_value = tstate->exc_value;
37217     tmp_tb = tstate->exc_traceback;
37218     tstate->exc_type = type;
37219     tstate->exc_value = value;
37220     tstate->exc_traceback = tb;
37221     #endif
37222     Py_XDECREF(tmp_type);
37223     Py_XDECREF(tmp_value);
37224     Py_XDECREF(tmp_tb);
37225 }
37226 #endif
37227 
37228 /* GetException */
37229     #if CYTHON_FAST_THREAD_STATE
37230 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
37231 #else
37232 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
37233 #endif
37234 {
37235     PyObject *local_type, *local_value, *local_tb;
37236 #if CYTHON_FAST_THREAD_STATE
37237     PyObject *tmp_type, *tmp_value, *tmp_tb;
37238     local_type = tstate->curexc_type;
37239     local_value = tstate->curexc_value;
37240     local_tb = tstate->curexc_traceback;
37241     tstate->curexc_type = 0;
37242     tstate->curexc_value = 0;
37243     tstate->curexc_traceback = 0;
37244 #else
37245     PyErr_Fetch(&local_type, &local_value, &local_tb);
37246 #endif
37247     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
37248 #if CYTHON_FAST_THREAD_STATE
37249     if (unlikely(tstate->curexc_type))
37250 #else
37251     if (unlikely(PyErr_Occurred()))
37252 #endif
37253         goto bad;
37254     #if PY_MAJOR_VERSION >= 3
37255     if (local_tb) {
37256         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
37257             goto bad;
37258     }
37259     #endif
37260     Py_XINCREF(local_tb);
37261     Py_XINCREF(local_type);
37262     Py_XINCREF(local_value);
37263     *type = local_type;
37264     *value = local_value;
37265     *tb = local_tb;
37266 #if CYTHON_FAST_THREAD_STATE
37267     #if CYTHON_USE_EXC_INFO_STACK
37268     {
37269         _PyErr_StackItem *exc_info = tstate->exc_info;
37270         tmp_type = exc_info->exc_type;
37271         tmp_value = exc_info->exc_value;
37272         tmp_tb = exc_info->exc_traceback;
37273         exc_info->exc_type = local_type;
37274         exc_info->exc_value = local_value;
37275         exc_info->exc_traceback = local_tb;
37276     }
37277     #else
37278     tmp_type = tstate->exc_type;
37279     tmp_value = tstate->exc_value;
37280     tmp_tb = tstate->exc_traceback;
37281     tstate->exc_type = local_type;
37282     tstate->exc_value = local_value;
37283     tstate->exc_traceback = local_tb;
37284     #endif
37285     Py_XDECREF(tmp_type);
37286     Py_XDECREF(tmp_value);
37287     Py_XDECREF(tmp_tb);
37288 #else
37289     PyErr_SetExcInfo(local_type, local_value, local_tb);
37290 #endif
37291     return 0;
37292 bad:
37293     *type = 0;
37294     *value = 0;
37295     *tb = 0;
37296     Py_XDECREF(local_type);
37297     Py_XDECREF(local_value);
37298     Py_XDECREF(local_tb);
37299     return -1;
37300 }
37301 
37302 /* PyIntBinop */
37303     #if !CYTHON_COMPILING_IN_PYPY
37304 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
37305     (void)inplace;
37306     (void)zerodivision_check;
37307     #if PY_MAJOR_VERSION < 3
37308     if (likely(PyInt_CheckExact(op1))) {
37309         const long b = intval;
37310         long x;
37311         long a = PyInt_AS_LONG(op1);
37312             x = (long)((unsigned long)a - b);
37313             if (likely((x^a) >= 0 || (x^~b) >= 0))
37314                 return PyInt_FromLong(x);
37315             return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
37316     }
37317     #endif
37318     #if CYTHON_USE_PYLONG_INTERNALS
37319     if (likely(PyLong_CheckExact(op1))) {
37320         const long b = intval;
37321         long a, x;
37322 #ifdef HAVE_LONG_LONG
37323         const PY_LONG_LONG llb = intval;
37324         PY_LONG_LONG lla, llx;
37325 #endif
37326         const digit* digits = ((PyLongObject*)op1)->ob_digit;
37327         const Py_ssize_t size = Py_SIZE(op1);
37328         if (likely(__Pyx_sst_abs(size) <= 1)) {
37329             a = likely(size) ? digits[0] : 0;
37330             if (size == -1) a = -a;
37331         } else {
37332             switch (size) {
37333                 case -2:
37334                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37335                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37336                         break;
37337 #ifdef HAVE_LONG_LONG
37338                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37339                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37340                         goto long_long;
37341 #endif
37342                     }
37343                     CYTHON_FALLTHROUGH;
37344                 case 2:
37345                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37346                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37347                         break;
37348 #ifdef HAVE_LONG_LONG
37349                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37350                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37351                         goto long_long;
37352 #endif
37353                     }
37354                     CYTHON_FALLTHROUGH;
37355                 case -3:
37356                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
37357                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37358                         break;
37359 #ifdef HAVE_LONG_LONG
37360                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
37361                         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]));
37362                         goto long_long;
37363 #endif
37364                     }
37365                     CYTHON_FALLTHROUGH;
37366                 case 3:
37367                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
37368                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37369                         break;
37370 #ifdef HAVE_LONG_LONG
37371                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
37372                         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]));
37373                         goto long_long;
37374 #endif
37375                     }
37376                     CYTHON_FALLTHROUGH;
37377                 case -4:
37378                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
37379                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37380                         break;
37381 #ifdef HAVE_LONG_LONG
37382                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
37383                         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]));
37384                         goto long_long;
37385 #endif
37386                     }
37387                     CYTHON_FALLTHROUGH;
37388                 case 4:
37389                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
37390                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37391                         break;
37392 #ifdef HAVE_LONG_LONG
37393                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
37394                         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]));
37395                         goto long_long;
37396 #endif
37397                     }
37398                     CYTHON_FALLTHROUGH;
37399                 default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
37400             }
37401         }
37402                 x = a - b;
37403             return PyLong_FromLong(x);
37404 #ifdef HAVE_LONG_LONG
37405         long_long:
37406                 llx = lla - llb;
37407             return PyLong_FromLongLong(llx);
37408 #endif
37409 
37410 
37411     }
37412     #endif
37413     if (PyFloat_CheckExact(op1)) {
37414         const long b = intval;
37415         double a = PyFloat_AS_DOUBLE(op1);
37416             double result;
37417             PyFPE_START_PROTECT("subtract", return NULL)
37418             result = ((double)a) - (double)b;
37419             PyFPE_END_PROTECT(result)
37420             return PyFloat_FromDouble(result);
37421     }
37422     return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
37423 }
37424 #endif
37425 
37426 /* DictGetItem */
37427     #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
37428 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
37429     PyObject *value;
37430     value = PyDict_GetItemWithError(d, key);
37431     if (unlikely(!value)) {
37432         if (!PyErr_Occurred()) {
37433             if (unlikely(PyTuple_Check(key))) {
37434                 PyObject* args = PyTuple_Pack(1, key);
37435                 if (likely(args)) {
37436                     PyErr_SetObject(PyExc_KeyError, args);
37437                     Py_DECREF(args);
37438                 }
37439             } else {
37440                 PyErr_SetObject(PyExc_KeyError, key);
37441             }
37442         }
37443         return NULL;
37444     }
37445     Py_INCREF(value);
37446     return value;
37447 }
37448 #endif
37449 
37450 /* RaiseTooManyValuesToUnpack */
37451     static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
37452     PyErr_Format(PyExc_ValueError,
37453                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
37454 }
37455 
37456 /* RaiseNeedMoreValuesToUnpack */
37457     static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
37458     PyErr_Format(PyExc_ValueError,
37459                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
37460                  index, (index == 1) ? "" : "s");
37461 }
37462 
37463 /* RaiseNoneIterError */
37464     static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
37465     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
37466 }
37467 
37468 /* HasAttr */
37469     static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
37470     PyObject *r;
37471     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
37472         PyErr_SetString(PyExc_TypeError,
37473                         "hasattr(): attribute name must be string");
37474         return -1;
37475     }
37476     r = __Pyx_GetAttr(o, n);
37477     if (unlikely(!r)) {
37478         PyErr_Clear();
37479         return 0;
37480     } else {
37481         Py_DECREF(r);
37482         return 1;
37483     }
37484 }
37485 
37486 /* BytesEquals */
37487     static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
37488 #if CYTHON_COMPILING_IN_PYPY
37489     return PyObject_RichCompareBool(s1, s2, equals);
37490 #else
37491     if (s1 == s2) {
37492         return (equals == Py_EQ);
37493     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
37494         const char *ps1, *ps2;
37495         Py_ssize_t length = PyBytes_GET_SIZE(s1);
37496         if (length != PyBytes_GET_SIZE(s2))
37497             return (equals == Py_NE);
37498         ps1 = PyBytes_AS_STRING(s1);
37499         ps2 = PyBytes_AS_STRING(s2);
37500         if (ps1[0] != ps2[0]) {
37501             return (equals == Py_NE);
37502         } else if (length == 1) {
37503             return (equals == Py_EQ);
37504         } else {
37505             int result;
37506 #if CYTHON_USE_UNICODE_INTERNALS
37507             Py_hash_t hash1, hash2;
37508             hash1 = ((PyBytesObject*)s1)->ob_shash;
37509             hash2 = ((PyBytesObject*)s2)->ob_shash;
37510             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
37511                 return (equals == Py_NE);
37512             }
37513 #endif
37514             result = memcmp(ps1, ps2, (size_t)length);
37515             return (equals == Py_EQ) ? (result == 0) : (result != 0);
37516         }
37517     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
37518         return (equals == Py_NE);
37519     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
37520         return (equals == Py_NE);
37521     } else {
37522         int result;
37523         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
37524         if (!py_result)
37525             return -1;
37526         result = __Pyx_PyObject_IsTrue(py_result);
37527         Py_DECREF(py_result);
37528         return result;
37529     }
37530 #endif
37531 }
37532 
37533 /* UnicodeEquals */
37534     static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
37535 #if CYTHON_COMPILING_IN_PYPY
37536     return PyObject_RichCompareBool(s1, s2, equals);
37537 #else
37538 #if PY_MAJOR_VERSION < 3
37539     PyObject* owned_ref = NULL;
37540 #endif
37541     int s1_is_unicode, s2_is_unicode;
37542     if (s1 == s2) {
37543         goto return_eq;
37544     }
37545     s1_is_unicode = PyUnicode_CheckExact(s1);
37546     s2_is_unicode = PyUnicode_CheckExact(s2);
37547 #if PY_MAJOR_VERSION < 3
37548     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
37549         owned_ref = PyUnicode_FromObject(s2);
37550         if (unlikely(!owned_ref))
37551             return -1;
37552         s2 = owned_ref;
37553         s2_is_unicode = 1;
37554     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
37555         owned_ref = PyUnicode_FromObject(s1);
37556         if (unlikely(!owned_ref))
37557             return -1;
37558         s1 = owned_ref;
37559         s1_is_unicode = 1;
37560     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
37561         return __Pyx_PyBytes_Equals(s1, s2, equals);
37562     }
37563 #endif
37564     if (s1_is_unicode & s2_is_unicode) {
37565         Py_ssize_t length;
37566         int kind;
37567         void *data1, *data2;
37568         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
37569             return -1;
37570         length = __Pyx_PyUnicode_GET_LENGTH(s1);
37571         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
37572             goto return_ne;
37573         }
37574 #if CYTHON_USE_UNICODE_INTERNALS
37575         {
37576             Py_hash_t hash1, hash2;
37577         #if CYTHON_PEP393_ENABLED
37578             hash1 = ((PyASCIIObject*)s1)->hash;
37579             hash2 = ((PyASCIIObject*)s2)->hash;
37580         #else
37581             hash1 = ((PyUnicodeObject*)s1)->hash;
37582             hash2 = ((PyUnicodeObject*)s2)->hash;
37583         #endif
37584             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
37585                 goto return_ne;
37586             }
37587         }
37588 #endif
37589         kind = __Pyx_PyUnicode_KIND(s1);
37590         if (kind != __Pyx_PyUnicode_KIND(s2)) {
37591             goto return_ne;
37592         }
37593         data1 = __Pyx_PyUnicode_DATA(s1);
37594         data2 = __Pyx_PyUnicode_DATA(s2);
37595         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
37596             goto return_ne;
37597         } else if (length == 1) {
37598             goto return_eq;
37599         } else {
37600             int result = memcmp(data1, data2, (size_t)(length * kind));
37601             #if PY_MAJOR_VERSION < 3
37602             Py_XDECREF(owned_ref);
37603             #endif
37604             return (equals == Py_EQ) ? (result == 0) : (result != 0);
37605         }
37606     } else if ((s1 == Py_None) & s2_is_unicode) {
37607         goto return_ne;
37608     } else if ((s2 == Py_None) & s1_is_unicode) {
37609         goto return_ne;
37610     } else {
37611         int result;
37612         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
37613         #if PY_MAJOR_VERSION < 3
37614         Py_XDECREF(owned_ref);
37615         #endif
37616         if (!py_result)
37617             return -1;
37618         result = __Pyx_PyObject_IsTrue(py_result);
37619         Py_DECREF(py_result);
37620         return result;
37621     }
37622 return_eq:
37623     #if PY_MAJOR_VERSION < 3
37624     Py_XDECREF(owned_ref);
37625     #endif
37626     return (equals == Py_EQ);
37627 return_ne:
37628     #if PY_MAJOR_VERSION < 3
37629     Py_XDECREF(owned_ref);
37630     #endif
37631     return (equals == Py_NE);
37632 #endif
37633 }
37634 
37635 /* BufferIndexError */
37636     static void __Pyx_RaiseBufferIndexError(int axis) {
37637   PyErr_Format(PyExc_IndexError,
37638      "Out of bounds on buffer access (axis %d)", axis);
37639 }
37640 
37641 /* WriteUnraisableException */
37642     static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
37643                                   CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
37644                                   int full_traceback, CYTHON_UNUSED int nogil) {
37645     PyObject *old_exc, *old_val, *old_tb;
37646     PyObject *ctx;
37647     __Pyx_PyThreadState_declare
37648 #ifdef WITH_THREAD
37649     PyGILState_STATE state;
37650     if (nogil)
37651         state = PyGILState_Ensure();
37652 #ifdef _MSC_VER
37653     else state = (PyGILState_STATE)-1;
37654 #endif
37655 #endif
37656     __Pyx_PyThreadState_assign
37657     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
37658     if (full_traceback) {
37659         Py_XINCREF(old_exc);
37660         Py_XINCREF(old_val);
37661         Py_XINCREF(old_tb);
37662         __Pyx_ErrRestore(old_exc, old_val, old_tb);
37663         PyErr_PrintEx(1);
37664     }
37665     #if PY_MAJOR_VERSION < 3
37666     ctx = PyString_FromString(name);
37667     #else
37668     ctx = PyUnicode_FromString(name);
37669     #endif
37670     __Pyx_ErrRestore(old_exc, old_val, old_tb);
37671     if (!ctx) {
37672         PyErr_WriteUnraisable(Py_None);
37673     } else {
37674         PyErr_WriteUnraisable(ctx);
37675         Py_DECREF(ctx);
37676     }
37677 #ifdef WITH_THREAD
37678     if (nogil)
37679         PyGILState_Release(state);
37680 #endif
37681 }
37682 
37683 /* None */
37684     static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
37685     Py_ssize_t q = a / b;
37686     Py_ssize_t r = a - q*b;
37687     q -= ((r != 0) & ((r ^ b) < 0));
37688     return q;
37689 }
37690 
37691 /* ObjectGetItem */
37692     #if CYTHON_USE_TYPE_SLOTS
37693 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
37694     PyObject *runerr;
37695     Py_ssize_t key_value;
37696     PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
37697     if (unlikely(!(m && m->sq_item))) {
37698         PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
37699         return NULL;
37700     }
37701     key_value = __Pyx_PyIndex_AsSsize_t(index);
37702     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
37703         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
37704     }
37705     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
37706         PyErr_Clear();
37707         PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
37708     }
37709     return NULL;
37710 }
37711 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
37712     PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
37713     if (likely(m && m->mp_subscript)) {
37714         return m->mp_subscript(obj, key);
37715     }
37716     return __Pyx_PyObject_GetIndex(obj, key);
37717 }
37718 #endif
37719 
37720 /* decode_c_string */
37721     static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
37722          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
37723          const char* encoding, const char* errors,
37724          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
37725     Py_ssize_t length;
37726     if (unlikely((start < 0) | (stop < 0))) {
37727         size_t slen = strlen(cstring);
37728         if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
37729             PyErr_SetString(PyExc_OverflowError,
37730                             "c-string too long to convert to Python");
37731             return NULL;
37732         }
37733         length = (Py_ssize_t) slen;
37734         if (start < 0) {
37735             start += length;
37736             if (start < 0)
37737                 start = 0;
37738         }
37739         if (stop < 0)
37740             stop += length;
37741     }
37742     length = stop - start;
37743     if (unlikely(length <= 0))
37744         return PyUnicode_FromUnicode(NULL, 0);
37745     cstring += start;
37746     if (decode_func) {
37747         return decode_func(cstring, length, errors);
37748     } else {
37749         return PyUnicode_Decode(cstring, length, encoding, errors);
37750     }
37751 }
37752 
37753 /* SwapException */
37754     #if CYTHON_FAST_THREAD_STATE
37755 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
37756     PyObject *tmp_type, *tmp_value, *tmp_tb;
37757     #if CYTHON_USE_EXC_INFO_STACK
37758     _PyErr_StackItem *exc_info = tstate->exc_info;
37759     tmp_type = exc_info->exc_type;
37760     tmp_value = exc_info->exc_value;
37761     tmp_tb = exc_info->exc_traceback;
37762     exc_info->exc_type = *type;
37763     exc_info->exc_value = *value;
37764     exc_info->exc_traceback = *tb;
37765     #else
37766     tmp_type = tstate->exc_type;
37767     tmp_value = tstate->exc_value;
37768     tmp_tb = tstate->exc_traceback;
37769     tstate->exc_type = *type;
37770     tstate->exc_value = *value;
37771     tstate->exc_traceback = *tb;
37772     #endif
37773     *type = tmp_type;
37774     *value = tmp_value;
37775     *tb = tmp_tb;
37776 }
37777 #else
37778 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
37779     PyObject *tmp_type, *tmp_value, *tmp_tb;
37780     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
37781     PyErr_SetExcInfo(*type, *value, *tb);
37782     *type = tmp_type;
37783     *value = tmp_value;
37784     *tb = tmp_tb;
37785 }
37786 #endif
37787 
37788 /* FastTypeChecks */
37789     #if CYTHON_COMPILING_IN_CPYTHON
37790 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
37791     while (a) {
37792         a = a->tp_base;
37793         if (a == b)
37794             return 1;
37795     }
37796     return b == &PyBaseObject_Type;
37797 }
37798 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
37799     PyObject *mro;
37800     if (a == b) return 1;
37801     mro = a->tp_mro;
37802     if (likely(mro)) {
37803         Py_ssize_t i, n;
37804         n = PyTuple_GET_SIZE(mro);
37805         for (i = 0; i < n; i++) {
37806             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
37807                 return 1;
37808         }
37809         return 0;
37810     }
37811     return __Pyx_InBases(a, b);
37812 }
37813 #if PY_MAJOR_VERSION == 2
37814 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
37815     PyObject *exception, *value, *tb;
37816     int res;
37817     __Pyx_PyThreadState_declare
37818     __Pyx_PyThreadState_assign
37819     __Pyx_ErrFetch(&exception, &value, &tb);
37820     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
37821     if (unlikely(res == -1)) {
37822         PyErr_WriteUnraisable(err);
37823         res = 0;
37824     }
37825     if (!res) {
37826         res = PyObject_IsSubclass(err, exc_type2);
37827         if (unlikely(res == -1)) {
37828             PyErr_WriteUnraisable(err);
37829             res = 0;
37830         }
37831     }
37832     __Pyx_ErrRestore(exception, value, tb);
37833     return res;
37834 }
37835 #else
37836 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
37837     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
37838     if (!res) {
37839         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
37840     }
37841     return res;
37842 }
37843 #endif
37844 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
37845     Py_ssize_t i, n;
37846     assert(PyExceptionClass_Check(exc_type));
37847     n = PyTuple_GET_SIZE(tuple);
37848 #if PY_MAJOR_VERSION >= 3
37849     for (i=0; i<n; i++) {
37850         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
37851     }
37852 #endif
37853     for (i=0; i<n; i++) {
37854         PyObject *t = PyTuple_GET_ITEM(tuple, i);
37855         #if PY_MAJOR_VERSION < 3
37856         if (likely(exc_type == t)) return 1;
37857         #endif
37858         if (likely(PyExceptionClass_Check(t))) {
37859             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
37860         } else {
37861         }
37862     }
37863     return 0;
37864 }
37865 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
37866     if (likely(err == exc_type)) return 1;
37867     if (likely(PyExceptionClass_Check(err))) {
37868         if (likely(PyExceptionClass_Check(exc_type))) {
37869             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
37870         } else if (likely(PyTuple_Check(exc_type))) {
37871             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
37872         } else {
37873         }
37874     }
37875     return PyErr_GivenExceptionMatches(err, exc_type);
37876 }
37877 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
37878     assert(PyExceptionClass_Check(exc_type1));
37879     assert(PyExceptionClass_Check(exc_type2));
37880     if (likely(err == exc_type1 || err == exc_type2)) return 1;
37881     if (likely(PyExceptionClass_Check(err))) {
37882         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
37883     }
37884     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
37885 }
37886 #endif
37887 
37888 /* PyIntBinop */
37889     #if !CYTHON_COMPILING_IN_PYPY
37890 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
37891     (void)inplace;
37892     (void)zerodivision_check;
37893     #if PY_MAJOR_VERSION < 3
37894     if (likely(PyInt_CheckExact(op1))) {
37895         const long b = intval;
37896         long x;
37897         long a = PyInt_AS_LONG(op1);
37898             x = (long)((unsigned long)a + b);
37899             if (likely((x^a) >= 0 || (x^b) >= 0))
37900                 return PyInt_FromLong(x);
37901             return PyLong_Type.tp_as_number->nb_add(op1, op2);
37902     }
37903     #endif
37904     #if CYTHON_USE_PYLONG_INTERNALS
37905     if (likely(PyLong_CheckExact(op1))) {
37906         const long b = intval;
37907         long a, x;
37908 #ifdef HAVE_LONG_LONG
37909         const PY_LONG_LONG llb = intval;
37910         PY_LONG_LONG lla, llx;
37911 #endif
37912         const digit* digits = ((PyLongObject*)op1)->ob_digit;
37913         const Py_ssize_t size = Py_SIZE(op1);
37914         if (likely(__Pyx_sst_abs(size) <= 1)) {
37915             a = likely(size) ? digits[0] : 0;
37916             if (size == -1) a = -a;
37917         } else {
37918             switch (size) {
37919                 case -2:
37920                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37921                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37922                         break;
37923 #ifdef HAVE_LONG_LONG
37924                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37925                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37926                         goto long_long;
37927 #endif
37928                     }
37929                     CYTHON_FALLTHROUGH;
37930                 case 2:
37931                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37932                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37933                         break;
37934 #ifdef HAVE_LONG_LONG
37935                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37936                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37937                         goto long_long;
37938 #endif
37939                     }
37940                     CYTHON_FALLTHROUGH;
37941                 case -3:
37942                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
37943                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37944                         break;
37945 #ifdef HAVE_LONG_LONG
37946                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
37947                         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]));
37948                         goto long_long;
37949 #endif
37950                     }
37951                     CYTHON_FALLTHROUGH;
37952                 case 3:
37953                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
37954                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37955                         break;
37956 #ifdef HAVE_LONG_LONG
37957                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
37958                         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]));
37959                         goto long_long;
37960 #endif
37961                     }
37962                     CYTHON_FALLTHROUGH;
37963                 case -4:
37964                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
37965                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37966                         break;
37967 #ifdef HAVE_LONG_LONG
37968                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
37969                         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]));
37970                         goto long_long;
37971 #endif
37972                     }
37973                     CYTHON_FALLTHROUGH;
37974                 case 4:
37975                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
37976                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37977                         break;
37978 #ifdef HAVE_LONG_LONG
37979                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
37980                         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]));
37981                         goto long_long;
37982 #endif
37983                     }
37984                     CYTHON_FALLTHROUGH;
37985                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
37986             }
37987         }
37988                 x = a + b;
37989             return PyLong_FromLong(x);
37990 #ifdef HAVE_LONG_LONG
37991         long_long:
37992                 llx = lla + llb;
37993             return PyLong_FromLongLong(llx);
37994 #endif
37995 
37996 
37997     }
37998     #endif
37999     if (PyFloat_CheckExact(op1)) {
38000         const long b = intval;
38001         double a = PyFloat_AS_DOUBLE(op1);
38002             double result;
38003             PyFPE_START_PROTECT("add", return NULL)
38004             result = ((double)a) + (double)b;
38005             PyFPE_END_PROTECT(result)
38006             return PyFloat_FromDouble(result);
38007     }
38008     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
38009 }
38010 #endif
38011 
38012 /* None */
38013     static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
38014     long q = a / b;
38015     long r = a - q*b;
38016     q -= ((r != 0) & ((r ^ b) < 0));
38017     return q;
38018 }
38019 
38020 /* PyObject_GenericGetAttrNoDict */
38021     #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
38022 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
38023     PyErr_Format(PyExc_AttributeError,
38024 #if PY_MAJOR_VERSION >= 3
38025                  "'%.50s' object has no attribute '%U'",
38026                  tp->tp_name, attr_name);
38027 #else
38028                  "'%.50s' object has no attribute '%.400s'",
38029                  tp->tp_name, PyString_AS_STRING(attr_name));
38030 #endif
38031     return NULL;
38032 }
38033 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
38034     PyObject *descr;
38035     PyTypeObject *tp = Py_TYPE(obj);
38036     if (unlikely(!PyString_Check(attr_name))) {
38037         return PyObject_GenericGetAttr(obj, attr_name);
38038     }
38039     assert(!tp->tp_dictoffset);
38040     descr = _PyType_Lookup(tp, attr_name);
38041     if (unlikely(!descr)) {
38042         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
38043     }
38044     Py_INCREF(descr);
38045     #if PY_MAJOR_VERSION < 3
38046     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
38047     #endif
38048     {
38049         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
38050         if (unlikely(f)) {
38051             PyObject *res = f(descr, obj, (PyObject *)tp);
38052             Py_DECREF(descr);
38053             return res;
38054         }
38055     }
38056     return descr;
38057 }
38058 #endif
38059 
38060 /* PyObject_GenericGetAttr */
38061     #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
38062 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
38063     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
38064         return PyObject_GenericGetAttr(obj, attr_name);
38065     }
38066     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
38067 }
38068 #endif
38069 
38070 /* SetVTable */
38071     static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
38072 #if PY_VERSION_HEX >= 0x02070000
38073     PyObject *ob = PyCapsule_New(vtable, 0, 0);
38074 #else
38075     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
38076 #endif
38077     if (!ob)
38078         goto bad;
38079     if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
38080         goto bad;
38081     Py_DECREF(ob);
38082     return 0;
38083 bad:
38084     Py_XDECREF(ob);
38085     return -1;
38086 }
38087 
38088 /* SetupReduce */
38089     static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
38090   int ret;
38091   PyObject *name_attr;
38092   name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
38093   if (likely(name_attr)) {
38094       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
38095   } else {
38096       ret = -1;
38097   }
38098   if (unlikely(ret < 0)) {
38099       PyErr_Clear();
38100       ret = 0;
38101   }
38102   Py_XDECREF(name_attr);
38103   return ret;
38104 }
38105 static int __Pyx_setup_reduce(PyObject* type_obj) {
38106     int ret = 0;
38107     PyObject *object_reduce = NULL;
38108     PyObject *object_reduce_ex = NULL;
38109     PyObject *reduce = NULL;
38110     PyObject *reduce_ex = NULL;
38111     PyObject *reduce_cython = NULL;
38112     PyObject *setstate = NULL;
38113     PyObject *setstate_cython = NULL;
38114 #if CYTHON_USE_PYTYPE_LOOKUP
38115     if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
38116 #else
38117     if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
38118 #endif
38119 #if CYTHON_USE_PYTYPE_LOOKUP
38120     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
38121 #else
38122     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
38123 #endif
38124     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
38125     if (reduce_ex == object_reduce_ex) {
38126 #if CYTHON_USE_PYTYPE_LOOKUP
38127         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
38128 #else
38129         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
38130 #endif
38131         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
38132         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
38133             reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
38134             ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
38135             ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
38136             setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
38137             if (!setstate) PyErr_Clear();
38138             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
38139                 setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
38140                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
38141                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
38142             }
38143             PyType_Modified((PyTypeObject*)type_obj);
38144         }
38145     }
38146     goto GOOD;
38147 BAD:
38148     if (!PyErr_Occurred())
38149         PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
38150     ret = -1;
38151 GOOD:
38152 #if !CYTHON_USE_PYTYPE_LOOKUP
38153     Py_XDECREF(object_reduce);
38154     Py_XDECREF(object_reduce_ex);
38155 #endif
38156     Py_XDECREF(reduce);
38157     Py_XDECREF(reduce_ex);
38158     Py_XDECREF(reduce_cython);
38159     Py_XDECREF(setstate);
38160     Py_XDECREF(setstate_cython);
38161     return ret;
38162 }
38163 
38164 /* TypeImport */
38165     #ifndef __PYX_HAVE_RT_ImportType
38166 #define __PYX_HAVE_RT_ImportType
38167 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
38168     size_t size, enum __Pyx_ImportType_CheckSize check_size)
38169 {
38170     PyObject *result = 0;
38171     char warning[200];
38172     Py_ssize_t basicsize;
38173 #ifdef Py_LIMITED_API
38174     PyObject *py_basicsize;
38175 #endif
38176     result = PyObject_GetAttrString(module, class_name);
38177     if (!result)
38178         goto bad;
38179     if (!PyType_Check(result)) {
38180         PyErr_Format(PyExc_TypeError,
38181             "%.200s.%.200s is not a type object",
38182             module_name, class_name);
38183         goto bad;
38184     }
38185 #ifndef Py_LIMITED_API
38186     basicsize = ((PyTypeObject *)result)->tp_basicsize;
38187 #else
38188     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
38189     if (!py_basicsize)
38190         goto bad;
38191     basicsize = PyLong_AsSsize_t(py_basicsize);
38192     Py_DECREF(py_basicsize);
38193     py_basicsize = 0;
38194     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
38195         goto bad;
38196 #endif
38197     if ((size_t)basicsize < size) {
38198         PyErr_Format(PyExc_ValueError,
38199             "%.200s.%.200s size changed, may indicate binary incompatibility. "
38200             "Expected %zd from C header, got %zd from PyObject",
38201             module_name, class_name, size, basicsize);
38202         goto bad;
38203     }
38204     if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
38205         PyErr_Format(PyExc_ValueError,
38206             "%.200s.%.200s size changed, may indicate binary incompatibility. "
38207             "Expected %zd from C header, got %zd from PyObject",
38208             module_name, class_name, size, basicsize);
38209         goto bad;
38210     }
38211     else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
38212         PyOS_snprintf(warning, sizeof(warning),
38213             "%s.%s size changed, may indicate binary incompatibility. "
38214             "Expected %zd from C header, got %zd from PyObject",
38215             module_name, class_name, size, basicsize);
38216         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
38217     }
38218     return (PyTypeObject *)result;
38219 bad:
38220     Py_XDECREF(result);
38221     return NULL;
38222 }
38223 #endif
38224 
38225 /* GetVTable */
38226     static void* __Pyx_GetVtable(PyObject *dict) {
38227     void* ptr;
38228     PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
38229     if (!ob)
38230         goto bad;
38231 #if PY_VERSION_HEX >= 0x02070000
38232     ptr = PyCapsule_GetPointer(ob, 0);
38233 #else
38234     ptr = PyCObject_AsVoidPtr(ob);
38235 #endif
38236     if (!ptr && !PyErr_Occurred())
38237         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
38238     Py_DECREF(ob);
38239     return ptr;
38240 bad:
38241     Py_XDECREF(ob);
38242     return NULL;
38243 }
38244 
38245 /* CLineInTraceback */
38246     #ifndef CYTHON_CLINE_IN_TRACEBACK
38247 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
38248     PyObject *use_cline;
38249     PyObject *ptype, *pvalue, *ptraceback;
38250 #if CYTHON_COMPILING_IN_CPYTHON
38251     PyObject **cython_runtime_dict;
38252 #endif
38253     if (unlikely(!__pyx_cython_runtime)) {
38254         return c_line;
38255     }
38256     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
38257 #if CYTHON_COMPILING_IN_CPYTHON
38258     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
38259     if (likely(cython_runtime_dict)) {
38260         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
38261             use_cline, *cython_runtime_dict,
38262             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
38263     } else
38264 #endif
38265     {
38266       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
38267       if (use_cline_obj) {
38268         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
38269         Py_DECREF(use_cline_obj);
38270       } else {
38271         PyErr_Clear();
38272         use_cline = NULL;
38273       }
38274     }
38275     if (!use_cline) {
38276         c_line = 0;
38277         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
38278     }
38279     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
38280         c_line = 0;
38281     }
38282     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
38283     return c_line;
38284 }
38285 #endif
38286 
38287 /* CodeObjectCache */
38288     static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
38289     int start = 0, mid = 0, end = count - 1;
38290     if (end >= 0 && code_line > entries[end].code_line) {
38291         return count;
38292     }
38293     while (start < end) {
38294         mid = start + (end - start) / 2;
38295         if (code_line < entries[mid].code_line) {
38296             end = mid;
38297         } else if (code_line > entries[mid].code_line) {
38298              start = mid + 1;
38299         } else {
38300             return mid;
38301         }
38302     }
38303     if (code_line <= entries[mid].code_line) {
38304         return mid;
38305     } else {
38306         return mid + 1;
38307     }
38308 }
38309 static PyCodeObject *__pyx_find_code_object(int code_line) {
38310     PyCodeObject* code_object;
38311     int pos;
38312     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
38313         return NULL;
38314     }
38315     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
38316     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
38317         return NULL;
38318     }
38319     code_object = __pyx_code_cache.entries[pos].code_object;
38320     Py_INCREF(code_object);
38321     return code_object;
38322 }
38323 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
38324     int pos, i;
38325     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
38326     if (unlikely(!code_line)) {
38327         return;
38328     }
38329     if (unlikely(!entries)) {
38330         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
38331         if (likely(entries)) {
38332             __pyx_code_cache.entries = entries;
38333             __pyx_code_cache.max_count = 64;
38334             __pyx_code_cache.count = 1;
38335             entries[0].code_line = code_line;
38336             entries[0].code_object = code_object;
38337             Py_INCREF(code_object);
38338         }
38339         return;
38340     }
38341     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
38342     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
38343         PyCodeObject* tmp = entries[pos].code_object;
38344         entries[pos].code_object = code_object;
38345         Py_DECREF(tmp);
38346         return;
38347     }
38348     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
38349         int new_max = __pyx_code_cache.max_count + 64;
38350         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
38351             __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
38352         if (unlikely(!entries)) {
38353             return;
38354         }
38355         __pyx_code_cache.entries = entries;
38356         __pyx_code_cache.max_count = new_max;
38357     }
38358     for (i=__pyx_code_cache.count; i>pos; i--) {
38359         entries[i] = entries[i-1];
38360     }
38361     entries[pos].code_line = code_line;
38362     entries[pos].code_object = code_object;
38363     __pyx_code_cache.count++;
38364     Py_INCREF(code_object);
38365 }
38366 
38367 /* AddTraceback */
38368     #include "compile.h"
38369 #include "frameobject.h"
38370 #include "traceback.h"
38371 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
38372             const char *funcname, int c_line,
38373             int py_line, const char *filename) {
38374     PyCodeObject *py_code = 0;
38375     PyObject *py_srcfile = 0;
38376     PyObject *py_funcname = 0;
38377     #if PY_MAJOR_VERSION < 3
38378     py_srcfile = PyString_FromString(filename);
38379     #else
38380     py_srcfile = PyUnicode_FromString(filename);
38381     #endif
38382     if (!py_srcfile) goto bad;
38383     if (c_line) {
38384         #if PY_MAJOR_VERSION < 3
38385         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
38386         #else
38387         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
38388         #endif
38389     }
38390     else {
38391         #if PY_MAJOR_VERSION < 3
38392         py_funcname = PyString_FromString(funcname);
38393         #else
38394         py_funcname = PyUnicode_FromString(funcname);
38395         #endif
38396     }
38397     if (!py_funcname) goto bad;
38398     py_code = __Pyx_PyCode_New(
38399         0,
38400         0,
38401         0,
38402         0,
38403         0,
38404         __pyx_empty_bytes, /*PyObject *code,*/
38405         __pyx_empty_tuple, /*PyObject *consts,*/
38406         __pyx_empty_tuple, /*PyObject *names,*/
38407         __pyx_empty_tuple, /*PyObject *varnames,*/
38408         __pyx_empty_tuple, /*PyObject *freevars,*/
38409         __pyx_empty_tuple, /*PyObject *cellvars,*/
38410         py_srcfile,   /*PyObject *filename,*/
38411         py_funcname,  /*PyObject *name,*/
38412         py_line,
38413         __pyx_empty_bytes  /*PyObject *lnotab*/
38414     );
38415     Py_DECREF(py_srcfile);
38416     Py_DECREF(py_funcname);
38417     return py_code;
38418 bad:
38419     Py_XDECREF(py_srcfile);
38420     Py_XDECREF(py_funcname);
38421     return NULL;
38422 }
38423 static void __Pyx_AddTraceback(const char *funcname, int c_line,
38424                                int py_line, const char *filename) {
38425     PyCodeObject *py_code = 0;
38426     PyFrameObject *py_frame = 0;
38427     PyThreadState *tstate = __Pyx_PyThreadState_Current;
38428     if (c_line) {
38429         c_line = __Pyx_CLineForTraceback(tstate, c_line);
38430     }
38431     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
38432     if (!py_code) {
38433         py_code = __Pyx_CreateCodeObjectForTraceback(
38434             funcname, c_line, py_line, filename);
38435         if (!py_code) goto bad;
38436         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
38437     }
38438     py_frame = PyFrame_New(
38439         tstate,            /*PyThreadState *tstate,*/
38440         py_code,           /*PyCodeObject *code,*/
38441         __pyx_d,    /*PyObject *globals,*/
38442         0                  /*PyObject *locals*/
38443     );
38444     if (!py_frame) goto bad;
38445     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
38446     PyTraceBack_Here(py_frame);
38447 bad:
38448     Py_XDECREF(py_code);
38449     Py_XDECREF(py_frame);
38450 }
38451 
38452 #if PY_MAJOR_VERSION < 3
38453 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
38454     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
38455         if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
38456         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
38457         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
38458     PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
38459     return -1;
38460 }
38461 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
38462     PyObject *obj = view->obj;
38463     if (!obj) return;
38464     if (PyObject_CheckBuffer(obj)) {
38465         PyBuffer_Release(view);
38466         return;
38467     }
38468     if ((0)) {}
38469         else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
38470     view->obj = NULL;
38471     Py_DECREF(obj);
38472 }
38473 #endif
38474 
38475 
38476     /* MemviewSliceIsContig */
38477     static int
38478 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
38479 {
38480     int i, index, step, start;
38481     Py_ssize_t itemsize = mvs.memview->view.itemsize;
38482     if (order == 'F') {
38483         step = 1;
38484         start = 0;
38485     } else {
38486         step = -1;
38487         start = ndim - 1;
38488     }
38489     for (i = 0; i < ndim; i++) {
38490         index = start + step * i;
38491         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
38492             return 0;
38493         itemsize *= mvs.shape[index];
38494     }
38495     return 1;
38496 }
38497 
38498 /* OverlappingSlices */
38499     static void
38500 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
38501                                void **out_start, void **out_end,
38502                                int ndim, size_t itemsize)
38503 {
38504     char *start, *end;
38505     int i;
38506     start = end = slice->data;
38507     for (i = 0; i < ndim; i++) {
38508         Py_ssize_t stride = slice->strides[i];
38509         Py_ssize_t extent = slice->shape[i];
38510         if (extent == 0) {
38511             *out_start = *out_end = start;
38512             return;
38513         } else {
38514             if (stride > 0)
38515                 end += stride * (extent - 1);
38516             else
38517                 start += stride * (extent - 1);
38518         }
38519     }
38520     *out_start = start;
38521     *out_end = end + itemsize;
38522 }
38523 static int
38524 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
38525                      __Pyx_memviewslice *slice2,
38526                      int ndim, size_t itemsize)
38527 {
38528     void *start1, *end1, *start2, *end2;
38529     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
38530     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
38531     return (start1 < end2) && (start2 < end1);
38532 }
38533 
38534 /* Capsule */
38535     static CYTHON_INLINE PyObject *
38536 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
38537 {
38538     PyObject *cobj;
38539 #if PY_VERSION_HEX >= 0x02070000
38540     cobj = PyCapsule_New(p, sig, NULL);
38541 #else
38542     cobj = PyCObject_FromVoidPtr(p, NULL);
38543 #endif
38544     return cobj;
38545 }
38546 
38547 /* CIntFromPyVerify */
38548     #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
38549     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
38550 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
38551     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
38552 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
38553     {\
38554         func_type value = func_value;\
38555         if (sizeof(target_type) < sizeof(func_type)) {\
38556             if (unlikely(value != (func_type) (target_type) value)) {\
38557                 func_type zero = 0;\
38558                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
38559                     return (target_type) -1;\
38560                 if (is_unsigned && unlikely(value < zero))\
38561                     goto raise_neg_overflow;\
38562                 else\
38563                     goto raise_overflow;\
38564             }\
38565         }\
38566         return (target_type) value;\
38567     }
38568 
38569 /* CIntToPy */
38570     static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
38571     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
38572     const int is_unsigned = neg_one > const_zero;
38573     if (is_unsigned) {
38574         if (sizeof(int) < sizeof(long)) {
38575             return PyInt_FromLong((long) value);
38576         } else if (sizeof(int) <= sizeof(unsigned long)) {
38577             return PyLong_FromUnsignedLong((unsigned long) value);
38578 #ifdef HAVE_LONG_LONG
38579         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
38580             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
38581 #endif
38582         }
38583     } else {
38584         if (sizeof(int) <= sizeof(long)) {
38585             return PyInt_FromLong((long) value);
38586 #ifdef HAVE_LONG_LONG
38587         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
38588             return PyLong_FromLongLong((PY_LONG_LONG) value);
38589 #endif
38590         }
38591     }
38592     {
38593         int one = 1; int little = (int)*(unsigned char *)&one;
38594         unsigned char *bytes = (unsigned char *)&value;
38595         return _PyLong_FromByteArray(bytes, sizeof(int),
38596                                      little, !is_unsigned);
38597     }
38598 }
38599 
38600 /* CIntToPy */
38601     static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) {
38602     const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0;
38603     const int is_unsigned = neg_one > const_zero;
38604     if (is_unsigned) {
38605         if (sizeof(Py_intptr_t) < sizeof(long)) {
38606             return PyInt_FromLong((long) value);
38607         } else if (sizeof(Py_intptr_t) <= sizeof(unsigned long)) {
38608             return PyLong_FromUnsignedLong((unsigned long) value);
38609 #ifdef HAVE_LONG_LONG
38610         } else if (sizeof(Py_intptr_t) <= sizeof(unsigned PY_LONG_LONG)) {
38611             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
38612 #endif
38613         }
38614     } else {
38615         if (sizeof(Py_intptr_t) <= sizeof(long)) {
38616             return PyInt_FromLong((long) value);
38617 #ifdef HAVE_LONG_LONG
38618         } else if (sizeof(Py_intptr_t) <= sizeof(PY_LONG_LONG)) {
38619             return PyLong_FromLongLong((PY_LONG_LONG) value);
38620 #endif
38621         }
38622     }
38623     {
38624         int one = 1; int little = (int)*(unsigned char *)&one;
38625         unsigned char *bytes = (unsigned char *)&value;
38626         return _PyLong_FromByteArray(bytes, sizeof(Py_intptr_t),
38627                                      little, !is_unsigned);
38628     }
38629 }
38630 
38631 /* CIntToPy */
38632     static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) {
38633     const npy_int64 neg_one = (npy_int64) ((npy_int64) 0 - (npy_int64) 1), const_zero = (npy_int64) 0;
38634     const int is_unsigned = neg_one > const_zero;
38635     if (is_unsigned) {
38636         if (sizeof(npy_int64) < sizeof(long)) {
38637             return PyInt_FromLong((long) value);
38638         } else if (sizeof(npy_int64) <= sizeof(unsigned long)) {
38639             return PyLong_FromUnsignedLong((unsigned long) value);
38640 #ifdef HAVE_LONG_LONG
38641         } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
38642             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
38643 #endif
38644         }
38645     } else {
38646         if (sizeof(npy_int64) <= sizeof(long)) {
38647             return PyInt_FromLong((long) value);
38648 #ifdef HAVE_LONG_LONG
38649         } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
38650             return PyLong_FromLongLong((PY_LONG_LONG) value);
38651 #endif
38652         }
38653     }
38654     {
38655         int one = 1; int little = (int)*(unsigned char *)&one;
38656         unsigned char *bytes = (unsigned char *)&value;
38657         return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
38658                                      little, !is_unsigned);
38659     }
38660 }
38661 
38662 /* MemviewDtypeToObject */
38663     static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int64_t(const char *itemp) {
38664     return (PyObject *) __Pyx_PyInt_From_npy_int64(*(__pyx_t_5numpy_int64_t *) itemp);
38665 }
38666 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int64_t(const char *itemp, PyObject *obj) {
38667     __pyx_t_5numpy_int64_t value = __Pyx_PyInt_As_npy_int64(obj);
38668     if ((value == ((npy_int64)-1)) && PyErr_Occurred())
38669         return 0;
38670     *(__pyx_t_5numpy_int64_t *) itemp = value;
38671     return 1;
38672 }
38673 
38674 /* MemviewDtypeToObject */
38675     static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_float64_t(const char *itemp) {
38676     return (PyObject *) PyFloat_FromDouble(*(__pyx_t_5numpy_float64_t *) itemp);
38677 }
38678 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_float64_t(const char *itemp, PyObject *obj) {
38679     __pyx_t_5numpy_float64_t value = __pyx_PyFloat_AsDouble(obj);
38680     if ((value == ((npy_float64)-1)) && PyErr_Occurred())
38681         return 0;
38682     *(__pyx_t_5numpy_float64_t *) itemp = value;
38683     return 1;
38684 }
38685 
38686 /* Declarations */
38687     #if CYTHON_CCOMPLEX
38688   #ifdef __cplusplus
38689     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
38690       return ::std::complex< float >(x, y);
38691     }
38692   #else
38693     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
38694       return x + y*(__pyx_t_float_complex)_Complex_I;
38695     }
38696   #endif
38697 #else
38698     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
38699       __pyx_t_float_complex z;
38700       z.real = x;
38701       z.imag = y;
38702       return z;
38703     }
38704 #endif
38705 
38706 /* Arithmetic */
38707     #if CYTHON_CCOMPLEX
38708 #else
38709     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38710        return (a.real == b.real) && (a.imag == b.imag);
38711     }
38712     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38713         __pyx_t_float_complex z;
38714         z.real = a.real + b.real;
38715         z.imag = a.imag + b.imag;
38716         return z;
38717     }
38718     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38719         __pyx_t_float_complex z;
38720         z.real = a.real - b.real;
38721         z.imag = a.imag - b.imag;
38722         return z;
38723     }
38724     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38725         __pyx_t_float_complex z;
38726         z.real = a.real * b.real - a.imag * b.imag;
38727         z.imag = a.real * b.imag + a.imag * b.real;
38728         return z;
38729     }
38730     #if 1
38731     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38732         if (b.imag == 0) {
38733             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
38734         } else if (fabsf(b.real) >= fabsf(b.imag)) {
38735             if (b.real == 0 && b.imag == 0) {
38736                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
38737             } else {
38738                 float r = b.imag / b.real;
38739                 float s = (float)(1.0) / (b.real + b.imag * r);
38740                 return __pyx_t_float_complex_from_parts(
38741                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
38742             }
38743         } else {
38744             float r = b.real / b.imag;
38745             float s = (float)(1.0) / (b.imag + b.real * r);
38746             return __pyx_t_float_complex_from_parts(
38747                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
38748         }
38749     }
38750     #else
38751     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38752         if (b.imag == 0) {
38753             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
38754         } else {
38755             float denom = b.real * b.real + b.imag * b.imag;
38756             return __pyx_t_float_complex_from_parts(
38757                 (a.real * b.real + a.imag * b.imag) / denom,
38758                 (a.imag * b.real - a.real * b.imag) / denom);
38759         }
38760     }
38761     #endif
38762     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
38763         __pyx_t_float_complex z;
38764         z.real = -a.real;
38765         z.imag = -a.imag;
38766         return z;
38767     }
38768     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
38769        return (a.real == 0) && (a.imag == 0);
38770     }
38771     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
38772         __pyx_t_float_complex z;
38773         z.real =  a.real;
38774         z.imag = -a.imag;
38775         return z;
38776     }
38777     #if 1
38778         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
38779           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
38780             return sqrtf(z.real*z.real + z.imag*z.imag);
38781           #else
38782             return hypotf(z.real, z.imag);
38783           #endif
38784         }
38785         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
38786             __pyx_t_float_complex z;
38787             float r, lnr, theta, z_r, z_theta;
38788             if (b.imag == 0 && b.real == (int)b.real) {
38789                 if (b.real < 0) {
38790                     float denom = a.real * a.real + a.imag * a.imag;
38791                     a.real = a.real / denom;
38792                     a.imag = -a.imag / denom;
38793                     b.real = -b.real;
38794                 }
38795                 switch ((int)b.real) {
38796                     case 0:
38797                         z.real = 1;
38798                         z.imag = 0;
38799                         return z;
38800                     case 1:
38801                         return a;
38802                     case 2:
38803                         z = __Pyx_c_prod_float(a, a);
38804                         return __Pyx_c_prod_float(a, a);
38805                     case 3:
38806                         z = __Pyx_c_prod_float(a, a);
38807                         return __Pyx_c_prod_float(z, a);
38808                     case 4:
38809                         z = __Pyx_c_prod_float(a, a);
38810                         return __Pyx_c_prod_float(z, z);
38811                 }
38812             }
38813             if (a.imag == 0) {
38814                 if (a.real == 0) {
38815                     return a;
38816                 } else if (b.imag == 0) {
38817                     z.real = powf(a.real, b.real);
38818                     z.imag = 0;
38819                     return z;
38820                 } else if (a.real > 0) {
38821                     r = a.real;
38822                     theta = 0;
38823                 } else {
38824                     r = -a.real;
38825                     theta = atan2f(0.0, -1.0);
38826                 }
38827             } else {
38828                 r = __Pyx_c_abs_float(a);
38829                 theta = atan2f(a.imag, a.real);
38830             }
38831             lnr = logf(r);
38832             z_r = expf(lnr * b.real - theta * b.imag);
38833             z_theta = theta * b.real + lnr * b.imag;
38834             z.real = z_r * cosf(z_theta);
38835             z.imag = z_r * sinf(z_theta);
38836             return z;
38837         }
38838     #endif
38839 #endif
38840 
38841 /* Declarations */
38842     #if CYTHON_CCOMPLEX
38843   #ifdef __cplusplus
38844     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
38845       return ::std::complex< double >(x, y);
38846     }
38847   #else
38848     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
38849       return x + y*(__pyx_t_double_complex)_Complex_I;
38850     }
38851   #endif
38852 #else
38853     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
38854       __pyx_t_double_complex z;
38855       z.real = x;
38856       z.imag = y;
38857       return z;
38858     }
38859 #endif
38860 
38861 /* Arithmetic */
38862     #if CYTHON_CCOMPLEX
38863 #else
38864     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38865        return (a.real == b.real) && (a.imag == b.imag);
38866     }
38867     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38868         __pyx_t_double_complex z;
38869         z.real = a.real + b.real;
38870         z.imag = a.imag + b.imag;
38871         return z;
38872     }
38873     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38874         __pyx_t_double_complex z;
38875         z.real = a.real - b.real;
38876         z.imag = a.imag - b.imag;
38877         return z;
38878     }
38879     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38880         __pyx_t_double_complex z;
38881         z.real = a.real * b.real - a.imag * b.imag;
38882         z.imag = a.real * b.imag + a.imag * b.real;
38883         return z;
38884     }
38885     #if 1
38886     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38887         if (b.imag == 0) {
38888             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
38889         } else if (fabs(b.real) >= fabs(b.imag)) {
38890             if (b.real == 0 && b.imag == 0) {
38891                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
38892             } else {
38893                 double r = b.imag / b.real;
38894                 double s = (double)(1.0) / (b.real + b.imag * r);
38895                 return __pyx_t_double_complex_from_parts(
38896                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
38897             }
38898         } else {
38899             double r = b.real / b.imag;
38900             double s = (double)(1.0) / (b.imag + b.real * r);
38901             return __pyx_t_double_complex_from_parts(
38902                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
38903         }
38904     }
38905     #else
38906     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38907         if (b.imag == 0) {
38908             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
38909         } else {
38910             double denom = b.real * b.real + b.imag * b.imag;
38911             return __pyx_t_double_complex_from_parts(
38912                 (a.real * b.real + a.imag * b.imag) / denom,
38913                 (a.imag * b.real - a.real * b.imag) / denom);
38914         }
38915     }
38916     #endif
38917     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
38918         __pyx_t_double_complex z;
38919         z.real = -a.real;
38920         z.imag = -a.imag;
38921         return z;
38922     }
38923     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
38924        return (a.real == 0) && (a.imag == 0);
38925     }
38926     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
38927         __pyx_t_double_complex z;
38928         z.real =  a.real;
38929         z.imag = -a.imag;
38930         return z;
38931     }
38932     #if 1
38933         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
38934           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
38935             return sqrt(z.real*z.real + z.imag*z.imag);
38936           #else
38937             return hypot(z.real, z.imag);
38938           #endif
38939         }
38940         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
38941             __pyx_t_double_complex z;
38942             double r, lnr, theta, z_r, z_theta;
38943             if (b.imag == 0 && b.real == (int)b.real) {
38944                 if (b.real < 0) {
38945                     double denom = a.real * a.real + a.imag * a.imag;
38946                     a.real = a.real / denom;
38947                     a.imag = -a.imag / denom;
38948                     b.real = -b.real;
38949                 }
38950                 switch ((int)b.real) {
38951                     case 0:
38952                         z.real = 1;
38953                         z.imag = 0;
38954                         return z;
38955                     case 1:
38956                         return a;
38957                     case 2:
38958                         z = __Pyx_c_prod_double(a, a);
38959                         return __Pyx_c_prod_double(a, a);
38960                     case 3:
38961                         z = __Pyx_c_prod_double(a, a);
38962                         return __Pyx_c_prod_double(z, a);
38963                     case 4:
38964                         z = __Pyx_c_prod_double(a, a);
38965                         return __Pyx_c_prod_double(z, z);
38966                 }
38967             }
38968             if (a.imag == 0) {
38969                 if (a.real == 0) {
38970                     return a;
38971                 } else if (b.imag == 0) {
38972                     z.real = pow(a.real, b.real);
38973                     z.imag = 0;
38974                     return z;
38975                 } else if (a.real > 0) {
38976                     r = a.real;
38977                     theta = 0;
38978                 } else {
38979                     r = -a.real;
38980                     theta = atan2(0.0, -1.0);
38981                 }
38982             } else {
38983                 r = __Pyx_c_abs_double(a);
38984                 theta = atan2(a.imag, a.real);
38985             }
38986             lnr = log(r);
38987             z_r = exp(lnr * b.real - theta * b.imag);
38988             z_theta = theta * b.real + lnr * b.imag;
38989             z.real = z_r * cos(z_theta);
38990             z.imag = z_r * sin(z_theta);
38991             return z;
38992         }
38993     #endif
38994 #endif
38995 
38996 /* CIntToPy */
38997     static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
38998     const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
38999     const int is_unsigned = neg_one > const_zero;
39000     if (is_unsigned) {
39001         if (sizeof(enum NPY_TYPES) < sizeof(long)) {
39002             return PyInt_FromLong((long) value);
39003         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
39004             return PyLong_FromUnsignedLong((unsigned long) value);
39005 #ifdef HAVE_LONG_LONG
39006         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
39007             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
39008 #endif
39009         }
39010     } else {
39011         if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
39012             return PyInt_FromLong((long) value);
39013 #ifdef HAVE_LONG_LONG
39014         } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
39015             return PyLong_FromLongLong((PY_LONG_LONG) value);
39016 #endif
39017         }
39018     }
39019     {
39020         int one = 1; int little = (int)*(unsigned char *)&one;
39021         unsigned char *bytes = (unsigned char *)&value;
39022         return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
39023                                      little, !is_unsigned);
39024     }
39025 }
39026 
39027 /* MemviewSliceCopyTemplate */
39028     static __Pyx_memviewslice
39029 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
39030                                  const char *mode, int ndim,
39031                                  size_t sizeof_dtype, int contig_flag,
39032                                  int dtype_is_object)
39033 {
39034     __Pyx_RefNannyDeclarations
39035     int i;
39036     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
39037     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
39038     Py_buffer *buf = &from_memview->view;
39039     PyObject *shape_tuple = NULL;
39040     PyObject *temp_int = NULL;
39041     struct __pyx_array_obj *array_obj = NULL;
39042     struct __pyx_memoryview_obj *memview_obj = NULL;
39043     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
39044     for (i = 0; i < ndim; i++) {
39045         if (from_mvs->suboffsets[i] >= 0) {
39046             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
39047                                            "indirect dimensions (axis %d)", i);
39048             goto fail;
39049         }
39050     }
39051     shape_tuple = PyTuple_New(ndim);
39052     if (unlikely(!shape_tuple)) {
39053         goto fail;
39054     }
39055     __Pyx_GOTREF(shape_tuple);
39056     for(i = 0; i < ndim; i++) {
39057         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
39058         if(unlikely(!temp_int)) {
39059             goto fail;
39060         } else {
39061             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
39062             temp_int = NULL;
39063         }
39064     }
39065     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
39066     if (unlikely(!array_obj)) {
39067         goto fail;
39068     }
39069     __Pyx_GOTREF(array_obj);
39070     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
39071                                     (PyObject *) array_obj, contig_flag,
39072                                     dtype_is_object,
39073                                     from_mvs->memview->typeinfo);
39074     if (unlikely(!memview_obj))
39075         goto fail;
39076     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
39077         goto fail;
39078     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
39079                                                 dtype_is_object) < 0))
39080         goto fail;
39081     goto no_fail;
39082 fail:
39083     __Pyx_XDECREF(new_mvs.memview);
39084     new_mvs.memview = NULL;
39085     new_mvs.data = NULL;
39086 no_fail:
39087     __Pyx_XDECREF(shape_tuple);
39088     __Pyx_XDECREF(temp_int);
39089     __Pyx_XDECREF(array_obj);
39090     __Pyx_RefNannyFinishContext();
39091     return new_mvs;
39092 }
39093 
39094 /* CIntFromPy */
39095     static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
39096     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
39097     const int is_unsigned = neg_one > const_zero;
39098 #if PY_MAJOR_VERSION < 3
39099     if (likely(PyInt_Check(x))) {
39100         if (sizeof(int) < sizeof(long)) {
39101             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
39102         } else {
39103             long val = PyInt_AS_LONG(x);
39104             if (is_unsigned && unlikely(val < 0)) {
39105                 goto raise_neg_overflow;
39106             }
39107             return (int) val;
39108         }
39109     } else
39110 #endif
39111     if (likely(PyLong_Check(x))) {
39112         if (is_unsigned) {
39113 #if CYTHON_USE_PYLONG_INTERNALS
39114             const digit* digits = ((PyLongObject*)x)->ob_digit;
39115             switch (Py_SIZE(x)) {
39116                 case  0: return (int) 0;
39117                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
39118                 case 2:
39119                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
39120                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39121                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39122                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
39123                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39124                         }
39125                     }
39126                     break;
39127                 case 3:
39128                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
39129                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39130                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39131                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
39132                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39133                         }
39134                     }
39135                     break;
39136                 case 4:
39137                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
39138                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39139                             __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])))
39140                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
39141                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39142                         }
39143                     }
39144                     break;
39145             }
39146 #endif
39147 #if CYTHON_COMPILING_IN_CPYTHON
39148             if (unlikely(Py_SIZE(x) < 0)) {
39149                 goto raise_neg_overflow;
39150             }
39151 #else
39152             {
39153                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39154                 if (unlikely(result < 0))
39155                     return (int) -1;
39156                 if (unlikely(result == 1))
39157                     goto raise_neg_overflow;
39158             }
39159 #endif
39160             if (sizeof(int) <= sizeof(unsigned long)) {
39161                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
39162 #ifdef HAVE_LONG_LONG
39163             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
39164                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39165 #endif
39166             }
39167         } else {
39168 #if CYTHON_USE_PYLONG_INTERNALS
39169             const digit* digits = ((PyLongObject*)x)->ob_digit;
39170             switch (Py_SIZE(x)) {
39171                 case  0: return (int) 0;
39172                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
39173                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
39174                 case -2:
39175                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
39176                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39177                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39178                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
39179                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39180                         }
39181                     }
39182                     break;
39183                 case 2:
39184                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
39185                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39186                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39187                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
39188                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39189                         }
39190                     }
39191                     break;
39192                 case -3:
39193                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
39194                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39195                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39196                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
39197                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39198                         }
39199                     }
39200                     break;
39201                 case 3:
39202                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
39203                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39204                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39205                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
39206                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39207                         }
39208                     }
39209                     break;
39210                 case -4:
39211                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
39212                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39213                             __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])))
39214                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
39215                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39216                         }
39217                     }
39218                     break;
39219                 case 4:
39220                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
39221                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39222                             __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])))
39223                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
39224                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39225                         }
39226                     }
39227                     break;
39228             }
39229 #endif
39230             if (sizeof(int) <= sizeof(long)) {
39231                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
39232 #ifdef HAVE_LONG_LONG
39233             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
39234                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
39235 #endif
39236             }
39237         }
39238         {
39239 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
39240             PyErr_SetString(PyExc_RuntimeError,
39241                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
39242 #else
39243             int val;
39244             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
39245  #if PY_MAJOR_VERSION < 3
39246             if (likely(v) && !PyLong_Check(v)) {
39247                 PyObject *tmp = v;
39248                 v = PyNumber_Long(tmp);
39249                 Py_DECREF(tmp);
39250             }
39251  #endif
39252             if (likely(v)) {
39253                 int one = 1; int is_little = (int)*(unsigned char *)&one;
39254                 unsigned char *bytes = (unsigned char *)&val;
39255                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
39256                                               bytes, sizeof(val),
39257                                               is_little, !is_unsigned);
39258                 Py_DECREF(v);
39259                 if (likely(!ret))
39260                     return val;
39261             }
39262 #endif
39263             return (int) -1;
39264         }
39265     } else {
39266         int val;
39267         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
39268         if (!tmp) return (int) -1;
39269         val = __Pyx_PyInt_As_int(tmp);
39270         Py_DECREF(tmp);
39271         return val;
39272     }
39273 raise_overflow:
39274     PyErr_SetString(PyExc_OverflowError,
39275         "value too large to convert to int");
39276     return (int) -1;
39277 raise_neg_overflow:
39278     PyErr_SetString(PyExc_OverflowError,
39279         "can't convert negative value to int");
39280     return (int) -1;
39281 }
39282 
39283 /* CIntFromPy */
39284     static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
39285     const npy_int64 neg_one = (npy_int64) ((npy_int64) 0 - (npy_int64) 1), const_zero = (npy_int64) 0;
39286     const int is_unsigned = neg_one > const_zero;
39287 #if PY_MAJOR_VERSION < 3
39288     if (likely(PyInt_Check(x))) {
39289         if (sizeof(npy_int64) < sizeof(long)) {
39290             __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x))
39291         } else {
39292             long val = PyInt_AS_LONG(x);
39293             if (is_unsigned && unlikely(val < 0)) {
39294                 goto raise_neg_overflow;
39295             }
39296             return (npy_int64) val;
39297         }
39298     } else
39299 #endif
39300     if (likely(PyLong_Check(x))) {
39301         if (is_unsigned) {
39302 #if CYTHON_USE_PYLONG_INTERNALS
39303             const digit* digits = ((PyLongObject*)x)->ob_digit;
39304             switch (Py_SIZE(x)) {
39305                 case  0: return (npy_int64) 0;
39306                 case  1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0])
39307                 case 2:
39308                     if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
39309                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39310                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39311                         } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) {
39312                             return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
39313                         }
39314                     }
39315                     break;
39316                 case 3:
39317                     if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
39318                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39319                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39320                         } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) {
39321                             return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
39322                         }
39323                     }
39324                     break;
39325                 case 4:
39326                     if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
39327                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39328                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39329                         } else if (8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT) {
39330                             return (npy_int64) (((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
39331                         }
39332                     }
39333                     break;
39334             }
39335 #endif
39336 #if CYTHON_COMPILING_IN_CPYTHON
39337             if (unlikely(Py_SIZE(x) < 0)) {
39338                 goto raise_neg_overflow;
39339             }
39340 #else
39341             {
39342                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39343                 if (unlikely(result < 0))
39344                     return (npy_int64) -1;
39345                 if (unlikely(result == 1))
39346                     goto raise_neg_overflow;
39347             }
39348 #endif
39349             if (sizeof(npy_int64) <= sizeof(unsigned long)) {
39350                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
39351 #ifdef HAVE_LONG_LONG
39352             } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
39353                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39354 #endif
39355             }
39356         } else {
39357 #if CYTHON_USE_PYLONG_INTERNALS
39358             const digit* digits = ((PyLongObject*)x)->ob_digit;
39359             switch (Py_SIZE(x)) {
39360                 case  0: return (npy_int64) 0;
39361                 case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0]))
39362                 case  1: __PYX_VERIFY_RETURN_INT(npy_int64,  digit, +digits[0])
39363                 case -2:
39364                     if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) {
39365                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39366                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39367                         } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
39368                             return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
39369                         }
39370                     }
39371                     break;
39372                 case 2:
39373                     if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
39374                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39375                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39376                         } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
39377                             return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
39378                         }
39379                     }
39380                     break;
39381                 case -3:
39382                     if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
39383                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39384                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39385                         } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
39386                             return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
39387                         }
39388                     }
39389                     break;
39390                 case 3:
39391                     if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
39392                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39393                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39394                         } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
39395                             return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
39396                         }
39397                     }
39398                     break;
39399                 case -4:
39400                     if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
39401                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39402                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39403                         } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
39404                             return (npy_int64) (((npy_int64)-1)*(((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
39405                         }
39406                     }
39407                     break;
39408                 case 4:
39409                     if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
39410                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39411                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39412                         } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
39413                             return (npy_int64) ((((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
39414                         }
39415                     }
39416                     break;
39417             }
39418 #endif
39419             if (sizeof(npy_int64) <= sizeof(long)) {
39420                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
39421 #ifdef HAVE_LONG_LONG
39422             } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
39423                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
39424 #endif
39425             }
39426         }
39427         {
39428 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
39429             PyErr_SetString(PyExc_RuntimeError,
39430                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
39431 #else
39432             npy_int64 val;
39433             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
39434  #if PY_MAJOR_VERSION < 3
39435             if (likely(v) && !PyLong_Check(v)) {
39436                 PyObject *tmp = v;
39437                 v = PyNumber_Long(tmp);
39438                 Py_DECREF(tmp);
39439             }
39440  #endif
39441             if (likely(v)) {
39442                 int one = 1; int is_little = (int)*(unsigned char *)&one;
39443                 unsigned char *bytes = (unsigned char *)&val;
39444                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
39445                                               bytes, sizeof(val),
39446                                               is_little, !is_unsigned);
39447                 Py_DECREF(v);
39448                 if (likely(!ret))
39449                     return val;
39450             }
39451 #endif
39452             return (npy_int64) -1;
39453         }
39454     } else {
39455         npy_int64 val;
39456         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
39457         if (!tmp) return (npy_int64) -1;
39458         val = __Pyx_PyInt_As_npy_int64(tmp);
39459         Py_DECREF(tmp);
39460         return val;
39461     }
39462 raise_overflow:
39463     PyErr_SetString(PyExc_OverflowError,
39464         "value too large to convert to npy_int64");
39465     return (npy_int64) -1;
39466 raise_neg_overflow:
39467     PyErr_SetString(PyExc_OverflowError,
39468         "can't convert negative value to npy_int64");
39469     return (npy_int64) -1;
39470 }
39471 
39472 /* CIntFromPy */
39473     static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *x) {
39474     const npy_uint64 neg_one = (npy_uint64) ((npy_uint64) 0 - (npy_uint64) 1), const_zero = (npy_uint64) 0;
39475     const int is_unsigned = neg_one > const_zero;
39476 #if PY_MAJOR_VERSION < 3
39477     if (likely(PyInt_Check(x))) {
39478         if (sizeof(npy_uint64) < sizeof(long)) {
39479             __PYX_VERIFY_RETURN_INT(npy_uint64, long, PyInt_AS_LONG(x))
39480         } else {
39481             long val = PyInt_AS_LONG(x);
39482             if (is_unsigned && unlikely(val < 0)) {
39483                 goto raise_neg_overflow;
39484             }
39485             return (npy_uint64) val;
39486         }
39487     } else
39488 #endif
39489     if (likely(PyLong_Check(x))) {
39490         if (is_unsigned) {
39491 #if CYTHON_USE_PYLONG_INTERNALS
39492             const digit* digits = ((PyLongObject*)x)->ob_digit;
39493             switch (Py_SIZE(x)) {
39494                 case  0: return (npy_uint64) 0;
39495                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint64, digit, digits[0])
39496                 case 2:
39497                     if (8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT) {
39498                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39499                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39500                         } else if (8 * sizeof(npy_uint64) >= 2 * PyLong_SHIFT) {
39501                             return (npy_uint64) (((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
39502                         }
39503                     }
39504                     break;
39505                 case 3:
39506                     if (8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT) {
39507                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39508                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39509                         } else if (8 * sizeof(npy_uint64) >= 3 * PyLong_SHIFT) {
39510                             return (npy_uint64) (((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
39511                         }
39512                     }
39513                     break;
39514                 case 4:
39515                     if (8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT) {
39516                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39517                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39518                         } else if (8 * sizeof(npy_uint64) >= 4 * PyLong_SHIFT) {
39519                             return (npy_uint64) (((((((((npy_uint64)digits[3]) << PyLong_SHIFT) | (npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
39520                         }
39521                     }
39522                     break;
39523             }
39524 #endif
39525 #if CYTHON_COMPILING_IN_CPYTHON
39526             if (unlikely(Py_SIZE(x) < 0)) {
39527                 goto raise_neg_overflow;
39528             }
39529 #else
39530             {
39531                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39532                 if (unlikely(result < 0))
39533                     return (npy_uint64) -1;
39534                 if (unlikely(result == 1))
39535                     goto raise_neg_overflow;
39536             }
39537 #endif
39538             if (sizeof(npy_uint64) <= sizeof(unsigned long)) {
39539                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned long, PyLong_AsUnsignedLong(x))
39540 #ifdef HAVE_LONG_LONG
39541             } else if (sizeof(npy_uint64) <= sizeof(unsigned PY_LONG_LONG)) {
39542                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39543 #endif
39544             }
39545         } else {
39546 #if CYTHON_USE_PYLONG_INTERNALS
39547             const digit* digits = ((PyLongObject*)x)->ob_digit;
39548             switch (Py_SIZE(x)) {
39549                 case  0: return (npy_uint64) 0;
39550                 case -1: __PYX_VERIFY_RETURN_INT(npy_uint64, sdigit, (sdigit) (-(sdigit)digits[0]))
39551                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint64,  digit, +digits[0])
39552                 case -2:
39553                     if (8 * sizeof(npy_uint64) - 1 > 1 * PyLong_SHIFT) {
39554                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39555                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39556                         } else if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
39557                             return (npy_uint64) (((npy_uint64)-1)*(((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
39558                         }
39559                     }
39560                     break;
39561                 case 2:
39562                     if (8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT) {
39563                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39564                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39565                         } else if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
39566                             return (npy_uint64) ((((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
39567                         }
39568                     }
39569                     break;
39570                 case -3:
39571                     if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
39572                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39573                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39574                         } else if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
39575                             return (npy_uint64) (((npy_uint64)-1)*(((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
39576                         }
39577                     }
39578                     break;
39579                 case 3:
39580                     if (8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT) {
39581                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39582                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39583                         } else if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
39584                             return (npy_uint64) ((((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
39585                         }
39586                     }
39587                     break;
39588                 case -4:
39589                     if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
39590                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39591                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39592                         } else if (8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT) {
39593                             return (npy_uint64) (((npy_uint64)-1)*(((((((((npy_uint64)digits[3]) << PyLong_SHIFT) | (npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
39594                         }
39595                     }
39596                     break;
39597                 case 4:
39598                     if (8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT) {
39599                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39600                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39601                         } else if (8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT) {
39602                             return (npy_uint64) ((((((((((npy_uint64)digits[3]) << PyLong_SHIFT) | (npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
39603                         }
39604                     }
39605                     break;
39606             }
39607 #endif
39608             if (sizeof(npy_uint64) <= sizeof(long)) {
39609                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, long, PyLong_AsLong(x))
39610 #ifdef HAVE_LONG_LONG
39611             } else if (sizeof(npy_uint64) <= sizeof(PY_LONG_LONG)) {
39612                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, PY_LONG_LONG, PyLong_AsLongLong(x))
39613 #endif
39614             }
39615         }
39616         {
39617 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
39618             PyErr_SetString(PyExc_RuntimeError,
39619                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
39620 #else
39621             npy_uint64 val;
39622             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
39623  #if PY_MAJOR_VERSION < 3
39624             if (likely(v) && !PyLong_Check(v)) {
39625                 PyObject *tmp = v;
39626                 v = PyNumber_Long(tmp);
39627                 Py_DECREF(tmp);
39628             }
39629  #endif
39630             if (likely(v)) {
39631                 int one = 1; int is_little = (int)*(unsigned char *)&one;
39632                 unsigned char *bytes = (unsigned char *)&val;
39633                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
39634                                               bytes, sizeof(val),
39635                                               is_little, !is_unsigned);
39636                 Py_DECREF(v);
39637                 if (likely(!ret))
39638                     return val;
39639             }
39640 #endif
39641             return (npy_uint64) -1;
39642         }
39643     } else {
39644         npy_uint64 val;
39645         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
39646         if (!tmp) return (npy_uint64) -1;
39647         val = __Pyx_PyInt_As_npy_uint64(tmp);
39648         Py_DECREF(tmp);
39649         return val;
39650     }
39651 raise_overflow:
39652     PyErr_SetString(PyExc_OverflowError,
39653         "value too large to convert to npy_uint64");
39654     return (npy_uint64) -1;
39655 raise_neg_overflow:
39656     PyErr_SetString(PyExc_OverflowError,
39657         "can't convert negative value to npy_uint64");
39658     return (npy_uint64) -1;
39659 }
39660 
39661 /* CIntFromPy */
39662     static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) {
39663     const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0;
39664     const int is_unsigned = neg_one > const_zero;
39665 #if PY_MAJOR_VERSION < 3
39666     if (likely(PyInt_Check(x))) {
39667         if (sizeof(npy_uint32) < sizeof(long)) {
39668             __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG(x))
39669         } else {
39670             long val = PyInt_AS_LONG(x);
39671             if (is_unsigned && unlikely(val < 0)) {
39672                 goto raise_neg_overflow;
39673             }
39674             return (npy_uint32) val;
39675         }
39676     } else
39677 #endif
39678     if (likely(PyLong_Check(x))) {
39679         if (is_unsigned) {
39680 #if CYTHON_USE_PYLONG_INTERNALS
39681             const digit* digits = ((PyLongObject*)x)->ob_digit;
39682             switch (Py_SIZE(x)) {
39683                 case  0: return (npy_uint32) 0;
39684                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, digits[0])
39685                 case 2:
39686                     if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) {
39687                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39688                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39689                         } else if (8 * sizeof(npy_uint32) >= 2 * PyLong_SHIFT) {
39690                             return (npy_uint32) (((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
39691                         }
39692                     }
39693                     break;
39694                 case 3:
39695                     if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) {
39696                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39697                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39698                         } else if (8 * sizeof(npy_uint32) >= 3 * PyLong_SHIFT) {
39699                             return (npy_uint32) (((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
39700                         }
39701                     }
39702                     break;
39703                 case 4:
39704                     if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) {
39705                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39706                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39707                         } else if (8 * sizeof(npy_uint32) >= 4 * PyLong_SHIFT) {
39708                             return (npy_uint32) (((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
39709                         }
39710                     }
39711                     break;
39712             }
39713 #endif
39714 #if CYTHON_COMPILING_IN_CPYTHON
39715             if (unlikely(Py_SIZE(x) < 0)) {
39716                 goto raise_neg_overflow;
39717             }
39718 #else
39719             {
39720                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39721                 if (unlikely(result < 0))
39722                     return (npy_uint32) -1;
39723                 if (unlikely(result == 1))
39724                     goto raise_neg_overflow;
39725             }
39726 #endif
39727             if (sizeof(npy_uint32) <= sizeof(unsigned long)) {
39728                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned long, PyLong_AsUnsignedLong(x))
39729 #ifdef HAVE_LONG_LONG
39730             } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) {
39731                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39732 #endif
39733             }
39734         } else {
39735 #if CYTHON_USE_PYLONG_INTERNALS
39736             const digit* digits = ((PyLongObject*)x)->ob_digit;
39737             switch (Py_SIZE(x)) {
39738                 case  0: return (npy_uint32) 0;
39739                 case -1: __PYX_VERIFY_RETURN_INT(npy_uint32, sdigit, (sdigit) (-(sdigit)digits[0]))
39740                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint32,  digit, +digits[0])
39741                 case -2:
39742                     if (8 * sizeof(npy_uint32) - 1 > 1 * PyLong_SHIFT) {
39743                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39744                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39745                         } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
39746                             return (npy_uint32) (((npy_uint32)-1)*(((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
39747                         }
39748                     }
39749                     break;
39750                 case 2:
39751                     if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) {
39752                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39753                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39754                         } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
39755                             return (npy_uint32) ((((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
39756                         }
39757                     }
39758                     break;
39759                 case -3:
39760                     if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
39761                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39762                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39763                         } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
39764                             return (npy_uint32) (((npy_uint32)-1)*(((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
39765                         }
39766                     }
39767                     break;
39768                 case 3:
39769                     if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) {
39770                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39771                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39772                         } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
39773                             return (npy_uint32) ((((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
39774                         }
39775                     }
39776                     break;
39777                 case -4:
39778                     if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
39779                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39780                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39781                         } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) {
39782                             return (npy_uint32) (((npy_uint32)-1)*(((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
39783                         }
39784                     }
39785                     break;
39786                 case 4:
39787                     if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) {
39788                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39789                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39790                         } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) {
39791                             return (npy_uint32) ((((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
39792                         }
39793                     }
39794                     break;
39795             }
39796 #endif
39797             if (sizeof(npy_uint32) <= sizeof(long)) {
39798                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, long, PyLong_AsLong(x))
39799 #ifdef HAVE_LONG_LONG
39800             } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) {
39801                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, PY_LONG_LONG, PyLong_AsLongLong(x))
39802 #endif
39803             }
39804         }
39805         {
39806 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
39807             PyErr_SetString(PyExc_RuntimeError,
39808                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
39809 #else
39810             npy_uint32 val;
39811             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
39812  #if PY_MAJOR_VERSION < 3
39813             if (likely(v) && !PyLong_Check(v)) {
39814                 PyObject *tmp = v;
39815                 v = PyNumber_Long(tmp);
39816                 Py_DECREF(tmp);
39817             }
39818  #endif
39819             if (likely(v)) {
39820                 int one = 1; int is_little = (int)*(unsigned char *)&one;
39821                 unsigned char *bytes = (unsigned char *)&val;
39822                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
39823                                               bytes, sizeof(val),
39824                                               is_little, !is_unsigned);
39825                 Py_DECREF(v);
39826                 if (likely(!ret))
39827                     return val;
39828             }
39829 #endif
39830             return (npy_uint32) -1;
39831         }
39832     } else {
39833         npy_uint32 val;
39834         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
39835         if (!tmp) return (npy_uint32) -1;
39836         val = __Pyx_PyInt_As_npy_uint32(tmp);
39837         Py_DECREF(tmp);
39838         return val;
39839     }
39840 raise_overflow:
39841     PyErr_SetString(PyExc_OverflowError,
39842         "value too large to convert to npy_uint32");
39843     return (npy_uint32) -1;
39844 raise_neg_overflow:
39845     PyErr_SetString(PyExc_OverflowError,
39846         "can't convert negative value to npy_uint32");
39847     return (npy_uint32) -1;
39848 }
39849 
39850 /* CIntFromPy */
39851     static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
39852     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
39853     const int is_unsigned = neg_one > const_zero;
39854 #if PY_MAJOR_VERSION < 3
39855     if (likely(PyInt_Check(x))) {
39856         if (sizeof(long) < sizeof(long)) {
39857             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
39858         } else {
39859             long val = PyInt_AS_LONG(x);
39860             if (is_unsigned && unlikely(val < 0)) {
39861                 goto raise_neg_overflow;
39862             }
39863             return (long) val;
39864         }
39865     } else
39866 #endif
39867     if (likely(PyLong_Check(x))) {
39868         if (is_unsigned) {
39869 #if CYTHON_USE_PYLONG_INTERNALS
39870             const digit* digits = ((PyLongObject*)x)->ob_digit;
39871             switch (Py_SIZE(x)) {
39872                 case  0: return (long) 0;
39873                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
39874                 case 2:
39875                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
39876                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39877                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39878                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
39879                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
39880                         }
39881                     }
39882                     break;
39883                 case 3:
39884                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
39885                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39886                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39887                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
39888                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
39889                         }
39890                     }
39891                     break;
39892                 case 4:
39893                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
39894                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39895                             __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])))
39896                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
39897                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
39898                         }
39899                     }
39900                     break;
39901             }
39902 #endif
39903 #if CYTHON_COMPILING_IN_CPYTHON
39904             if (unlikely(Py_SIZE(x) < 0)) {
39905                 goto raise_neg_overflow;
39906             }
39907 #else
39908             {
39909                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39910                 if (unlikely(result < 0))
39911                     return (long) -1;
39912                 if (unlikely(result == 1))
39913                     goto raise_neg_overflow;
39914             }
39915 #endif
39916             if (sizeof(long) <= sizeof(unsigned long)) {
39917                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
39918 #ifdef HAVE_LONG_LONG
39919             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
39920                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39921 #endif
39922             }
39923         } else {
39924 #if CYTHON_USE_PYLONG_INTERNALS
39925             const digit* digits = ((PyLongObject*)x)->ob_digit;
39926             switch (Py_SIZE(x)) {
39927                 case  0: return (long) 0;
39928                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
39929                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
39930                 case -2:
39931                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
39932                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39933                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39934                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39935                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
39936                         }
39937                     }
39938                     break;
39939                 case 2:
39940                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
39941                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39942                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39943                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39944                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
39945                         }
39946                     }
39947                     break;
39948                 case -3:
39949                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39950                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39951                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39952                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39953                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
39954                         }
39955                     }
39956                     break;
39957                 case 3:
39958                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
39959                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39960                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39961                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39962                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
39963                         }
39964                     }
39965                     break;
39966                 case -4:
39967                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39968                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39969                             __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])))
39970                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39971                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
39972                         }
39973                     }
39974                     break;
39975                 case 4:
39976                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
39977                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39978                             __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])))
39979                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39980                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
39981                         }
39982                     }
39983                     break;
39984             }
39985 #endif
39986             if (sizeof(long) <= sizeof(long)) {
39987                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
39988 #ifdef HAVE_LONG_LONG
39989             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
39990                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
39991 #endif
39992             }
39993         }
39994         {
39995 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
39996             PyErr_SetString(PyExc_RuntimeError,
39997                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
39998 #else
39999             long val;
40000             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40001  #if PY_MAJOR_VERSION < 3
40002             if (likely(v) && !PyLong_Check(v)) {
40003                 PyObject *tmp = v;
40004                 v = PyNumber_Long(tmp);
40005                 Py_DECREF(tmp);
40006             }
40007  #endif
40008             if (likely(v)) {
40009                 int one = 1; int is_little = (int)*(unsigned char *)&one;
40010                 unsigned char *bytes = (unsigned char *)&val;
40011                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
40012                                               bytes, sizeof(val),
40013                                               is_little, !is_unsigned);
40014                 Py_DECREF(v);
40015                 if (likely(!ret))
40016                     return val;
40017             }
40018 #endif
40019             return (long) -1;
40020         }
40021     } else {
40022         long val;
40023         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40024         if (!tmp) return (long) -1;
40025         val = __Pyx_PyInt_As_long(tmp);
40026         Py_DECREF(tmp);
40027         return val;
40028     }
40029 raise_overflow:
40030     PyErr_SetString(PyExc_OverflowError,
40031         "value too large to convert to long");
40032     return (long) -1;
40033 raise_neg_overflow:
40034     PyErr_SetString(PyExc_OverflowError,
40035         "can't convert negative value to long");
40036     return (long) -1;
40037 }
40038 
40039 /* CIntToPy */
40040     static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
40041     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
40042     const int is_unsigned = neg_one > const_zero;
40043     if (is_unsigned) {
40044         if (sizeof(long) < sizeof(long)) {
40045             return PyInt_FromLong((long) value);
40046         } else if (sizeof(long) <= sizeof(unsigned long)) {
40047             return PyLong_FromUnsignedLong((unsigned long) value);
40048 #ifdef HAVE_LONG_LONG
40049         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40050             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40051 #endif
40052         }
40053     } else {
40054         if (sizeof(long) <= sizeof(long)) {
40055             return PyInt_FromLong((long) value);
40056 #ifdef HAVE_LONG_LONG
40057         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40058             return PyLong_FromLongLong((PY_LONG_LONG) value);
40059 #endif
40060         }
40061     }
40062     {
40063         int one = 1; int little = (int)*(unsigned char *)&one;
40064         unsigned char *bytes = (unsigned char *)&value;
40065         return _PyLong_FromByteArray(bytes, sizeof(long),
40066                                      little, !is_unsigned);
40067     }
40068 }
40069 
40070 /* CIntFromPy */
40071     static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
40072     const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
40073     const int is_unsigned = neg_one > const_zero;
40074 #if PY_MAJOR_VERSION < 3
40075     if (likely(PyInt_Check(x))) {
40076         if (sizeof(char) < sizeof(long)) {
40077             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
40078         } else {
40079             long val = PyInt_AS_LONG(x);
40080             if (is_unsigned && unlikely(val < 0)) {
40081                 goto raise_neg_overflow;
40082             }
40083             return (char) val;
40084         }
40085     } else
40086 #endif
40087     if (likely(PyLong_Check(x))) {
40088         if (is_unsigned) {
40089 #if CYTHON_USE_PYLONG_INTERNALS
40090             const digit* digits = ((PyLongObject*)x)->ob_digit;
40091             switch (Py_SIZE(x)) {
40092                 case  0: return (char) 0;
40093                 case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
40094                 case 2:
40095                     if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
40096                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40097                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40098                         } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
40099                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40100                         }
40101                     }
40102                     break;
40103                 case 3:
40104                     if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
40105                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40106                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40107                         } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
40108                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40109                         }
40110                     }
40111                     break;
40112                 case 4:
40113                     if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
40114                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40115                             __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])))
40116                         } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
40117                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40118                         }
40119                     }
40120                     break;
40121             }
40122 #endif
40123 #if CYTHON_COMPILING_IN_CPYTHON
40124             if (unlikely(Py_SIZE(x) < 0)) {
40125                 goto raise_neg_overflow;
40126             }
40127 #else
40128             {
40129                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40130                 if (unlikely(result < 0))
40131                     return (char) -1;
40132                 if (unlikely(result == 1))
40133                     goto raise_neg_overflow;
40134             }
40135 #endif
40136             if (sizeof(char) <= sizeof(unsigned long)) {
40137                 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
40138 #ifdef HAVE_LONG_LONG
40139             } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
40140                 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40141 #endif
40142             }
40143         } else {
40144 #if CYTHON_USE_PYLONG_INTERNALS
40145             const digit* digits = ((PyLongObject*)x)->ob_digit;
40146             switch (Py_SIZE(x)) {
40147                 case  0: return (char) 0;
40148                 case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
40149                 case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
40150                 case -2:
40151                     if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
40152                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40153                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40154                         } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40155                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40156                         }
40157                     }
40158                     break;
40159                 case 2:
40160                     if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
40161                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40162                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40163                         } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40164                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40165                         }
40166                     }
40167                     break;
40168                 case -3:
40169                     if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40170                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40171                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40172                         } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40173                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40174                         }
40175                     }
40176                     break;
40177                 case 3:
40178                     if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
40179                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40180                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40181                         } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40182                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40183                         }
40184                     }
40185                     break;
40186                 case -4:
40187                     if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40188                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40189                             __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])))
40190                         } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
40191                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40192                         }
40193                     }
40194                     break;
40195                 case 4:
40196                     if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
40197                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40198                             __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])))
40199                         } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
40200                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40201                         }
40202                     }
40203                     break;
40204             }
40205 #endif
40206             if (sizeof(char) <= sizeof(long)) {
40207                 __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
40208 #ifdef HAVE_LONG_LONG
40209             } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
40210                 __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
40211 #endif
40212             }
40213         }
40214         {
40215 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40216             PyErr_SetString(PyExc_RuntimeError,
40217                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40218 #else
40219             char val;
40220             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40221  #if PY_MAJOR_VERSION < 3
40222             if (likely(v) && !PyLong_Check(v)) {
40223                 PyObject *tmp = v;
40224                 v = PyNumber_Long(tmp);
40225                 Py_DECREF(tmp);
40226             }
40227  #endif
40228             if (likely(v)) {
40229                 int one = 1; int is_little = (int)*(unsigned char *)&one;
40230                 unsigned char *bytes = (unsigned char *)&val;
40231                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
40232                                               bytes, sizeof(val),
40233                                               is_little, !is_unsigned);
40234                 Py_DECREF(v);
40235                 if (likely(!ret))
40236                     return val;
40237             }
40238 #endif
40239             return (char) -1;
40240         }
40241     } else {
40242         char val;
40243         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40244         if (!tmp) return (char) -1;
40245         val = __Pyx_PyInt_As_char(tmp);
40246         Py_DECREF(tmp);
40247         return val;
40248     }
40249 raise_overflow:
40250     PyErr_SetString(PyExc_OverflowError,
40251         "value too large to convert to char");
40252     return (char) -1;
40253 raise_neg_overflow:
40254     PyErr_SetString(PyExc_OverflowError,
40255         "can't convert negative value to char");
40256     return (char) -1;
40257 }
40258 
40259 /* TypeInfoCompare */
40260     static int
40261 __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
40262 {
40263     int i;
40264     if (!a || !b)
40265         return 0;
40266     if (a == b)
40267         return 1;
40268     if (a->size != b->size || a->typegroup != b->typegroup ||
40269             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
40270         if (a->typegroup == 'H' || b->typegroup == 'H') {
40271             return a->size == b->size;
40272         } else {
40273             return 0;
40274         }
40275     }
40276     if (a->ndim) {
40277         for (i = 0; i < a->ndim; i++)
40278             if (a->arraysize[i] != b->arraysize[i])
40279                 return 0;
40280     }
40281     if (a->typegroup == 'S') {
40282         if (a->flags != b->flags)
40283             return 0;
40284         if (a->fields || b->fields) {
40285             if (!(a->fields && b->fields))
40286                 return 0;
40287             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
40288                 __Pyx_StructField *field_a = a->fields + i;
40289                 __Pyx_StructField *field_b = b->fields + i;
40290                 if (field_a->offset != field_b->offset ||
40291                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
40292                     return 0;
40293             }
40294             return !a->fields[i].type && !b->fields[i].type;
40295         }
40296     }
40297     return 1;
40298 }
40299 
40300 /* MemviewSliceValidateAndInit */
40301     static int
40302 __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
40303 {
40304     if (buf->shape[dim] <= 1)
40305         return 1;
40306     if (buf->strides) {
40307         if (spec & __Pyx_MEMVIEW_CONTIG) {
40308             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
40309                 if (buf->strides[dim] != sizeof(void *)) {
40310                     PyErr_Format(PyExc_ValueError,
40311                                  "Buffer is not indirectly contiguous "
40312                                  "in dimension %d.", dim);
40313                     goto fail;
40314                 }
40315             } else if (buf->strides[dim] != buf->itemsize) {
40316                 PyErr_SetString(PyExc_ValueError,
40317                                 "Buffer and memoryview are not contiguous "
40318                                 "in the same dimension.");
40319                 goto fail;
40320             }
40321         }
40322         if (spec & __Pyx_MEMVIEW_FOLLOW) {
40323             Py_ssize_t stride = buf->strides[dim];
40324             if (stride < 0)
40325                 stride = -stride;
40326             if (stride < buf->itemsize) {
40327                 PyErr_SetString(PyExc_ValueError,
40328                                 "Buffer and memoryview are not contiguous "
40329                                 "in the same dimension.");
40330                 goto fail;
40331             }
40332         }
40333     } else {
40334         if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) {
40335             PyErr_Format(PyExc_ValueError,
40336                          "C-contiguous buffer is not contiguous in "
40337                          "dimension %d", dim);
40338             goto fail;
40339         } else if (spec & (__Pyx_MEMVIEW_PTR)) {
40340             PyErr_Format(PyExc_ValueError,
40341                          "C-contiguous buffer is not indirect in "
40342                          "dimension %d", dim);
40343             goto fail;
40344         } else if (buf->suboffsets) {
40345             PyErr_SetString(PyExc_ValueError,
40346                             "Buffer exposes suboffsets but no strides");
40347             goto fail;
40348         }
40349     }
40350     return 1;
40351 fail:
40352     return 0;
40353 }
40354 static int
40355 __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
40356 {
40357     if (spec & __Pyx_MEMVIEW_DIRECT) {
40358         if (buf->suboffsets && buf->suboffsets[dim] >= 0) {
40359             PyErr_Format(PyExc_ValueError,
40360                          "Buffer not compatible with direct access "
40361                          "in dimension %d.", dim);
40362             goto fail;
40363         }
40364     }
40365     if (spec & __Pyx_MEMVIEW_PTR) {
40366         if (!buf->suboffsets || (buf->suboffsets[dim] < 0)) {
40367             PyErr_Format(PyExc_ValueError,
40368                          "Buffer is not indirectly accessible "
40369                          "in dimension %d.", dim);
40370             goto fail;
40371         }
40372     }
40373     return 1;
40374 fail:
40375     return 0;
40376 }
40377 static int
40378 __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
40379 {
40380     int i;
40381     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
40382         Py_ssize_t stride = 1;
40383         for (i = 0; i < ndim; i++) {
40384             if (stride * buf->itemsize != buf->strides[i] &&
40385                     buf->shape[i] > 1)
40386             {
40387                 PyErr_SetString(PyExc_ValueError,
40388                     "Buffer not fortran contiguous.");
40389                 goto fail;
40390             }
40391             stride = stride * buf->shape[i];
40392         }
40393     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
40394         Py_ssize_t stride = 1;
40395         for (i = ndim - 1; i >- 1; i--) {
40396             if (stride * buf->itemsize != buf->strides[i] &&
40397                     buf->shape[i] > 1) {
40398                 PyErr_SetString(PyExc_ValueError,
40399                     "Buffer not C contiguous.");
40400                 goto fail;
40401             }
40402             stride = stride * buf->shape[i];
40403         }
40404     }
40405     return 1;
40406 fail:
40407     return 0;
40408 }
40409 static int __Pyx_ValidateAndInit_memviewslice(
40410                 int *axes_specs,
40411                 int c_or_f_flag,
40412                 int buf_flags,
40413                 int ndim,
40414                 __Pyx_TypeInfo *dtype,
40415                 __Pyx_BufFmt_StackElem stack[],
40416                 __Pyx_memviewslice *memviewslice,
40417                 PyObject *original_obj)
40418 {
40419     struct __pyx_memoryview_obj *memview, *new_memview;
40420     __Pyx_RefNannyDeclarations
40421     Py_buffer *buf;
40422     int i, spec = 0, retval = -1;
40423     __Pyx_BufFmt_Context ctx;
40424     int from_memoryview = __pyx_memoryview_check(original_obj);
40425     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
40426     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
40427                                                             original_obj)->typeinfo)) {
40428         memview = (struct __pyx_memoryview_obj *) original_obj;
40429         new_memview = NULL;
40430     } else {
40431         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
40432                                             original_obj, buf_flags, 0, dtype);
40433         new_memview = memview;
40434         if (unlikely(!memview))
40435             goto fail;
40436     }
40437     buf = &memview->view;
40438     if (buf->ndim != ndim) {
40439         PyErr_Format(PyExc_ValueError,
40440                 "Buffer has wrong number of dimensions (expected %d, got %d)",
40441                 ndim, buf->ndim);
40442         goto fail;
40443     }
40444     if (new_memview) {
40445         __Pyx_BufFmt_Init(&ctx, stack, dtype);
40446         if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
40447     }
40448     if ((unsigned) buf->itemsize != dtype->size) {
40449         PyErr_Format(PyExc_ValueError,
40450                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
40451                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
40452                      buf->itemsize,
40453                      (buf->itemsize > 1) ? "s" : "",
40454                      dtype->name,
40455                      dtype->size,
40456                      (dtype->size > 1) ? "s" : "");
40457         goto fail;
40458     }
40459     for (i = 0; i < ndim; i++) {
40460         spec = axes_specs[i];
40461         if (!__pyx_check_strides(buf, i, ndim, spec))
40462             goto fail;
40463         if (!__pyx_check_suboffsets(buf, i, ndim, spec))
40464             goto fail;
40465     }
40466     if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))
40467         goto fail;
40468     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
40469                                          new_memview != NULL) == -1)) {
40470         goto fail;
40471     }
40472     retval = 0;
40473     goto no_fail;
40474 fail:
40475     Py_XDECREF(new_memview);
40476     retval = -1;
40477 no_fail:
40478     __Pyx_RefNannyFinishContext();
40479     return retval;
40480 }
40481 
40482 /* ObjectToMemviewSlice */
40483     static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_psdc_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
40484     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
40485     __Pyx_BufFmt_StackElem stack[1];
40486     int axes_specs[] = { (__Pyx_MEMVIEW_PTR | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
40487     int retcode;
40488     if (obj == Py_None) {
40489         result.memview = (struct __pyx_memoryview_obj *) Py_None;
40490         return result;
40491     }
40492     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
40493                                                  PyBUF_FULL_RO | writable_flag, 2,
40494                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
40495                                                  &result, obj);
40496     if (unlikely(retcode == -1))
40497         goto __pyx_fail;
40498     return result;
40499 __pyx_fail:
40500     result.memview = NULL;
40501     result.data = NULL;
40502     return result;
40503 }
40504 
40505 /* ObjectToMemviewSlice */
40506     static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
40507     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
40508     __Pyx_BufFmt_StackElem stack[1];
40509     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
40510     int retcode;
40511     if (obj == Py_None) {
40512         result.memview = (struct __pyx_memoryview_obj *) Py_None;
40513         return result;
40514     }
40515     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
40516                                                  PyBUF_RECORDS_RO | writable_flag, 1,
40517                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
40518                                                  &result, obj);
40519     if (unlikely(retcode == -1))
40520         goto __pyx_fail;
40521     return result;
40522 __pyx_fail:
40523     result.memview = NULL;
40524     result.data = NULL;
40525     return result;
40526 }
40527 
40528 /* ObjectToMemviewSlice */
40529     static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_int64_t(PyObject *obj, int writable_flag) {
40530     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
40531     __Pyx_BufFmt_StackElem stack[1];
40532     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
40533     int retcode;
40534     if (obj == Py_None) {
40535         result.memview = (struct __pyx_memoryview_obj *) Py_None;
40536         return result;
40537     }
40538     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
40539                                                  PyBUF_RECORDS_RO | writable_flag, 4,
40540                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, stack,
40541                                                  &result, obj);
40542     if (unlikely(retcode == -1))
40543         goto __pyx_fail;
40544     return result;
40545 __pyx_fail:
40546     result.memview = NULL;
40547     result.data = NULL;
40548     return result;
40549 }
40550 
40551 /* ObjectToMemviewSlice */
40552     static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsdsds_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
40553     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
40554     __Pyx_BufFmt_StackElem stack[1];
40555     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
40556     int retcode;
40557     if (obj == Py_None) {
40558         result.memview = (struct __pyx_memoryview_obj *) Py_None;
40559         return result;
40560     }
40561     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
40562                                                  PyBUF_RECORDS_RO | writable_flag, 4,
40563                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
40564                                                  &result, obj);
40565     if (unlikely(retcode == -1))
40566         goto __pyx_fail;
40567     return result;
40568 __pyx_fail:
40569     result.memview = NULL;
40570     result.data = NULL;
40571     return result;
40572 }
40573 
40574 /* FetchCommonType */
40575     static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
40576     PyObject* fake_module;
40577     PyTypeObject* cached_type = NULL;
40578     fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
40579     if (!fake_module) return NULL;
40580     Py_INCREF(fake_module);
40581     cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
40582     if (cached_type) {
40583         if (!PyType_Check((PyObject*)cached_type)) {
40584             PyErr_Format(PyExc_TypeError,
40585                 "Shared Cython type %.200s is not a type object",
40586                 type->tp_name);
40587             goto bad;
40588         }
40589         if (cached_type->tp_basicsize != type->tp_basicsize) {
40590             PyErr_Format(PyExc_TypeError,
40591                 "Shared Cython type %.200s has the wrong size, try recompiling",
40592                 type->tp_name);
40593             goto bad;
40594         }
40595     } else {
40596         if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
40597         PyErr_Clear();
40598         if (PyType_Ready(type) < 0) goto bad;
40599         if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
40600             goto bad;
40601         Py_INCREF(type);
40602         cached_type = type;
40603     }
40604 done:
40605     Py_DECREF(fake_module);
40606     return cached_type;
40607 bad:
40608     Py_XDECREF(cached_type);
40609     cached_type = NULL;
40610     goto done;
40611 }
40612 
40613 /* PyObjectGetMethod */
40614     static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
40615     PyObject *attr;
40616 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
40617     PyTypeObject *tp = Py_TYPE(obj);
40618     PyObject *descr;
40619     descrgetfunc f = NULL;
40620     PyObject **dictptr, *dict;
40621     int meth_found = 0;
40622     assert (*method == NULL);
40623     if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
40624         attr = __Pyx_PyObject_GetAttrStr(obj, name);
40625         goto try_unpack;
40626     }
40627     if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
40628         return 0;
40629     }
40630     descr = _PyType_Lookup(tp, name);
40631     if (likely(descr != NULL)) {
40632         Py_INCREF(descr);
40633 #if PY_MAJOR_VERSION >= 3
40634         #ifdef __Pyx_CyFunction_USED
40635         if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
40636         #else
40637         if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
40638         #endif
40639 #else
40640         #ifdef __Pyx_CyFunction_USED
40641         if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
40642         #else
40643         if (likely(PyFunction_Check(descr)))
40644         #endif
40645 #endif
40646         {
40647             meth_found = 1;
40648         } else {
40649             f = Py_TYPE(descr)->tp_descr_get;
40650             if (f != NULL && PyDescr_IsData(descr)) {
40651                 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
40652                 Py_DECREF(descr);
40653                 goto try_unpack;
40654             }
40655         }
40656     }
40657     dictptr = _PyObject_GetDictPtr(obj);
40658     if (dictptr != NULL && (dict = *dictptr) != NULL) {
40659         Py_INCREF(dict);
40660         attr = __Pyx_PyDict_GetItemStr(dict, name);
40661         if (attr != NULL) {
40662             Py_INCREF(attr);
40663             Py_DECREF(dict);
40664             Py_XDECREF(descr);
40665             goto try_unpack;
40666         }
40667         Py_DECREF(dict);
40668     }
40669     if (meth_found) {
40670         *method = descr;
40671         return 1;
40672     }
40673     if (f != NULL) {
40674         attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
40675         Py_DECREF(descr);
40676         goto try_unpack;
40677     }
40678     if (descr != NULL) {
40679         *method = descr;
40680         return 0;
40681     }
40682     PyErr_Format(PyExc_AttributeError,
40683 #if PY_MAJOR_VERSION >= 3
40684                  "'%.50s' object has no attribute '%U'",
40685                  tp->tp_name, name);
40686 #else
40687                  "'%.50s' object has no attribute '%.400s'",
40688                  tp->tp_name, PyString_AS_STRING(name));
40689 #endif
40690     return 0;
40691 #else
40692     attr = __Pyx_PyObject_GetAttrStr(obj, name);
40693     goto try_unpack;
40694 #endif
40695 try_unpack:
40696 #if CYTHON_UNPACK_METHODS
40697     if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
40698         PyObject *function = PyMethod_GET_FUNCTION(attr);
40699         Py_INCREF(function);
40700         Py_DECREF(attr);
40701         *method = function;
40702         return 1;
40703     }
40704 #endif
40705     *method = attr;
40706     return 0;
40707 }
40708 
40709 /* PyObjectCallMethod1 */
40710     static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
40711     PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
40712     Py_DECREF(method);
40713     return result;
40714 }
40715 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
40716     PyObject *method = NULL, *result;
40717     int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
40718     if (likely(is_method)) {
40719         result = __Pyx_PyObject_Call2Args(method, obj, arg);
40720         Py_DECREF(method);
40721         return result;
40722     }
40723     if (unlikely(!method)) return NULL;
40724     return __Pyx__PyObject_CallMethod1(method, arg);
40725 }
40726 
40727 /* CoroutineBase */
40728     #include <structmember.h>
40729 #include <frameobject.h>
40730 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
40731 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
40732     PyObject *et, *ev, *tb;
40733     PyObject *value = NULL;
40734     __Pyx_ErrFetch(&et, &ev, &tb);
40735     if (!et) {
40736         Py_XDECREF(tb);
40737         Py_XDECREF(ev);
40738         Py_INCREF(Py_None);
40739         *pvalue = Py_None;
40740         return 0;
40741     }
40742     if (likely(et == PyExc_StopIteration)) {
40743         if (!ev) {
40744             Py_INCREF(Py_None);
40745             value = Py_None;
40746         }
40747 #if PY_VERSION_HEX >= 0x030300A0
40748         else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
40749             value = ((PyStopIterationObject *)ev)->value;
40750             Py_INCREF(value);
40751             Py_DECREF(ev);
40752         }
40753 #endif
40754         else if (unlikely(PyTuple_Check(ev))) {
40755             if (PyTuple_GET_SIZE(ev) >= 1) {
40756 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40757                 value = PyTuple_GET_ITEM(ev, 0);
40758                 Py_INCREF(value);
40759 #else
40760                 value = PySequence_ITEM(ev, 0);
40761 #endif
40762             } else {
40763                 Py_INCREF(Py_None);
40764                 value = Py_None;
40765             }
40766             Py_DECREF(ev);
40767         }
40768         else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
40769             value = ev;
40770         }
40771         if (likely(value)) {
40772             Py_XDECREF(tb);
40773             Py_DECREF(et);
40774             *pvalue = value;
40775             return 0;
40776         }
40777     } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
40778         __Pyx_ErrRestore(et, ev, tb);
40779         return -1;
40780     }
40781     PyErr_NormalizeException(&et, &ev, &tb);
40782     if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
40783         __Pyx_ErrRestore(et, ev, tb);
40784         return -1;
40785     }
40786     Py_XDECREF(tb);
40787     Py_DECREF(et);
40788 #if PY_VERSION_HEX >= 0x030300A0
40789     value = ((PyStopIterationObject *)ev)->value;
40790     Py_INCREF(value);
40791     Py_DECREF(ev);
40792 #else
40793     {
40794         PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
40795         Py_DECREF(ev);
40796         if (likely(args)) {
40797             value = PySequence_GetItem(args, 0);
40798             Py_DECREF(args);
40799         }
40800         if (unlikely(!value)) {
40801             __Pyx_ErrRestore(NULL, NULL, NULL);
40802             Py_INCREF(Py_None);
40803             value = Py_None;
40804         }
40805     }
40806 #endif
40807     *pvalue = value;
40808     return 0;
40809 }
40810 static CYTHON_INLINE
40811 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
40812     PyObject *t, *v, *tb;
40813     t = exc_state->exc_type;
40814     v = exc_state->exc_value;
40815     tb = exc_state->exc_traceback;
40816     exc_state->exc_type = NULL;
40817     exc_state->exc_value = NULL;
40818     exc_state->exc_traceback = NULL;
40819     Py_XDECREF(t);
40820     Py_XDECREF(v);
40821     Py_XDECREF(tb);
40822 }
40823 #define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
40824 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
40825     const char *msg;
40826     if ((0)) {
40827     #ifdef __Pyx_Coroutine_USED
40828     } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
40829         msg = "coroutine already executing";
40830     #endif
40831     #ifdef __Pyx_AsyncGen_USED
40832     } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
40833         msg = "async generator already executing";
40834     #endif
40835     } else {
40836         msg = "generator already executing";
40837     }
40838     PyErr_SetString(PyExc_ValueError, msg);
40839 }
40840 #define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
40841 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
40842     const char *msg;
40843     if ((0)) {
40844     #ifdef __Pyx_Coroutine_USED
40845     } else if (__Pyx_Coroutine_Check(gen)) {
40846         msg = "can't send non-None value to a just-started coroutine";
40847     #endif
40848     #ifdef __Pyx_AsyncGen_USED
40849     } else if (__Pyx_AsyncGen_CheckExact(gen)) {
40850         msg = "can't send non-None value to a just-started async generator";
40851     #endif
40852     } else {
40853         msg = "can't send non-None value to a just-started generator";
40854     }
40855     PyErr_SetString(PyExc_TypeError, msg);
40856 }
40857 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
40858 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
40859     #ifdef __Pyx_Coroutine_USED
40860     if (!closing && __Pyx_Coroutine_Check(gen)) {
40861         PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
40862     } else
40863     #endif
40864     if (value) {
40865         #ifdef __Pyx_AsyncGen_USED
40866         if (__Pyx_AsyncGen_CheckExact(gen))
40867             PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
40868         else
40869         #endif
40870         PyErr_SetNone(PyExc_StopIteration);
40871     }
40872 }
40873 static
40874 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
40875     __Pyx_PyThreadState_declare
40876     PyThreadState *tstate;
40877     __Pyx_ExcInfoStruct *exc_state;
40878     PyObject *retval;
40879     assert(!self->is_running);
40880     if (unlikely(self->resume_label == 0)) {
40881         if (unlikely(value && value != Py_None)) {
40882             return __Pyx_Coroutine_NotStartedError((PyObject*)self);
40883         }
40884     }
40885     if (unlikely(self->resume_label == -1)) {
40886         return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
40887     }
40888 #if CYTHON_FAST_THREAD_STATE
40889     __Pyx_PyThreadState_assign
40890     tstate = __pyx_tstate;
40891 #else
40892     tstate = __Pyx_PyThreadState_Current;
40893 #endif
40894     exc_state = &self->gi_exc_state;
40895     if (exc_state->exc_type) {
40896         #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
40897         #else
40898         if (exc_state->exc_traceback) {
40899             PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
40900             PyFrameObject *f = tb->tb_frame;
40901             Py_XINCREF(tstate->frame);
40902             assert(f->f_back == NULL);
40903             f->f_back = tstate->frame;
40904         }
40905         #endif
40906     }
40907 #if CYTHON_USE_EXC_INFO_STACK
40908     exc_state->previous_item = tstate->exc_info;
40909     tstate->exc_info = exc_state;
40910 #else
40911     if (exc_state->exc_type) {
40912         __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
40913     } else {
40914         __Pyx_Coroutine_ExceptionClear(exc_state);
40915         __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
40916     }
40917 #endif
40918     self->is_running = 1;
40919     retval = self->body((PyObject *) self, tstate, value);
40920     self->is_running = 0;
40921 #if CYTHON_USE_EXC_INFO_STACK
40922     exc_state = &self->gi_exc_state;
40923     tstate->exc_info = exc_state->previous_item;
40924     exc_state->previous_item = NULL;
40925     __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
40926 #endif
40927     return retval;
40928 }
40929 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
40930     PyObject *exc_tb = exc_state->exc_traceback;
40931     if (likely(exc_tb)) {
40932 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
40933 #else
40934         PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
40935         PyFrameObject *f = tb->tb_frame;
40936         Py_CLEAR(f->f_back);
40937 #endif
40938     }
40939 }
40940 static CYTHON_INLINE
40941 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
40942     if (unlikely(!retval)) {
40943         __Pyx_PyThreadState_declare
40944         __Pyx_PyThreadState_assign
40945         if (!__Pyx_PyErr_Occurred()) {
40946             PyObject *exc = PyExc_StopIteration;
40947             #ifdef __Pyx_AsyncGen_USED
40948             if (__Pyx_AsyncGen_CheckExact(gen))
40949                 exc = __Pyx_PyExc_StopAsyncIteration;
40950             #endif
40951             __Pyx_PyErr_SetNone(exc);
40952         }
40953     }
40954     return retval;
40955 }
40956 static CYTHON_INLINE
40957 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
40958     PyObject *ret;
40959     PyObject *val = NULL;
40960     __Pyx_Coroutine_Undelegate(gen);
40961     __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
40962     ret = __Pyx_Coroutine_SendEx(gen, val, 0);
40963     Py_XDECREF(val);
40964     return ret;
40965 }
40966 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
40967     PyObject *retval;
40968     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
40969     PyObject *yf = gen->yieldfrom;
40970     if (unlikely(gen->is_running))
40971         return __Pyx_Coroutine_AlreadyRunningError(gen);
40972     if (yf) {
40973         PyObject *ret;
40974         gen->is_running = 1;
40975         #ifdef __Pyx_Generator_USED
40976         if (__Pyx_Generator_CheckExact(yf)) {
40977             ret = __Pyx_Coroutine_Send(yf, value);
40978         } else
40979         #endif
40980         #ifdef __Pyx_Coroutine_USED
40981         if (__Pyx_Coroutine_Check(yf)) {
40982             ret = __Pyx_Coroutine_Send(yf, value);
40983         } else
40984         #endif
40985         #ifdef __Pyx_AsyncGen_USED
40986         if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
40987             ret = __Pyx_async_gen_asend_send(yf, value);
40988         } else
40989         #endif
40990         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
40991         if (PyGen_CheckExact(yf)) {
40992             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
40993         } else
40994         #endif
40995         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
40996         if (PyCoro_CheckExact(yf)) {
40997             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
40998         } else
40999         #endif
41000         {
41001             if (value == Py_None)
41002                 ret = Py_TYPE(yf)->tp_iternext(yf);
41003             else
41004                 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
41005         }
41006         gen->is_running = 0;
41007         if (likely(ret)) {
41008             return ret;
41009         }
41010         retval = __Pyx_Coroutine_FinishDelegation(gen);
41011     } else {
41012         retval = __Pyx_Coroutine_SendEx(gen, value, 0);
41013     }
41014     return __Pyx_Coroutine_MethodReturn(self, retval);
41015 }
41016 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
41017     PyObject *retval = NULL;
41018     int err = 0;
41019     #ifdef __Pyx_Generator_USED
41020     if (__Pyx_Generator_CheckExact(yf)) {
41021         retval = __Pyx_Coroutine_Close(yf);
41022         if (!retval)
41023             return -1;
41024     } else
41025     #endif
41026     #ifdef __Pyx_Coroutine_USED
41027     if (__Pyx_Coroutine_Check(yf)) {
41028         retval = __Pyx_Coroutine_Close(yf);
41029         if (!retval)
41030             return -1;
41031     } else
41032     if (__Pyx_CoroutineAwait_CheckExact(yf)) {
41033         retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
41034         if (!retval)
41035             return -1;
41036     } else
41037     #endif
41038     #ifdef __Pyx_AsyncGen_USED
41039     if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
41040         retval = __Pyx_async_gen_asend_close(yf, NULL);
41041     } else
41042     if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
41043         retval = __Pyx_async_gen_athrow_close(yf, NULL);
41044     } else
41045     #endif
41046     {
41047         PyObject *meth;
41048         gen->is_running = 1;
41049         meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
41050         if (unlikely(!meth)) {
41051             if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
41052                 PyErr_WriteUnraisable(yf);
41053             }
41054             PyErr_Clear();
41055         } else {
41056             retval = PyObject_CallFunction(meth, NULL);
41057             Py_DECREF(meth);
41058             if (!retval)
41059                 err = -1;
41060         }
41061         gen->is_running = 0;
41062     }
41063     Py_XDECREF(retval);
41064     return err;
41065 }
41066 static PyObject *__Pyx_Generator_Next(PyObject *self) {
41067     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
41068     PyObject *yf = gen->yieldfrom;
41069     if (unlikely(gen->is_running))
41070         return __Pyx_Coroutine_AlreadyRunningError(gen);
41071     if (yf) {
41072         PyObject *ret;
41073         gen->is_running = 1;
41074         #ifdef __Pyx_Generator_USED
41075         if (__Pyx_Generator_CheckExact(yf)) {
41076             ret = __Pyx_Generator_Next(yf);
41077         } else
41078         #endif
41079         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
41080         if (PyGen_CheckExact(yf)) {
41081             ret = _PyGen_Send((PyGenObject*)yf, NULL);
41082         } else
41083         #endif
41084         #ifdef __Pyx_Coroutine_USED
41085         if (__Pyx_Coroutine_Check(yf)) {
41086             ret = __Pyx_Coroutine_Send(yf, Py_None);
41087         } else
41088         #endif
41089             ret = Py_TYPE(yf)->tp_iternext(yf);
41090         gen->is_running = 0;
41091         if (likely(ret)) {
41092             return ret;
41093         }
41094         return __Pyx_Coroutine_FinishDelegation(gen);
41095     }
41096     return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
41097 }
41098 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
41099     return __Pyx_Coroutine_Close(self);
41100 }
41101 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
41102     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
41103     PyObject *retval, *raised_exception;
41104     PyObject *yf = gen->yieldfrom;
41105     int err = 0;
41106     if (unlikely(gen->is_running))
41107         return __Pyx_Coroutine_AlreadyRunningError(gen);
41108     if (yf) {
41109         Py_INCREF(yf);
41110         err = __Pyx_Coroutine_CloseIter(gen, yf);
41111         __Pyx_Coroutine_Undelegate(gen);
41112         Py_DECREF(yf);
41113     }
41114     if (err == 0)
41115         PyErr_SetNone(PyExc_GeneratorExit);
41116     retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
41117     if (unlikely(retval)) {
41118         const char *msg;
41119         Py_DECREF(retval);
41120         if ((0)) {
41121         #ifdef __Pyx_Coroutine_USED
41122         } else if (__Pyx_Coroutine_Check(self)) {
41123             msg = "coroutine ignored GeneratorExit";
41124         #endif
41125         #ifdef __Pyx_AsyncGen_USED
41126         } else if (__Pyx_AsyncGen_CheckExact(self)) {
41127 #if PY_VERSION_HEX < 0x03060000
41128             msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
41129 #else
41130             msg = "async generator ignored GeneratorExit";
41131 #endif
41132         #endif
41133         } else {
41134             msg = "generator ignored GeneratorExit";
41135         }
41136         PyErr_SetString(PyExc_RuntimeError, msg);
41137         return NULL;
41138     }
41139     raised_exception = PyErr_Occurred();
41140     if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
41141         if (raised_exception) PyErr_Clear();
41142         Py_INCREF(Py_None);
41143         return Py_None;
41144     }
41145     return NULL;
41146 }
41147 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
41148                                         PyObject *args, int close_on_genexit) {
41149     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
41150     PyObject *yf = gen->yieldfrom;
41151     if (unlikely(gen->is_running))
41152         return __Pyx_Coroutine_AlreadyRunningError(gen);
41153     if (yf) {
41154         PyObject *ret;
41155         Py_INCREF(yf);
41156         if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
41157             int err = __Pyx_Coroutine_CloseIter(gen, yf);
41158             Py_DECREF(yf);
41159             __Pyx_Coroutine_Undelegate(gen);
41160             if (err < 0)
41161                 return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
41162             goto throw_here;
41163         }
41164         gen->is_running = 1;
41165         if (0
41166         #ifdef __Pyx_Generator_USED
41167             || __Pyx_Generator_CheckExact(yf)
41168         #endif
41169         #ifdef __Pyx_Coroutine_USED
41170             || __Pyx_Coroutine_Check(yf)
41171         #endif
41172             ) {
41173             ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
41174         #ifdef __Pyx_Coroutine_USED
41175         } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
41176             ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
41177         #endif
41178         } else {
41179             PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
41180             if (unlikely(!meth)) {
41181                 Py_DECREF(yf);
41182                 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
41183                     gen->is_running = 0;
41184                     return NULL;
41185                 }
41186                 PyErr_Clear();
41187                 __Pyx_Coroutine_Undelegate(gen);
41188                 gen->is_running = 0;
41189                 goto throw_here;
41190             }
41191             if (likely(args)) {
41192                 ret = PyObject_CallObject(meth, args);
41193             } else {
41194                 ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
41195             }
41196             Py_DECREF(meth);
41197         }
41198         gen->is_running = 0;
41199         Py_DECREF(yf);
41200         if (!ret) {
41201             ret = __Pyx_Coroutine_FinishDelegation(gen);
41202         }
41203         return __Pyx_Coroutine_MethodReturn(self, ret);
41204     }
41205 throw_here:
41206     __Pyx_Raise(typ, val, tb, NULL);
41207     return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
41208 }
41209 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
41210     PyObject *typ;
41211     PyObject *val = NULL;
41212     PyObject *tb = NULL;
41213     if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
41214         return NULL;
41215     return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
41216 }
41217 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
41218     Py_VISIT(exc_state->exc_type);
41219     Py_VISIT(exc_state->exc_value);
41220     Py_VISIT(exc_state->exc_traceback);
41221     return 0;
41222 }
41223 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
41224     Py_VISIT(gen->closure);
41225     Py_VISIT(gen->classobj);
41226     Py_VISIT(gen->yieldfrom);
41227     return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
41228 }
41229 static int __Pyx_Coroutine_clear(PyObject *self) {
41230     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
41231     Py_CLEAR(gen->closure);
41232     Py_CLEAR(gen->classobj);
41233     Py_CLEAR(gen->yieldfrom);
41234     __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
41235 #ifdef __Pyx_AsyncGen_USED
41236     if (__Pyx_AsyncGen_CheckExact(self)) {
41237         Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
41238     }
41239 #endif
41240     Py_CLEAR(gen->gi_code);
41241     Py_CLEAR(gen->gi_name);
41242     Py_CLEAR(gen->gi_qualname);
41243     Py_CLEAR(gen->gi_modulename);
41244     return 0;
41245 }
41246 static void __Pyx_Coroutine_dealloc(PyObject *self) {
41247     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
41248     PyObject_GC_UnTrack(gen);
41249     if (gen->gi_weakreflist != NULL)
41250         PyObject_ClearWeakRefs(self);
41251     if (gen->resume_label >= 0) {
41252         PyObject_GC_Track(self);
41253 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
41254         if (PyObject_CallFinalizerFromDealloc(self))
41255 #else
41256         Py_TYPE(gen)->tp_del(self);
41257         if (self->ob_refcnt > 0)
41258 #endif
41259         {
41260             return;
41261         }
41262         PyObject_GC_UnTrack(self);
41263     }
41264 #ifdef __Pyx_AsyncGen_USED
41265     if (__Pyx_AsyncGen_CheckExact(self)) {
41266         /* We have to handle this case for asynchronous generators
41267            right here, because this code has to be between UNTRACK
41268            and GC_Del. */
41269         Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
41270     }
41271 #endif
41272     __Pyx_Coroutine_clear(self);
41273     PyObject_GC_Del(gen);
41274 }
41275 static void __Pyx_Coroutine_del(PyObject *self) {
41276     PyObject *error_type, *error_value, *error_traceback;
41277     __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
41278     __Pyx_PyThreadState_declare
41279     if (gen->resume_label < 0) {
41280         return;
41281     }
41282 #if !CYTHON_USE_TP_FINALIZE
41283     assert(self->ob_refcnt == 0);
41284     self->ob_refcnt = 1;
41285 #endif
41286     __Pyx_PyThreadState_assign
41287     __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
41288 #ifdef __Pyx_AsyncGen_USED
41289     if (__Pyx_AsyncGen_CheckExact(self)) {
41290         __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
41291         PyObject *finalizer = agen->ag_finalizer;
41292         if (finalizer && !agen->ag_closed) {
41293             PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
41294             if (unlikely(!res)) {
41295                 PyErr_WriteUnraisable(self);
41296             } else {
41297                 Py_DECREF(res);
41298             }
41299             __Pyx_ErrRestore(error_type, error_value, error_traceback);
41300             return;
41301         }
41302     }
41303 #endif
41304     if (unlikely(gen->resume_label == 0 && !error_value)) {
41305 #ifdef __Pyx_Coroutine_USED
41306 #ifdef __Pyx_Generator_USED
41307     if (!__Pyx_Generator_CheckExact(self))
41308 #endif
41309         {
41310         PyObject_GC_UnTrack(self);
41311 #if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
41312         if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
41313             PyErr_WriteUnraisable(self);
41314 #else
41315         {PyObject *msg;
41316         char *cmsg;
41317         #if CYTHON_COMPILING_IN_PYPY
41318         msg = NULL;
41319         cmsg = (char*) "coroutine was never awaited";
41320         #else
41321         char *cname;
41322         PyObject *qualname;
41323         qualname = gen->gi_qualname;
41324         cname = PyString_AS_STRING(qualname);
41325         msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
41326         if (unlikely(!msg)) {
41327             PyErr_Clear();
41328             cmsg = (char*) "coroutine was never awaited";
41329         } else {
41330             cmsg = PyString_AS_STRING(msg);
41331         }
41332         #endif
41333         if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
41334             PyErr_WriteUnraisable(self);
41335         Py_XDECREF(msg);}
41336 #endif
41337         PyObject_GC_Track(self);
41338         }
41339 #endif
41340     } else {
41341         PyObject *res = __Pyx_Coroutine_Close(self);
41342         if (unlikely(!res)) {
41343             if (PyErr_Occurred())
41344                 PyErr_WriteUnraisable(self);
41345         } else {
41346             Py_DECREF(res);
41347         }
41348     }
41349     __Pyx_ErrRestore(error_type, error_value, error_traceback);
41350 #if !CYTHON_USE_TP_FINALIZE
41351     assert(self->ob_refcnt > 0);
41352     if (--self->ob_refcnt == 0) {
41353         return;
41354     }
41355     {
41356         Py_ssize_t refcnt = self->ob_refcnt;
41357         _Py_NewReference(self);
41358         self->ob_refcnt = refcnt;
41359     }
41360 #if CYTHON_COMPILING_IN_CPYTHON
41361     assert(PyType_IS_GC(self->ob_type) &&
41362            _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
41363     _Py_DEC_REFTOTAL;
41364 #endif
41365 #ifdef COUNT_ALLOCS
41366     --Py_TYPE(self)->tp_frees;
41367     --Py_TYPE(self)->tp_allocs;
41368 #endif
41369 #endif
41370 }
41371 static PyObject *
41372 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
41373 {
41374     PyObject *name = self->gi_name;
41375     if (unlikely(!name)) name = Py_None;
41376     Py_INCREF(name);
41377     return name;
41378 }
41379 static int
41380 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
41381 {
41382     PyObject *tmp;
41383 #if PY_MAJOR_VERSION >= 3
41384     if (unlikely(value == NULL || !PyUnicode_Check(value)))
41385 #else
41386     if (unlikely(value == NULL || !PyString_Check(value)))
41387 #endif
41388     {
41389         PyErr_SetString(PyExc_TypeError,
41390                         "__name__ must be set to a string object");
41391         return -1;
41392     }
41393     tmp = self->gi_name;
41394     Py_INCREF(value);
41395     self->gi_name = value;
41396     Py_XDECREF(tmp);
41397     return 0;
41398 }
41399 static PyObject *
41400 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
41401 {
41402     PyObject *name = self->gi_qualname;
41403     if (unlikely(!name)) name = Py_None;
41404     Py_INCREF(name);
41405     return name;
41406 }
41407 static int
41408 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
41409 {
41410     PyObject *tmp;
41411 #if PY_MAJOR_VERSION >= 3
41412     if (unlikely(value == NULL || !PyUnicode_Check(value)))
41413 #else
41414     if (unlikely(value == NULL || !PyString_Check(value)))
41415 #endif
41416     {
41417         PyErr_SetString(PyExc_TypeError,
41418                         "__qualname__ must be set to a string object");
41419         return -1;
41420     }
41421     tmp = self->gi_qualname;
41422     Py_INCREF(value);
41423     self->gi_qualname = value;
41424     Py_XDECREF(tmp);
41425     return 0;
41426 }
41427 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
41428             PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
41429             PyObject *name, PyObject *qualname, PyObject *module_name) {
41430     __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
41431     if (unlikely(!gen))
41432         return NULL;
41433     return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
41434 }
41435 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
41436             __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
41437             PyObject *name, PyObject *qualname, PyObject *module_name) {
41438     gen->body = body;
41439     gen->closure = closure;
41440     Py_XINCREF(closure);
41441     gen->is_running = 0;
41442     gen->resume_label = 0;
41443     gen->classobj = NULL;
41444     gen->yieldfrom = NULL;
41445     gen->gi_exc_state.exc_type = NULL;
41446     gen->gi_exc_state.exc_value = NULL;
41447     gen->gi_exc_state.exc_traceback = NULL;
41448 #if CYTHON_USE_EXC_INFO_STACK
41449     gen->gi_exc_state.previous_item = NULL;
41450 #endif
41451     gen->gi_weakreflist = NULL;
41452     Py_XINCREF(qualname);
41453     gen->gi_qualname = qualname;
41454     Py_XINCREF(name);
41455     gen->gi_name = name;
41456     Py_XINCREF(module_name);
41457     gen->gi_modulename = module_name;
41458     Py_XINCREF(code);
41459     gen->gi_code = code;
41460     PyObject_GC_Track(gen);
41461     return gen;
41462 }
41463 
41464 /* PatchModuleWithCoroutine */
41465     static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
41466 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
41467     int result;
41468     PyObject *globals, *result_obj;
41469     globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
41470     result = PyDict_SetItemString(globals, "_cython_coroutine_type",
41471     #ifdef __Pyx_Coroutine_USED
41472         (PyObject*)__pyx_CoroutineType);
41473     #else
41474         Py_None);
41475     #endif
41476     if (unlikely(result < 0)) goto ignore;
41477     result = PyDict_SetItemString(globals, "_cython_generator_type",
41478     #ifdef __Pyx_Generator_USED
41479         (PyObject*)__pyx_GeneratorType);
41480     #else
41481         Py_None);
41482     #endif
41483     if (unlikely(result < 0)) goto ignore;
41484     if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
41485     if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
41486     result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
41487     if (unlikely(!result_obj)) goto ignore;
41488     Py_DECREF(result_obj);
41489     Py_DECREF(globals);
41490     return module;
41491 ignore:
41492     Py_XDECREF(globals);
41493     PyErr_WriteUnraisable(module);
41494     if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
41495         Py_DECREF(module);
41496         module = NULL;
41497     }
41498 #else
41499     py_code++;
41500 #endif
41501     return module;
41502 }
41503 
41504 /* PatchGeneratorABC */
41505     #ifndef CYTHON_REGISTER_ABCS
41506 #define CYTHON_REGISTER_ABCS 1
41507 #endif
41508 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
41509 static PyObject* __Pyx_patch_abc_module(PyObject *module);
41510 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
41511     module = __Pyx_Coroutine_patch_module(
41512         module, ""
41513 "if _cython_generator_type is not None:\n"
41514 "    try: Generator = _module.Generator\n"
41515 "    except AttributeError: pass\n"
41516 "    else: Generator.register(_cython_generator_type)\n"
41517 "if _cython_coroutine_type is not None:\n"
41518 "    try: Coroutine = _module.Coroutine\n"
41519 "    except AttributeError: pass\n"
41520 "    else: Coroutine.register(_cython_coroutine_type)\n"
41521     );
41522     return module;
41523 }
41524 #endif
41525 static int __Pyx_patch_abc(void) {
41526 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
41527     static int abc_patched = 0;
41528     if (CYTHON_REGISTER_ABCS && !abc_patched) {
41529         PyObject *module;
41530         module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
41531         if (!module) {
41532             PyErr_WriteUnraisable(NULL);
41533             if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
41534                     ((PY_MAJOR_VERSION >= 3) ?
41535                         "Cython module failed to register with collections.abc module" :
41536                         "Cython module failed to register with collections module"), 1) < 0)) {
41537                 return -1;
41538             }
41539         } else {
41540             module = __Pyx_patch_abc_module(module);
41541             abc_patched = 1;
41542             if (unlikely(!module))
41543                 return -1;
41544             Py_DECREF(module);
41545         }
41546         module = PyImport_ImportModule("backports_abc");
41547         if (module) {
41548             module = __Pyx_patch_abc_module(module);
41549             Py_XDECREF(module);
41550         }
41551         if (!module) {
41552             PyErr_Clear();
41553         }
41554     }
41555 #else
41556     if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
41557 #endif
41558     return 0;
41559 }
41560 
41561 /* Generator */
41562     static PyMethodDef __pyx_Generator_methods[] = {
41563     {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
41564      (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
41565     {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
41566      (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
41567     {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
41568      (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
41569     {0, 0, 0, 0}
41570 };
41571 static PyMemberDef __pyx_Generator_memberlist[] = {
41572     {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
41573     {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
41574      (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
41575     {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
41576     {0, 0, 0, 0, 0}
41577 };
41578 static PyGetSetDef __pyx_Generator_getsets[] = {
41579     {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
41580      (char*) PyDoc_STR("name of the generator"), 0},
41581     {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
41582      (char*) PyDoc_STR("qualified name of the generator"), 0},
41583     {0, 0, 0, 0, 0}
41584 };
41585 static PyTypeObject __pyx_GeneratorType_type = {
41586     PyVarObject_HEAD_INIT(0, 0)
41587     "generator",
41588     sizeof(__pyx_CoroutineObject),
41589     0,
41590     (destructor) __Pyx_Coroutine_dealloc,
41591     0,
41592     0,
41593     0,
41594     0,
41595     0,
41596     0,
41597     0,
41598     0,
41599     0,
41600     0,
41601     0,
41602     0,
41603     0,
41604     0,
41605     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
41606     0,
41607     (traverseproc) __Pyx_Coroutine_traverse,
41608     0,
41609     0,
41610     offsetof(__pyx_CoroutineObject, gi_weakreflist),
41611     0,
41612     (iternextfunc) __Pyx_Generator_Next,
41613     __pyx_Generator_methods,
41614     __pyx_Generator_memberlist,
41615     __pyx_Generator_getsets,
41616     0,
41617     0,
41618     0,
41619     0,
41620     0,
41621     0,
41622     0,
41623     0,
41624     0,
41625     0,
41626     0,
41627     0,
41628     0,
41629     0,
41630     0,
41631 #if CYTHON_USE_TP_FINALIZE
41632     0,
41633 #else
41634     __Pyx_Coroutine_del,
41635 #endif
41636     0,
41637 #if CYTHON_USE_TP_FINALIZE
41638     __Pyx_Coroutine_del,
41639 #elif PY_VERSION_HEX >= 0x030400a1
41640     0,
41641 #endif
41642 #if PY_VERSION_HEX >= 0x030800b1
41643     0,
41644 #endif
41645 };
41646 static int __pyx_Generator_init(void) {
41647     __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
41648     __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
41649     __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
41650     if (unlikely(!__pyx_GeneratorType)) {
41651         return -1;
41652     }
41653     return 0;
41654 }
41655 
41656 /* ObjectToMemviewSlice */
41657     static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(PyObject *obj, int writable_flag) {
41658     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
41659     __Pyx_BufFmt_StackElem stack[1];
41660     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
41661     int retcode;
41662     if (obj == Py_None) {
41663         result.memview = (struct __pyx_memoryview_obj *) Py_None;
41664         return result;
41665     }
41666     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
41667                                                  PyBUF_RECORDS_RO | writable_flag, 1,
41668                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, stack,
41669                                                  &result, obj);
41670     if (unlikely(retcode == -1))
41671         goto __pyx_fail;
41672     return result;
41673 __pyx_fail:
41674     result.memview = NULL;
41675     result.data = NULL;
41676     return result;
41677 }
41678 
41679 /* CheckBinaryVersion */
41680     static int __Pyx_check_binary_version(void) {
41681     char ctversion[4], rtversion[4];
41682     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
41683     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
41684     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
41685         char message[200];
41686         PyOS_snprintf(message, sizeof(message),
41687                       "compiletime version %s of module '%.100s' "
41688                       "does not match runtime version %s",
41689                       ctversion, __Pyx_MODULE_NAME, rtversion);
41690         return PyErr_WarnEx(NULL, message, 1);
41691     }
41692     return 0;
41693 }
41694 
41695 /* VoidPtrImport */
41696     #ifndef __PYX_HAVE_RT_ImportVoidPtr
41697 #define __PYX_HAVE_RT_ImportVoidPtr
41698 static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) {
41699     PyObject *d = 0;
41700     PyObject *cobj = 0;
41701     d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
41702     if (!d)
41703         goto bad;
41704     cobj = PyDict_GetItemString(d, name);
41705     if (!cobj) {
41706         PyErr_Format(PyExc_ImportError,
41707             "%.200s does not export expected C variable %.200s",
41708                 PyModule_GetName(module), name);
41709         goto bad;
41710     }
41711 #if PY_VERSION_HEX >= 0x02070000
41712     if (!PyCapsule_IsValid(cobj, sig)) {
41713         PyErr_Format(PyExc_TypeError,
41714             "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
41715              PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
41716         goto bad;
41717     }
41718     *p = PyCapsule_GetPointer(cobj, sig);
41719 #else
41720     {const char *desc, *s1, *s2;
41721     desc = (const char *)PyCObject_GetDesc(cobj);
41722     if (!desc)
41723         goto bad;
41724     s1 = desc; s2 = sig;
41725     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
41726     if (*s1 != *s2) {
41727         PyErr_Format(PyExc_TypeError,
41728             "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
41729              PyModule_GetName(module), name, sig, desc);
41730         goto bad;
41731     }
41732     *p = PyCObject_AsVoidPtr(cobj);}
41733 #endif
41734     if (!(*p))
41735         goto bad;
41736     Py_DECREF(d);
41737     return 0;
41738 bad:
41739     Py_XDECREF(d);
41740     return -1;
41741 }
41742 #endif
41743 
41744 /* FunctionImport */
41745     #ifndef __PYX_HAVE_RT_ImportFunction
41746 #define __PYX_HAVE_RT_ImportFunction
41747 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
41748     PyObject *d = 0;
41749     PyObject *cobj = 0;
41750     union {
41751         void (*fp)(void);
41752         void *p;
41753     } tmp;
41754     d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
41755     if (!d)
41756         goto bad;
41757     cobj = PyDict_GetItemString(d, funcname);
41758     if (!cobj) {
41759         PyErr_Format(PyExc_ImportError,
41760             "%.200s does not export expected C function %.200s",
41761                 PyModule_GetName(module), funcname);
41762         goto bad;
41763     }
41764 #if PY_VERSION_HEX >= 0x02070000
41765     if (!PyCapsule_IsValid(cobj, sig)) {
41766         PyErr_Format(PyExc_TypeError,
41767             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
41768              PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
41769         goto bad;
41770     }
41771     tmp.p = PyCapsule_GetPointer(cobj, sig);
41772 #else
41773     {const char *desc, *s1, *s2;
41774     desc = (const char *)PyCObject_GetDesc(cobj);
41775     if (!desc)
41776         goto bad;
41777     s1 = desc; s2 = sig;
41778     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
41779     if (*s1 != *s2) {
41780         PyErr_Format(PyExc_TypeError,
41781             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
41782              PyModule_GetName(module), funcname, sig, desc);
41783         goto bad;
41784     }
41785     tmp.p = PyCObject_AsVoidPtr(cobj);}
41786 #endif
41787     *f = tmp.fp;
41788     if (!(*f))
41789         goto bad;
41790     Py_DECREF(d);
41791     return 0;
41792 bad:
41793     Py_XDECREF(d);
41794     return -1;
41795 }
41796 #endif
41797 
41798 /* InitStrings */
41799     static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
41800     while (t->p) {
41801         #if PY_MAJOR_VERSION < 3
41802         if (t->is_unicode) {
41803             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
41804         } else if (t->intern) {
41805             *t->p = PyString_InternFromString(t->s);
41806         } else {
41807             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
41808         }
41809         #else
41810         if (t->is_unicode | t->is_str) {
41811             if (t->intern) {
41812                 *t->p = PyUnicode_InternFromString(t->s);
41813             } else if (t->encoding) {
41814                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
41815             } else {
41816                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
41817             }
41818         } else {
41819             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
41820         }
41821         #endif
41822         if (!*t->p)
41823             return -1;
41824         if (PyObject_Hash(*t->p) == -1)
41825             return -1;
41826         ++t;
41827     }
41828     return 0;
41829 }
41830 
41831 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
41832     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
41833 }
41834 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
41835     Py_ssize_t ignore;
41836     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
41837 }
41838 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
41839 #if !CYTHON_PEP393_ENABLED
41840 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41841     char* defenc_c;
41842     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
41843     if (!defenc) return NULL;
41844     defenc_c = PyBytes_AS_STRING(defenc);
41845 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41846     {
41847         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
41848         char* c;
41849         for (c = defenc_c; c < end; c++) {
41850             if ((unsigned char) (*c) >= 128) {
41851                 PyUnicode_AsASCIIString(o);
41852                 return NULL;
41853             }
41854         }
41855     }
41856 #endif
41857     *length = PyBytes_GET_SIZE(defenc);
41858     return defenc_c;
41859 }
41860 #else
41861 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41862     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
41863 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41864     if (likely(PyUnicode_IS_ASCII(o))) {
41865         *length = PyUnicode_GET_LENGTH(o);
41866         return PyUnicode_AsUTF8(o);
41867     } else {
41868         PyUnicode_AsASCIIString(o);
41869         return NULL;
41870     }
41871 #else
41872     return PyUnicode_AsUTF8AndSize(o, length);
41873 #endif
41874 }
41875 #endif
41876 #endif
41877 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41878 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
41879     if (
41880 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41881             __Pyx_sys_getdefaultencoding_not_ascii &&
41882 #endif
41883             PyUnicode_Check(o)) {
41884         return __Pyx_PyUnicode_AsStringAndSize(o, length);
41885     } else
41886 #endif
41887 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
41888     if (PyByteArray_Check(o)) {
41889         *length = PyByteArray_GET_SIZE(o);
41890         return PyByteArray_AS_STRING(o);
41891     } else
41892 #endif
41893     {
41894         char* result;
41895         int r = PyBytes_AsStringAndSize(o, &result, length);
41896         if (unlikely(r < 0)) {
41897             return NULL;
41898         } else {
41899             return result;
41900         }
41901     }
41902 }
41903 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
41904    int is_true = x == Py_True;
41905    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
41906    else return PyObject_IsTrue(x);
41907 }
41908 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
41909     int retval;
41910     if (unlikely(!x)) return -1;
41911     retval = __Pyx_PyObject_IsTrue(x);
41912     Py_DECREF(x);
41913     return retval;
41914 }
41915 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
41916 #if PY_MAJOR_VERSION >= 3
41917     if (PyLong_Check(result)) {
41918         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
41919                 "__int__ returned non-int (type %.200s).  "
41920                 "The ability to return an instance of a strict subclass of int "
41921                 "is deprecated, and may be removed in a future version of Python.",
41922                 Py_TYPE(result)->tp_name)) {
41923             Py_DECREF(result);
41924             return NULL;
41925         }
41926         return result;
41927     }
41928 #endif
41929     PyErr_Format(PyExc_TypeError,
41930                  "__%.4s__ returned non-%.4s (type %.200s)",
41931                  type_name, type_name, Py_TYPE(result)->tp_name);
41932     Py_DECREF(result);
41933     return NULL;
41934 }
41935 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
41936 #if CYTHON_USE_TYPE_SLOTS
41937   PyNumberMethods *m;
41938 #endif
41939   const char *name = NULL;
41940   PyObject *res = NULL;
41941 #if PY_MAJOR_VERSION < 3
41942   if (likely(PyInt_Check(x) || PyLong_Check(x)))
41943 #else
41944   if (likely(PyLong_Check(x)))
41945 #endif
41946     return __Pyx_NewRef(x);
41947 #if CYTHON_USE_TYPE_SLOTS
41948   m = Py_TYPE(x)->tp_as_number;
41949   #if PY_MAJOR_VERSION < 3
41950   if (m && m->nb_int) {
41951     name = "int";
41952     res = m->nb_int(x);
41953   }
41954   else if (m && m->nb_long) {
41955     name = "long";
41956     res = m->nb_long(x);
41957   }
41958   #else
41959   if (likely(m && m->nb_int)) {
41960     name = "int";
41961     res = m->nb_int(x);
41962   }
41963   #endif
41964 #else
41965   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
41966     res = PyNumber_Int(x);
41967   }
41968 #endif
41969   if (likely(res)) {
41970 #if PY_MAJOR_VERSION < 3
41971     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
41972 #else
41973     if (unlikely(!PyLong_CheckExact(res))) {
41974 #endif
41975         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
41976     }
41977   }
41978   else if (!PyErr_Occurred()) {
41979     PyErr_SetString(PyExc_TypeError,
41980                     "an integer is required");
41981   }
41982   return res;
41983 }
41984 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
41985   Py_ssize_t ival;
41986   PyObject *x;
41987 #if PY_MAJOR_VERSION < 3
41988   if (likely(PyInt_CheckExact(b))) {
41989     if (sizeof(Py_ssize_t) >= sizeof(long))
41990         return PyInt_AS_LONG(b);
41991     else
41992         return PyInt_AsSsize_t(b);
41993   }
41994 #endif
41995   if (likely(PyLong_CheckExact(b))) {
41996     #if CYTHON_USE_PYLONG_INTERNALS
41997     const digit* digits = ((PyLongObject*)b)->ob_digit;
41998     const Py_ssize_t size = Py_SIZE(b);
41999     if (likely(__Pyx_sst_abs(size) <= 1)) {
42000         ival = likely(size) ? digits[0] : 0;
42001         if (size == -1) ival = -ival;
42002         return ival;
42003     } else {
42004       switch (size) {
42005          case 2:
42006            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42007              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42008            }
42009            break;
42010          case -2:
42011            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42012              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42013            }
42014            break;
42015          case 3:
42016            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42017              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42018            }
42019            break;
42020          case -3:
42021            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42022              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42023            }
42024            break;
42025          case 4:
42026            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42027              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]));
42028            }
42029            break;
42030          case -4:
42031            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42032              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]));
42033            }
42034            break;
42035       }
42036     }
42037     #endif
42038     return PyLong_AsSsize_t(b);
42039   }
42040   x = PyNumber_Index(b);
42041   if (!x) return -1;
42042   ival = PyInt_AsSsize_t(x);
42043   Py_DECREF(x);
42044   return ival;
42045 }
42046 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
42047   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
42048 }
42049 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
42050     return PyInt_FromSize_t(ival);
42051 }
42052 
42053 
42054 #endif /* Py_PYTHON_H */
42055